Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

Reopened Issue: Some lists are not Enumerable in Outlook [16739]

$
0
0
Please implement IEnumerable on the various lists across the solution. Otherwise, there are a lot of foreach-statements in applications that would need to be rewritten to for-loops for people migrating to NetOffice.
 
Examples from my compile output:
foreach statement cannot operate on variables of type 'NetOffice.OutlookApi._Items' because 'NetOffice.OutlookApi._Items' does not contain a public definition for 'GetEnumerator'
foreach statement cannot operate on variables of type 'NetOffice.OutlookApi.Stores' because 'NetOffice.OutlookApi.Stores' does not contain a public definition for 'GetEnumerator'
foreach statement cannot operate on variables of type 'NetOffice.OutlookApi._Folders' because 'NetOffice.OutlookApi._Folders' does not contain a public definition for 'GetEnumerator'
 
As an example, see attached file, or https://gist.github.com/1284715#file__items_enumerator.cs , where I have implemented an Enumerator for _Items.cs in v1.1 of NetOffice.
 
If you want to, I could contribute by creating a patch for the three lists mentioned. But you probably have a better overview of how many places this should be implemented. And maybe if there is a generic solution so we don't need so much copy-pasting.

Viewing all articles
Browse latest Browse all 1741

Trending Articles