lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [27/37] lucenenet git commit: Lucene.Net.Codecs.Pulsing.PulsingPostingsReader.IPulsingEnumAttribute refactor: Changed Enums() > Enums and changed return type from Dictionary<PulsingPostingsReader, DocsEnum> > IDictionary<PulsingPostingsReader, DocsEnum>
Date Sun, 29 Jan 2017 13:27:49 GMT
Lucene.Net.Codecs.Pulsing.PulsingPostingsReader.IPulsingEnumAttribute refactor: Changed Enums()
> Enums and changed return type from Dictionary<PulsingPostingsReader, DocsEnum>
> IDictionary<PulsingPostingsReader, DocsEnum>


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

Branch: refs/heads/api-work
Commit: e65864e45af06e07fb8694ce46459c971eccd169
Parents: fd57852
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Jan 29 17:20:05 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Jan 29 17:20:05 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e65864e4/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
index 1e24672..7f64fab 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
@@ -664,7 +664,7 @@ namespace Lucene.Net.Codecs.Pulsing
 
             var atts = de.Attributes;
             DocsEnum result;
-            atts.AddAttribute<IPulsingEnumAttribute>().Enums().TryGetValue(this, out
result);
+            atts.AddAttribute<IPulsingEnumAttribute>().Enums.TryGetValue(this, out
result);
             return result;
         }
 
@@ -675,7 +675,7 @@ namespace Lucene.Net.Codecs.Pulsing
         private DocsEnum SetOther(DocsEnum de, DocsEnum other)
         {
             var atts = de.Attributes;
-            return atts.AddAttribute<IPulsingEnumAttribute>().Enums()[this] = other;
+            return atts.AddAttribute<IPulsingEnumAttribute>().Enums[this] = other;
         }
 
         ///<summary>
@@ -687,7 +687,7 @@ namespace Lucene.Net.Codecs.Pulsing
         /// </summary>
         public interface IPulsingEnumAttribute : IAttribute
         {
-            Dictionary<PulsingPostingsReader, DocsEnum> Enums(); // LUCENENET TODO:
Make property, change to IDictionary
+            IDictionary<PulsingPostingsReader, DocsEnum> Enums { get; }
         }
 
         /// <summary>
@@ -704,11 +704,11 @@ namespace Lucene.Net.Codecs.Pulsing
             // you don't reuse? and maybe pulsingPostingsReader should throw an exc if it
wraps
             // another pulsing, because this is just stupid and wasteful. 
             // we still have to be careful in case someone does Pulsing(Stomping(Pulsing(...
-            private readonly Dictionary<PulsingPostingsReader, DocsEnum> _enums = new
Dictionary<PulsingPostingsReader, DocsEnum>();
+            private readonly IDictionary<PulsingPostingsReader, DocsEnum> _enums =
new Dictionary<PulsingPostingsReader, DocsEnum>();
 
-            public Dictionary<PulsingPostingsReader, DocsEnum> Enums()
+            public IDictionary<PulsingPostingsReader, DocsEnum> Enums
             {
-                return _enums;
+                get { return _enums; }
             }
             public override void Clear()
             {


Mime
View raw message