lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [17/37] lucenenet git commit: Lucene.Net.Codecs.Bloom.BloomFilteringPostingsFormat.BloomFilteredFieldsProducer.BloomFilteredTermsEnum refactor: Delegate() > Delegate
Date Sun, 29 Jan 2017 13:27:39 GMT
Lucene.Net.Codecs.Bloom.BloomFilteringPostingsFormat.BloomFilteredFieldsProducer.BloomFilteredTermsEnum
refactor: Delegate() > Delegate


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/13ba9d33
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/13ba9d33
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/13ba9d33

Branch: refs/heads/api-work
Commit: 13ba9d33c83ae6c196044f8e4645810a8a1acd0f
Parents: 0ad5d6f
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Jan 29 15:31:09 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Jan 29 17:10:22 2017 +0700

----------------------------------------------------------------------
 .../Bloom/BloomFilteringPostingsFormat.cs       | 35 +++++++++++---------
 1 file changed, 19 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/13ba9d33/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
index 0da915d..6ef2c7a 100644
--- a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
@@ -313,18 +313,21 @@ namespace Lucene.Net.Codecs.Bloom
                     delegateTermsEnum = null;
                 }
 
-                private TermsEnum Delegate() // LUCENENET TODO: Make property
+                private TermsEnum Delegate
                 {
-                    // pull the iterator only if we really need it -
-                    // this can be a relativly heavy operation depending on the 
-                    // delegate postings format and they underlying directory
-                    // (clone IndexInput)
-                    return delegateTermsEnum ?? (delegateTermsEnum = _delegateTerms.GetIterator(_reuseDelegate));
+                    get
+                    {
+                        // pull the iterator only if we really need it -
+                        // this can be a relativly heavy operation depending on the 
+                        // delegate postings format and they underlying directory
+                        // (clone IndexInput)
+                        return delegateTermsEnum ?? (delegateTermsEnum = _delegateTerms.GetIterator(_reuseDelegate));
+                    }
                 }
 
                 public override sealed BytesRef Next()
                 {
-                    return Delegate().Next();
+                    return Delegate.Next();
                 }
 
                 public override sealed IComparer<BytesRef> Comparer
@@ -343,48 +346,48 @@ namespace Lucene.Net.Codecs.Bloom
                     {
                         return false;
                     }
-                    return Delegate().SeekExact(text);
+                    return Delegate.SeekExact(text);
                 }
 
                 public override sealed SeekStatus SeekCeil(BytesRef text)
                 {
-                    return Delegate().SeekCeil(text);
+                    return Delegate.SeekCeil(text);
                 }
 
                 public override sealed void SeekExact(long ord)
                 {
-                    Delegate().SeekExact(ord);
+                    Delegate.SeekExact(ord);
                 }
 
                 public override sealed BytesRef Term
                 {
-                    get { return Delegate().Term; }
+                    get { return Delegate.Term; }
                 }
 
                 public override sealed long Ord
                 {
-                    get { return Delegate().Ord; }
+                    get { return Delegate.Ord; }
                 }
 
                 public override sealed int DocFreq
                 {
-                    get { return Delegate().DocFreq; }
+                    get { return Delegate.DocFreq; }
                 }
 
                 public override sealed long TotalTermFreq
                 {
-                    get { return Delegate().TotalTermFreq; }
+                    get { return Delegate.TotalTermFreq; }
                 }
 
                 public override DocsAndPositionsEnum DocsAndPositions(IBits liveDocs,
                     DocsAndPositionsEnum reuse, int flags)
                 {
-                    return Delegate().DocsAndPositions(liveDocs, reuse, flags);
+                    return Delegate.DocsAndPositions(liveDocs, reuse, flags);
                 }
 
                 public override DocsEnum Docs(IBits liveDocs, DocsEnum reuse, int flags)
                 {
-                    return Delegate().Docs(liveDocs, reuse, flags);
+                    return Delegate.Docs(liveDocs, reuse, flags);
                 }
             }
 


Mime
View raw message