lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [33/33] lucenenet git commit: Fixed several issues to allow compile in .NET core.
Date Fri, 17 Mar 2017 22:29:03 GMT
Fixed several issues to allow compile in .NET core.


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

Branch: refs/heads/api-work
Commit: 6314c2478b365d5aa61141721e39b507094ef533
Parents: 9b08f31
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sat Mar 18 05:01:20 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sat Mar 18 05:01:20 2017 +0700

----------------------------------------------------------------------
 .../SimpleText/SimpleTextFieldInfosWriter.cs    |  6 +++---
 .../Codecs/Lucene40/Lucene40FieldInfosReader.cs |  4 ++--
 .../Codecs/Lucene40/Lucene40DocValuesWriter.cs  | 20 ++++++++++----------
 .../Util/VirtualMethod.cs                       |  3 +++
 src/Lucene.Net.TestFramework/project.json       |  1 -
 5 files changed, 18 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6314c247/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
index 7b8f6ee..75979c8 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
@@ -100,15 +100,15 @@ namespace Lucene.Net.Codecs.SimpleText
                     }
 
                     SimpleTextUtil.Write(output, STORETV);
-                    SimpleTextUtil.Write(output, CultureInfo.InvariantCulture.TextInfo.ToLower(fi.HasVectors.ToString(CultureInfo.InvariantCulture)),
scratch);
+                    SimpleTextUtil.Write(output, CultureInfo.InvariantCulture.TextInfo.ToLower(fi.HasVectors.ToString()),
scratch);
                     SimpleTextUtil.WriteNewline(output);
 
                     SimpleTextUtil.Write(output, PAYLOADS);
-                    SimpleTextUtil.Write(output, CultureInfo.InvariantCulture.TextInfo.ToLower(fi.HasPayloads.ToString(CultureInfo.InvariantCulture)),
scratch);
+                    SimpleTextUtil.Write(output, CultureInfo.InvariantCulture.TextInfo.ToLower(fi.HasPayloads.ToString()),
scratch);
                     SimpleTextUtil.WriteNewline(output);
 
                     SimpleTextUtil.Write(output, NORMS);
-                    SimpleTextUtil.Write(output, CultureInfo.InvariantCulture.TextInfo.ToLower((!fi.OmitsNorms).ToString(CultureInfo.InvariantCulture)),
scratch);
+                    SimpleTextUtil.Write(output, CultureInfo.InvariantCulture.TextInfo.ToLower((!fi.OmitsNorms).ToString()),
scratch);
                     SimpleTextUtil.WriteNewline(output);
 
                     SimpleTextUtil.Write(output, NORMS_TYPE);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6314c247/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40FieldInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40FieldInfosReader.cs b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40FieldInfosReader.cs
index 75070bb..4805a4b 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40FieldInfosReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40FieldInfosReader.cs
@@ -105,7 +105,7 @@ namespace Lucene.Net.Codecs.Lucene40
                     IDictionary<string, string> attributes = input.ReadStringStringMap();
                     if (oldValuesType.GetMapping() != DocValuesType.NONE)
                     {
-                        attributes[LEGACY_DV_TYPE_KEY] = oldValuesType.ToString(CultureInfo.InvariantCulture);
+                        attributes[LEGACY_DV_TYPE_KEY] = oldValuesType.ToString();
                     }
                     if (oldNormsType.GetMapping() != DocValuesType.NONE)
                     {
@@ -113,7 +113,7 @@ namespace Lucene.Net.Codecs.Lucene40
                         {
                             throw new CorruptIndexException("invalid norm type: " + oldNormsType
+ " (resource=" + input + ")");
                         }
-                        attributes[LEGACY_NORM_TYPE_KEY] = oldNormsType.ToString(CultureInfo.InvariantCulture);
+                        attributes[LEGACY_NORM_TYPE_KEY] = oldNormsType.ToString();
                     }
                     infos[i] = new FieldInfo(name, isIndexed, fieldNumber, storeTermVector,
omitNorms, storePayloads, indexOptions, oldValuesType.GetMapping(), oldNormsType.GetMapping(),
attributes);
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6314c247/src/Lucene.Net.TestFramework/Codecs/Lucene40/Lucene40DocValuesWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/Lucene40/Lucene40DocValuesWriter.cs b/src/Lucene.Net.TestFramework/Codecs/Lucene40/Lucene40DocValuesWriter.cs
index 324103c..d8e3ccd 100644
--- a/src/Lucene.Net.TestFramework/Codecs/Lucene40/Lucene40DocValuesWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/Lucene40/Lucene40DocValuesWriter.cs
@@ -104,7 +104,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
         private void AddBytesField(FieldInfo field, IndexOutput output, IEnumerable<long?>
values)
         {
-            field.PutAttribute(LegacyKey, LegacyDocValuesType.FIXED_INTS_8.ToString(CultureInfo.InvariantCulture));
+            field.PutAttribute(LegacyKey, LegacyDocValuesType.FIXED_INTS_8.ToString());
             CodecUtil.WriteHeader(output, Lucene40DocValuesFormat.INTS_CODEC_NAME, Lucene40DocValuesFormat.INTS_VERSION_CURRENT);
             output.WriteInt32(1); // size
             foreach (long? n in values)
@@ -115,7 +115,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
         private void AddShortsField(FieldInfo field, IndexOutput output, IEnumerable<long?>
values)
         {
-            field.PutAttribute(LegacyKey, LegacyDocValuesType.FIXED_INTS_16.ToString(CultureInfo.InvariantCulture));
+            field.PutAttribute(LegacyKey, LegacyDocValuesType.FIXED_INTS_16.ToString());
             CodecUtil.WriteHeader(output, Lucene40DocValuesFormat.INTS_CODEC_NAME, Lucene40DocValuesFormat.INTS_VERSION_CURRENT);
             output.WriteInt32(2); // size
             foreach (long? n in values)
@@ -126,7 +126,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
         private void AddIntsField(FieldInfo field, IndexOutput output, IEnumerable<long?>
values)
         {
-            field.PutAttribute(LegacyKey, LegacyDocValuesType.FIXED_INTS_32.ToString(CultureInfo.InvariantCulture));
+            field.PutAttribute(LegacyKey, LegacyDocValuesType.FIXED_INTS_32.ToString());
             CodecUtil.WriteHeader(output, Lucene40DocValuesFormat.INTS_CODEC_NAME, Lucene40DocValuesFormat.INTS_VERSION_CURRENT);
             output.WriteInt32(4); // size
             foreach (long? n in values)
@@ -137,7 +137,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
         private void AddVarIntsField(FieldInfo field, IndexOutput output, IEnumerable<long?>
values, long minValue, long maxValue)
         {
-            field.PutAttribute(LegacyKey, LegacyDocValuesType.VAR_INTS.ToString(CultureInfo.InvariantCulture));
+            field.PutAttribute(LegacyKey, LegacyDocValuesType.VAR_INTS.ToString());
 
             CodecUtil.WriteHeader(output, Lucene40DocValuesFormat.VAR_INTS_CODEC_NAME, Lucene40DocValuesFormat.VAR_INTS_VERSION_CURRENT);
 
@@ -298,7 +298,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
         private void AddFixedStraightBytesField(FieldInfo field, IndexOutput output, IEnumerable<BytesRef>
values, int length)
         {
-            field.PutAttribute(LegacyKey, LegacyDocValuesType.BYTES_FIXED_STRAIGHT.ToString(CultureInfo.InvariantCulture));
+            field.PutAttribute(LegacyKey, LegacyDocValuesType.BYTES_FIXED_STRAIGHT.ToString());
 
             CodecUtil.WriteHeader(output, Lucene40DocValuesFormat.BYTES_FIXED_STRAIGHT_CODEC_NAME,
Lucene40DocValuesFormat.BYTES_FIXED_STRAIGHT_VERSION_CURRENT);
 
@@ -315,7 +315,7 @@ namespace Lucene.Net.Codecs.Lucene40
         // NOTE: 4.0 file format docs are crazy/wrong here...
         private void AddVarStraightBytesField(FieldInfo field, IndexOutput data, IndexOutput
index, IEnumerable<BytesRef> values)
         {
-            field.PutAttribute(LegacyKey, LegacyDocValuesType.BYTES_VAR_STRAIGHT.ToString(CultureInfo.InvariantCulture));
+            field.PutAttribute(LegacyKey, LegacyDocValuesType.BYTES_VAR_STRAIGHT.ToString());
 
             CodecUtil.WriteHeader(data, Lucene40DocValuesFormat.BYTES_VAR_STRAIGHT_CODEC_NAME_DAT,
Lucene40DocValuesFormat.BYTES_VAR_STRAIGHT_VERSION_CURRENT);
 
@@ -359,7 +359,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
         private void AddFixedDerefBytesField(FieldInfo field, IndexOutput data, IndexOutput
index, IEnumerable<BytesRef> values, int length)
         {
-            field.PutAttribute(LegacyKey, LegacyDocValuesType.BYTES_FIXED_DEREF.ToString(CultureInfo.InvariantCulture));
+            field.PutAttribute(LegacyKey, LegacyDocValuesType.BYTES_FIXED_DEREF.ToString());
 
             CodecUtil.WriteHeader(data, Lucene40DocValuesFormat.BYTES_FIXED_DEREF_CODEC_NAME_DAT,
Lucene40DocValuesFormat.BYTES_FIXED_DEREF_VERSION_CURRENT);
 
@@ -404,7 +404,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
         private void AddVarDerefBytesField(FieldInfo field, IndexOutput data, IndexOutput
index, IEnumerable<BytesRef> values)
         {
-            field.PutAttribute(LegacyKey, LegacyDocValuesType.BYTES_VAR_DEREF.ToString(CultureInfo.InvariantCulture));
+            field.PutAttribute(LegacyKey, LegacyDocValuesType.BYTES_VAR_DEREF.ToString());
 
             CodecUtil.WriteHeader(data, Lucene40DocValuesFormat.BYTES_VAR_DEREF_CODEC_NAME_DAT,
Lucene40DocValuesFormat.BYTES_VAR_DEREF_VERSION_CURRENT);
 
@@ -531,7 +531,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
         private void AddFixedSortedBytesField(FieldInfo field, IndexOutput data, IndexOutput
index, IEnumerable<BytesRef> values, IEnumerable<long?> docToOrd, int length)
         {
-            field.PutAttribute(LegacyKey, LegacyDocValuesType.BYTES_FIXED_SORTED.ToString(CultureInfo.InvariantCulture));
+            field.PutAttribute(LegacyKey, LegacyDocValuesType.BYTES_FIXED_SORTED.ToString());
 
             CodecUtil.WriteHeader(data, Lucene40DocValuesFormat.BYTES_FIXED_SORTED_CODEC_NAME_DAT,
Lucene40DocValuesFormat.BYTES_FIXED_SORTED_VERSION_CURRENT);
 
@@ -562,7 +562,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
         private void AddVarSortedBytesField(FieldInfo field, IndexOutput data, IndexOutput
index, IEnumerable<BytesRef> values, IEnumerable<long?> docToOrd)
         {
-            field.PutAttribute(LegacyKey, LegacyDocValuesType.BYTES_VAR_SORTED.ToString(CultureInfo.InvariantCulture));
+            field.PutAttribute(LegacyKey, LegacyDocValuesType.BYTES_VAR_SORTED.ToString());
 
             CodecUtil.WriteHeader(data, Lucene40DocValuesFormat.BYTES_VAR_SORTED_CODEC_NAME_DAT,
Lucene40DocValuesFormat.BYTES_VAR_SORTED_VERSION_CURRENT);
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6314c247/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs b/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs
index 1a3095b..c85cf17 100644
--- a/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs
+++ b/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs
@@ -2,6 +2,9 @@ using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Globalization;
+#if NETSTANDARD
+using System.Linq;
+#endif
 using System.Reflection;
 
 namespace Lucene.Net.Util

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6314c247/src/Lucene.Net.TestFramework/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/project.json b/src/Lucene.Net.TestFramework/project.json
index d793f61..9fb5613 100644
--- a/src/Lucene.Net.TestFramework/project.json
+++ b/src/Lucene.Net.TestFramework/project.json
@@ -18,7 +18,6 @@
         "define": [ "FEATURE_STACKTRACE", "NETSTANDARD" ],
         "compile": {
           "excludeFiles": [
-            "Support/SystemProperties.cs",
             "Util/ApiScanTestBase.cs",
             "Util/AbstractBeforeAfterRule.cs",
             "Util/CloseableDirectory.cs",


Mime
View raw message