Lucene.Net.Suggest: Removed unused files RectangularArrays.cs and 
StringHelperClass.cs


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

Branch: refs/heads/api-work
Commit: 658afaa480a9a9c17237b924404146e652352ae0
Parents: 19c150a
Author: Shad Storhaug <[email protected]>
Authored: Sat Apr 15 20:43:18 2017 +0700
Committer: Shad Storhaug <[email protected]>
Committed: Sat Apr 15 20:43:18 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Suggest/RectangularArrays.cs | 29 --------
 src/Lucene.Net.Suggest/StringHelperClass.cs | 90 ------------------------
 src/Lucene.Net.Suggest/project.json         |  8 ---
 3 files changed, 127 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/658afaa4/src/Lucene.Net.Suggest/RectangularArrays.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/RectangularArrays.cs 
b/src/Lucene.Net.Suggest/RectangularArrays.cs
deleted file mode 100644
index f0cb588..0000000
--- a/src/Lucene.Net.Suggest/RectangularArrays.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//----------------------------------------------------------------------------------------
-//     Copyright © 2007 - 2014 Tangible Software Solutions Inc.
-//     This class can be used by anyone provided that the copyright notice 
remains intact.
-//
-//     This class provides the logic to simulate Java rectangular arrays, 
which are jagged
-//     arrays with inner arrays of the same length. A size of -1 indicates 
unknown length.
-//----------------------------------------------------------------------------------------
-internal static partial class RectangularArrays
-{
-    internal static int[][] ReturnRectangularIntArray(int Size1, int Size2)
-    {
-        int[][] Array;
-        if (Size1 > -1)
-        {
-            Array = new int[Size1][];
-            if (Size2 > -1)
-            {
-                for (int Array1 = 0; Array1 < Size1; Array1++)
-                {
-                    Array[Array1] = new int[Size2];
-                }
-            }
-        }
-        else
-            Array = null;
-
-        return Array;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/658afaa4/src/Lucene.Net.Suggest/StringHelperClass.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/StringHelperClass.cs 
b/src/Lucene.Net.Suggest/StringHelperClass.cs
deleted file mode 100644
index 172a21e..0000000
--- a/src/Lucene.Net.Suggest/StringHelperClass.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-//-------------------------------------------------------------------------------------------
-//     Copyright © 2007 - 2014 Tangible Software Solutions Inc.
-//     This class can be used by anyone provided that the copyright notice 
remains intact.
-//
-//     This class is used to convert some aspects of the Java String class.
-//-------------------------------------------------------------------------------------------
-internal static class StringHelperClass
-{
-       
//----------------------------------------------------------------------------------
-       //      This method replaces the Java String.substring method when 
'start' is a
-       //      method call or calculated value to ensure that 'start' is 
obtained just once.
-       
//----------------------------------------------------------------------------------
-       internal static string SubstringSpecial(this string self, int start, 
int end)
-       {
-               return self.Substring(start, end - start);
-       }
-
-       
//------------------------------------------------------------------------------------
-       //      This method is used to replace calls to the 2-arg Java 
String.startsWith method.
-       
//------------------------------------------------------------------------------------
-       internal static bool StartsWith(this string self, string prefix, int 
toffset)
-       {
-               return self.IndexOf(prefix, toffset, 
System.StringComparison.Ordinal) == toffset;
-       }
-
-       
//------------------------------------------------------------------------------
-       //      This method is used to replace most calls to the Java 
String.split method.
-       
//------------------------------------------------------------------------------
-       internal static string[] Split(this string self, string regexDelimiter, 
bool trimTrailingEmptyStrings)
-       {
-               string[] splitArray = 
System.Text.RegularExpressions.Regex.Split(self, regexDelimiter);
-
-               if (trimTrailingEmptyStrings)
-               {
-                       if (splitArray.Length > 1)
-                       {
-                               for (int i = splitArray.Length; i > 0; i--)
-                               {
-                                       if (splitArray[i - 1].Length > 0)
-                                       {
-                                               if (i < splitArray.Length)
-                                                       System.Array.Resize(ref 
splitArray, i);
-
-                                               break;
-                                       }
-                               }
-                       }
-               }
-
-               return splitArray;
-       }
-
-       
//-----------------------------------------------------------------------------
-       //      These methods are used to replace calls to some Java String 
constructors.
-       
//-----------------------------------------------------------------------------
-       internal static string NewString(sbyte[] bytes)
-       {
-               return NewString(bytes, 0, bytes.Length);
-       }
-       internal static string NewString(sbyte[] bytes, int index, int count)
-       {
-               return 
System.Text.Encoding.UTF8.GetString((byte[])(object)bytes, index, count);
-       }
-       internal static string NewString(sbyte[] bytes, string encoding)
-       {
-               return NewString(bytes, 0, bytes.Length, encoding);
-       }
-       internal static string NewString(sbyte[] bytes, int index, int count, 
string encoding)
-       {
-               return 
System.Text.Encoding.GetEncoding(encoding).GetString((byte[])(object)bytes, 
index, count);
-       }
-
-       
//--------------------------------------------------------------------------------
-       //      These methods are used to replace calls to the Java 
String.getBytes methods.
-       
//--------------------------------------------------------------------------------
-       internal static sbyte[] GetBytes(this string self)
-       {
-               return GetSBytesForEncoding(System.Text.Encoding.UTF8, self);
-       }
-       internal static sbyte[] GetBytes(this string self, string encoding)
-       {
-               return 
GetSBytesForEncoding(System.Text.Encoding.GetEncoding(encoding), self);
-       }
-       private static sbyte[] GetSBytesForEncoding(System.Text.Encoding 
encoding, string s)
-       {
-               sbyte[] sbytes = new sbyte[encoding.GetByteCount(s)];
-               encoding.GetBytes(s, 0, s.Length, (byte[])(object)sbytes, 0);
-               return sbytes;
-       }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/658afaa4/src/Lucene.Net.Suggest/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/project.json 
b/src/Lucene.Net.Suggest/project.json
index 6206c85..a3a0fff 100644
--- a/src/Lucene.Net.Suggest/project.json
+++ b/src/Lucene.Net.Suggest/project.json
@@ -23,10 +23,6 @@
       "buildOptions": {
         "debugType": "portable",
         "compile": {
-          "excludeFiles": [
-            "RectangularArrays.cs",
-            "StringHelperClass.cs"
-          ],
           "includeFiles": [
             "../CommonAssemblyInfo.cs"
           ]
@@ -41,10 +37,6 @@
         "debugType": "portable",
         "define": [ "FEATURE_SERIALIZABLE" ],
         "compile": {
-          "excludeFiles": [
-            "RectangularArrays.cs",
-            "StringHelperClass.cs"
-          ],
           "includeFiles": [
             "../CommonAssemblyInfo.cs"
           ]

Reply via email to