lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [28/58] lucenenet git commit: QueryParser.Flexible refactor: Changed IUniqueFieldAttribute to use a property instead of getter and setter. Changed accessiblity to match Java (since this is a demo).
Date Tue, 06 Dec 2016 15:12:03 GMT
QueryParser.Flexible refactor: Changed IUniqueFieldAttribute to use a property instead of getter
and setter. Changed accessiblity to match Java (since this is a demo).


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

Branch: refs/heads/master
Commit: 19d323c05fac63b1bd0bd87a9bef41d371e18588
Parents: e2b7290
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Dec 4 17:55:37 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Dec 4 22:00:55 2016 +0700

----------------------------------------------------------------------
 .../Flexible/Spans/SpanTermQueryNodeBuilder.cs           |  2 +-
 .../Flexible/Spans/UniqueFieldAttribute.cs               |  4 +---
 .../Flexible/Spans/UniqueFieldAttributeImpl.cs           | 11 +++--------
 3 files changed, 5 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/19d323c0/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/SpanTermQueryNodeBuilder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/SpanTermQueryNodeBuilder.cs b/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/SpanTermQueryNodeBuilder.cs
index e8868fe..cbaf27f 100644
--- a/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/SpanTermQueryNodeBuilder.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/SpanTermQueryNodeBuilder.cs
@@ -19,7 +19,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Spans
     public class SpanTermQueryNodeBuilder : IStandardQueryBuilder
     {
 
-        public Query Build(IQueryNode node)
+        public virtual Query Build(IQueryNode node)
         {
             FieldQueryNode fieldQueryNode = (FieldQueryNode)node;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/19d323c0/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/UniqueFieldAttribute.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/UniqueFieldAttribute.cs b/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/UniqueFieldAttribute.cs
index 5cc2628..67b9a8a 100644
--- a/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/UniqueFieldAttribute.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/UniqueFieldAttribute.cs
@@ -15,8 +15,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Spans
     /// <seealso cref="UniqueFieldQueryNodeProcessor"/>
     public interface IUniqueFieldAttribute : IAttribute
     {
-        void SetUniqueField(string uniqueField);
-
-        string GetUniqueField();
+        string UniqueField { get; set; }
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/19d323c0/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/UniqueFieldAttributeImpl.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/UniqueFieldAttributeImpl.cs b/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/UniqueFieldAttributeImpl.cs
index 1fc4fc6..23d3745 100644
--- a/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/UniqueFieldAttributeImpl.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Spans/UniqueFieldAttributeImpl.cs
@@ -29,15 +29,10 @@ namespace Lucene.Net.QueryParsers.Flexible.Spans
         }
 
 
-        public void SetUniqueField(string uniqueField)
+        public virtual string UniqueField
         {
-            this.uniqueField = uniqueField;
-        }
-
-
-        public string GetUniqueField()
-        {
-            return this.uniqueField;
+            get { return this.uniqueField; }
+            set { this.uniqueField = value; }
         }
 
 


Mime
View raw message