Re: [Lucene.Net] [jira] [Created] (LUCENENET-469) Convert Java Iterator classes to implement IEnumerableT

2012-06-08 Thread Andy Pook
If we don't want to add IEnumerable (though it seems that IEnumerable could be added in parallel with the existing pattern) could we add a bunch of extension methods? Something like the following... {noformat} public static class LuceneExtensions { public static IEnumerableTerm GetEnumerable(this

Re: [Lucene.Net] [jira] [Created] (LUCENENET-469) Convert Java Iterator classes to implement IEnumerableT

2012-06-08 Thread Simon Svensson
Hi, We could add IEnumerableT to TermEnum without affecting the current api. It would allow things like foreach(var t in reader.Terms()). Dispose _will_ be called by a foreach statement if the IEnumeratorT implements IDisposable (not the IEnumerableT). However, the linq extension methods are

RE: [Lucene.Net] [jira] [Created] (LUCENENET-469) Convert Java Iterator classes to implement IEnumerableT

2012-06-08 Thread Digy
for a Lucene.Net.Extensions for the core. DIGY -Original Message- From: Andy Pook [mailto:andy.p...@gmail.com] Sent: Friday, June 08, 2012 10:26 PM To: lucene-net-dev@lucene.apache.org Subject: Re: [Lucene.Net] [jira] [Created] (LUCENENET-469) Convert Java Iterator classes to implement