lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhern...@apache.org
Subject [1/3] git commit: add ICloneable interface and demo tests
Date Thu, 17 Jul 2014 00:16:27 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/pcl 31c7c2481 -> 745c136c3


add ICloneable interface and demo tests


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

Branch: refs/heads/pcl
Commit: 0a44fa09de0af62b2e6bc6809055c92b7abbc2dd
Parents: 31c7c24
Author: Michael Herndon <mherndon@michaelherndon.com>
Authored: Wed Jul 16 13:53:52 2014 -0700
Committer: Michael Herndon <mherndon@michaelherndon.com>
Committed: Wed Jul 16 13:53:52 2014 -0700

----------------------------------------------------------------------
 default.ruleset                                 |  69 ++++++++++
 src/Lucene.Net.Core/Lucene.Net.Core.csproj      |  15 ++-
 src/Lucene.Net.Core/Lucene.Net.Core.kproj       |  10 +-
 src/Lucene.Net.Core/Properties/AssemblyInfo.cs  |  30 +++++
 .../Support/DeepCloneNotSupportedException.cs   |  70 ++++++++++
 src/Lucene.Net.Core/Support/EnumUtil.cs         |   2 +-
 src/Lucene.Net.Core/Support/ICloneable.cs       |  52 ++++++++
 .../Support/SerializableAttribute.cs            |  20 +++
 .../ShallowCloneNotSupportedException.cs        |  70 ++++++++++
 .../Support/StringExtensionMethods.cs           |   2 +
 .../Support/SupportExtensionMethods.cs          |  42 ++++++
 src/Lucene.Net.Core/Util/Version.cs             |   1 +
 src/Lucene.Net.Core/default.ruleset             |  67 ++++++++++
 .../Lucene.Net.Core.Tests.csproj                |   8 +-
 .../Lucene.Net.Core.Tests.kproj                 |   9 +-
 .../Properties/AssemblyInfo.cs                  |  30 +++++
 .../Support/ICloneableTests.cs                  | 133 +++++++++++++++++++
 test/Lucene.Net.Core.Tests/Util/TestVersion.cs  |   2 +
 test/Lucene.Net.Core.Tests/default.ruleset      |  68 ++++++++++
 test/Lucene.Net.Core.Tests/default1.ruleset     |  68 ++++++++++
 .../Lucene.Net.TestFramework.csproj             |   6 +-
 .../Lucene.Net.TestFramework.kproj              |   4 +-
 .../Properties/AssemblyInfo.cs                  |  30 +++++
 .../Util/LuceneTestCase.cs                      |   3 -
 .../Util/TestAttribute.cs                       |   3 -
 25 files changed, 788 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/default.ruleset
----------------------------------------------------------------------
diff --git a/default.ruleset b/default.ruleset
new file mode 100644
index 0000000..b431a43
--- /dev/null
+++ b/default.ruleset
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RuleSet Name="Copy of Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. You should include this rule set in any custom rule set you create for your projects." ToolsVersion="14.0">
+  <Include Path="basiccorrectnessrules.ruleset" Action="Default" />
+  <Include Path="basicdesignguidelinerules.ruleset" Action="Default" />
+  <Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
+    <Rule Id="CA1001" Action="Warning" />
+    <Rule Id="CA1009" Action="Warning" />
+    <Rule Id="CA1016" Action="Warning" />
+    <Rule Id="CA1033" Action="Warning" />
+    <Rule Id="CA1049" Action="Warning" />
+    <Rule Id="CA1060" Action="Warning" />
+    <Rule Id="CA1061" Action="Warning" />
+    <Rule Id="CA1063" Action="Warning" />
+    <Rule Id="CA1065" Action="Warning" />
+    <Rule Id="CA1301" Action="Warning" />
+    <Rule Id="CA1400" Action="Warning" />
+    <Rule Id="CA1401" Action="Warning" />
+    <Rule Id="CA1403" Action="Warning" />
+    <Rule Id="CA1404" Action="Warning" />
+    <Rule Id="CA1405" Action="Warning" />
+    <Rule Id="CA1410" Action="Warning" />
+    <Rule Id="CA1415" Action="Warning" />
+    <Rule Id="CA1821" Action="Warning" />
+    <Rule Id="CA1900" Action="Warning" />
+    <Rule Id="CA1901" Action="Warning" />
+    <Rule Id="CA2002" Action="Warning" />
+    <Rule Id="CA2100" Action="Warning" />
+    <Rule Id="CA2101" Action="Warning" />
+    <Rule Id="CA2108" Action="Warning" />
+    <Rule Id="CA2111" Action="Warning" />
+    <Rule Id="CA2112" Action="Warning" />
+    <Rule Id="CA2114" Action="Warning" />
+    <Rule Id="CA2116" Action="Warning" />
+    <Rule Id="CA2117" Action="Warning" />
+    <Rule Id="CA2122" Action="Warning" />
+    <Rule Id="CA2123" Action="Warning" />
+    <Rule Id="CA2124" Action="Warning" />
+    <Rule Id="CA2126" Action="Warning" />
+    <Rule Id="CA2131" Action="Warning" />
+    <Rule Id="CA2132" Action="Warning" />
+    <Rule Id="CA2133" Action="Warning" />
+    <Rule Id="CA2134" Action="Warning" />
+    <Rule Id="CA2137" Action="Warning" />
+    <Rule Id="CA2138" Action="Warning" />
+    <Rule Id="CA2140" Action="Warning" />
+    <Rule Id="CA2141" Action="Warning" />
+    <Rule Id="CA2146" Action="Warning" />
+    <Rule Id="CA2147" Action="Warning" />
+    <Rule Id="CA2149" Action="Warning" />
+    <Rule Id="CA2200" Action="Warning" />
+    <Rule Id="CA2202" Action="Warning" />
+    <Rule Id="CA2207" Action="Warning" />
+    <Rule Id="CA2212" Action="Warning" />
+    <Rule Id="CA2213" Action="Warning" />
+    <Rule Id="CA2214" Action="Warning" />
+    <Rule Id="CA2216" Action="Warning" />
+    <Rule Id="CA2220" Action="Warning" />
+    <Rule Id="CA2229" Action="Warning" />
+    <Rule Id="CA2231" Action="Warning" />
+    <Rule Id="CA2232" Action="Warning" />
+    <Rule Id="CA2235" Action="Warning" />
+    <Rule Id="CA2236" Action="Warning" />
+    <Rule Id="CA2237" Action="Warning" />
+    <Rule Id="CA2238" Action="Warning" />
+    <Rule Id="CA2240" Action="Warning" />
+    <Rule Id="CA2241" Action="Warning" />
+    <Rule Id="CA2242" Action="Warning" />
+  </Rules>
+</RuleSet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/src/Lucene.Net.Core/Lucene.Net.Core.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Lucene.Net.Core.csproj b/src/Lucene.Net.Core/Lucene.Net.Core.csproj
index c057a67..f883f44 100644
--- a/src/Lucene.Net.Core/Lucene.Net.Core.csproj
+++ b/src/Lucene.Net.Core/Lucene.Net.Core.csproj
@@ -8,8 +8,8 @@
     <ProjectGuid>{AD8901C0-209D-4132-80AA-257DBACEECB4}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Lucene.Net.Core1</RootNamespace>
-    <AssemblyName>Lucene.Net.Core1</AssemblyName>
+    <RootNamespace>Lucene.Net</RootNamespace>
+    <AssemblyName>Lucene.Net.Core</AssemblyName>
     <DefaultLanguage>en-US</DefaultLanguage>
     <FileAlignment>512</FileAlignment>
     <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
@@ -21,7 +21,7 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DefineConstants>TRACE;DEBUG;PORTABLE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
@@ -38,6 +38,15 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Check.cs" />
+    <Compile Include="Support\DeepCloneNotSupportedException.cs" />
+    <Compile Include="Support\EnumUtil.cs" />
+    <Compile Include="Support\ICloneable.cs" />
+    <Compile Include="Support\SerializableAttribute.cs" />
+    <Compile Include="Support\ShallowCloneNotSupportedException.cs" />
+    <Compile Include="Support\StringExtensionMethods.cs" />
+    <Compile Include="Support\SupportExtensionMethods.cs" />
+    <Compile Include="Util\Version.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/src/Lucene.Net.Core/Lucene.Net.Core.kproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Lucene.Net.Core.kproj b/src/Lucene.Net.Core/Lucene.Net.Core.kproj
index 5043a64..d5c14b1 100644
--- a/src/Lucene.Net.Core/Lucene.Net.Core.kproj
+++ b/src/Lucene.Net.Core/Lucene.Net.Core.kproj
@@ -26,15 +26,19 @@
     <SchemaVersion>2.0</SchemaVersion>
   </PropertyGroup>
   <ItemGroup>
+    <Content Include="default.ruleset" />
     <Content Include="project.json" />
   </ItemGroup>
   <ItemGroup>
-    <Folder Include="Properties\" />
-  </ItemGroup>
-  <ItemGroup>
     <Compile Include="Check.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Support\DeepCloneNotSupportedException.cs" />
     <Compile Include="Support\EnumUtil.cs" />
+    <Compile Include="Support\ICloneable.cs" />
+    <Compile Include="Support\SerializableAttribute.cs" />
+    <Compile Include="Support\ShallowCloneNotSupportedException.cs" />
     <Compile Include="Support\StringExtensionMethods.cs" />
+    <Compile Include="Support\SupportExtensionMethods.cs" />
     <Compile Include="Util\Version.cs" />
   </ItemGroup>
   <Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.targets" Condition="'$(VSToolsPath)' != ''" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/src/Lucene.Net.Core/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Properties/AssemblyInfo.cs b/src/Lucene.Net.Core/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..fe2446e
--- /dev/null
+++ b/src/Lucene.Net.Core/Properties/AssemblyInfo.cs
@@ -0,0 +1,30 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+
+using System;
+using System.Reflection;
+
+
+[assembly: CLSCompliant(true)]
+#if PORTABLE
+    [assembly:AssemblyVersion("5.0.0.*")]
+#endif
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/src/Lucene.Net.Core/Support/DeepCloneNotSupportedException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/DeepCloneNotSupportedException.cs b/src/Lucene.Net.Core/Support/DeepCloneNotSupportedException.cs
new file mode 100644
index 0000000..fd2a940
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/DeepCloneNotSupportedException.cs
@@ -0,0 +1,70 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+namespace Lucene.Net.Support
+{
+    using System;
+
+    /// <summary>
+    /// Represents an error when a deep clone is not supported. 
+    /// </summary>
+    [Serializable]
+    public class DeepCloneNotSupportedException : NotSupportedException
+    {
+
+        /// <summary>
+        /// Initizalizes a new instance of <see cref="DeepCloneNotSupportedException"/> class.
+        /// </summary>
+        public DeepCloneNotSupportedException() { }
+
+        /// <summary>
+        /// Initizalizes a new instance of <see cref="DeepCloneNotSupportedException"/> class with the type that
+        /// does not support a deep clone. 
+        /// </summary>
+        /// <param name="type">The class type that does not allow deep clones.</param>
+        public DeepCloneNotSupportedException(Type type) : 
+            base(string.Format("{0} does support shallow clones. Use Clone(false) instead.", type.FullName))
+        {
+        }
+
+        /// <summary>
+        /// Initizalizes a new instance of <see cref="DeepCloneNotSupportedException"/> class with a specified message.
+        /// </summary>
+        /// <param name="message">A string that describes the error that is meant to be understood by humans.</param>
+        public DeepCloneNotSupportedException(string message) : base(message) { }
+
+        /// <summary>
+        /// Initizalizes a new instance of <see cref="DeepCloneNotSupportedException"/> class with a specified message and a 
+        /// reference to the inner exception that caused this exception.
+        /// </summary>
+        /// <param name="message">A string that describes the error that is meant to be understood by humans.</param>
+        /// <param name="inner">A reference to the exception that caused this one.</param>
+        public DeepCloneNotSupportedException(string message, Exception inner) : base(message, inner) { }
+
+#if !PORTABLE && !K10 
+        protected DeepCloneNotSupportedException(
+          System.Runtime.Serialization.SerializationInfo info,
+          System.Runtime.Serialization.StreamingContext context) : base(info, context)
+        { }
+#endif
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/src/Lucene.Net.Core/Support/EnumUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/EnumUtil.cs b/src/Lucene.Net.Core/Support/EnumUtil.cs
index 1ac7b12..4d1ed6b 100644
--- a/src/Lucene.Net.Core/Support/EnumUtil.cs
+++ b/src/Lucene.Net.Core/Support/EnumUtil.cs
@@ -36,7 +36,7 @@ namespace Lucene.Net
         /// <returns>Returns an IEnumerable&lt;T&gt; of enum values for type T.</returns>
         public static IList<T> ValuesOf<T>()
         {
-            // TODO: resource: put exception message in resource.
+            // TODO: 5.0 resource: put exception message in resource.
             if (!typeof(T).GetTypeInfo().IsEnum)
                 throw new ArgumentException("Type of T must be an enum");
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/src/Lucene.Net.Core/Support/ICloneable.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/ICloneable.cs b/src/Lucene.Net.Core/Support/ICloneable.cs
new file mode 100644
index 0000000..11f9179
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/ICloneable.cs
@@ -0,0 +1,52 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+namespace Lucene.Net.Support
+{
+    /// <summary>
+    /// Supports cloning, which creates a new instance of a class with the same value as an existing instance.
+    /// </summary>
+    /// <remarks>
+    ///     <para>
+    ///         This <see cref="System.ICloneable"/> interface is not supported in all versions of the .NET framework. This is 
+    ///         Microsoft BCL developer state that the interface does not inform users of the type of clone that is being performed. 
+    ///         <see href="http://blogs.msdn.com/b/brada/archive/2003/04/09/49935.aspx">Brad Abrams even suggests not to use it.</see>
+    ///     </para>
+    ///     <para>
+    ///         The Lucene code base makes heavy use of the Java equivelant of ICloneable in its public APIs. In order to help keep on 
+    ///         par with Lucene.Net's parent project and keep with design standards, the <see cref="ICloneable.Clone(bool)"/> method
+    ///         has a parameter that instructs the instance to make a deep clone when true.  If a deep or shallow clone is not supported,
+    ///         an exception must be thrown. 
+    ///     </para>
+    ///     <seealso cref="SupportExtensionMethods.CloneAndCast{T}(T, bool)"/>
+    /// </remarks>
+    public interface ICloneable
+    {
+        /// <summary>
+        /// Creates a new object that is a copy of the current instance.
+        /// </summary>
+        /// <param name="deepClone">Instructs the instance to create a deep copy when true.</param>
+        /// <returns>A clone of the current instance.</returns>
+        /// <exception cref="Lucene.Net.Support.ShallowCloneNotSupportedException">Thrown when a shallow clone is not supported.</exception>
+        /// <exception cref="Lucene.Net.Support.DeepCloneNotSupportedException">Thrown when a deep clone is not supported.</exception>
+        object Clone(bool deepClone);
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/src/Lucene.Net.Core/Support/SerializableAttribute.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/SerializableAttribute.cs b/src/Lucene.Net.Core/Support/SerializableAttribute.cs
new file mode 100644
index 0000000..de7401d
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/SerializableAttribute.cs
@@ -0,0 +1,20 @@
+
+
+namespace Lucene.Net.Support
+{
+    using System;
+
+#if PORTABLE || K10
+
+    /// <summary> 
+    ///  Indicates that a class can be serialized. This class cannot be inherited. 
+    ///  This is a placeholder for the SerializableAttribute that is not present in smaller
+    ///  version of the .NET framework.
+    /// <summary>
+    [AttributeUsage(AttributeTargets.Class)]
+    public sealed class SerializableAttribute : Attribute
+    {
+    }
+
+#endif 
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/src/Lucene.Net.Core/Support/ShallowCloneNotSupportedException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/ShallowCloneNotSupportedException.cs b/src/Lucene.Net.Core/Support/ShallowCloneNotSupportedException.cs
new file mode 100644
index 0000000..1b377d3
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/ShallowCloneNotSupportedException.cs
@@ -0,0 +1,70 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+namespace Lucene.Net.Support
+{
+    using System;
+
+    /// <summary>
+    /// Represents an error when a shallow clone is not supported. 
+    /// </summary>
+    [Serializable]
+    public class ShallowCloneNotSupportedException : NotSupportedException
+    {
+        /// <summary>
+        /// Initizalizes a new instance of <see cref="ShallowCloneNotSupportedException"/> class.
+        /// </summary>        
+        public ShallowCloneNotSupportedException() { }
+
+        /// <summary>
+        /// Initizalizes a new instance of <see cref="ShallowCloneNotSupportedException"/> class with the type
+        /// that does not allow shallow clones.
+        /// </summary>        
+        /// <param name="type">The class type that does not allow shallow clones.</param>
+        public ShallowCloneNotSupportedException(Type type) : 
+            base(string.Format("{0} does support shallow clones. Use Clone(true) instead.", type.FullName))
+        {
+
+        }
+
+        /// <summary>
+        /// Initizalizes a new instance of <see cref="ShallowCloneNotSupportedException"/> class with a specified message.
+        /// </summary>
+        /// <param name="message">A string that describes the error that is meant to be understood by humans.</param>
+        public ShallowCloneNotSupportedException(string message) : base(message) { }
+
+        /// <summary>
+        /// Initizalizes a new instance of <see cref="ShallowCloneNotSupportedException"/> class with a specified message and a 
+        /// reference to the inner exception that caused this exception.
+        /// </summary>
+        /// <param name="message">A string that describes the error that is meant to be understood by humans.</param>
+        /// <param name="inner">A reference to the exception that caused this one.</param>
+        public ShallowCloneNotSupportedException(string message, Exception inner) : base(message, inner) { }
+
+#if !PORTABLE && !K10
+        protected ShallowCloneNotSupportedException(
+          System.Runtime.Serialization.SerializationInfo info,
+          System.Runtime.Serialization.StreamingContext context) : base(info, context)
+        { }
+#endif
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/src/Lucene.Net.Core/Support/StringExtensionMethods.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/StringExtensionMethods.cs b/src/Lucene.Net.Core/Support/StringExtensionMethods.cs
index d2c6161..ca678ba 100644
--- a/src/Lucene.Net.Core/Support/StringExtensionMethods.cs
+++ b/src/Lucene.Net.Core/Support/StringExtensionMethods.cs
@@ -21,6 +21,7 @@
 
 namespace Lucene.Net.Support
 {
+    using System.Text;
     using System.Text.RegularExpressions;
 
     /// <summary>
@@ -28,6 +29,7 @@ namespace Lucene.Net.Support
     /// </summary>
     public static class StringExtensionMethods
     {
+
         /// <summary>
         /// Replaces the first substring of this string that matches the given regular expression with the given replacement.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/src/Lucene.Net.Core/Support/SupportExtensionMethods.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/SupportExtensionMethods.cs b/src/Lucene.Net.Core/Support/SupportExtensionMethods.cs
new file mode 100644
index 0000000..0c5f72c
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/SupportExtensionMethods.cs
@@ -0,0 +1,42 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+namespace Lucene.Net.Support
+{
+    /// <summary>
+    /// Summary description for SupportExtensionMethods
+    /// </summary>
+    public static class SupportExtensionMethods
+    {
+        /// <summary>
+        /// Clones and casts the new instance to the same type of the old instance. 
+        /// </summary>
+        /// <typeparam name="T">The Type that implements <see cref="Lucene.Net.Support.ICloneable"/></typeparam>
+        /// <param name="instance">The instance of type T that will be cloned.</param>
+        /// <param name="deepClone">Instructs instance to perform a deep clone when true.</param>
+        /// <returns>A new clone of type T</returns>
+        public static T CloneAndCast<T>(this T instance, bool deepClone = false) where T : ICloneable
+        {
+            Check.NotNull("instance", instance);
+
+            return (T)instance.Clone(deepClone);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/src/Lucene.Net.Core/Util/Version.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Version.cs b/src/Lucene.Net.Core/Util/Version.cs
index 0a6bdd5..32f2e31 100644
--- a/src/Lucene.Net.Core/Util/Version.cs
+++ b/src/Lucene.Net.Core/Util/Version.cs
@@ -39,6 +39,7 @@ namespace Lucene.Net.Util
     ///         Java <see href="https://github.com/apache/lucene-solr/blob/trunk/lucene/core/src/test/org/apache/lucene/util/TestVersion.java">Source</see>
     ///     </para>
     /// </remarks>
+    [Flags]
     public enum Version
     {
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/src/Lucene.Net.Core/default.ruleset
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/default.ruleset b/src/Lucene.Net.Core/default.ruleset
new file mode 100644
index 0000000..58581e6
--- /dev/null
+++ b/src/Lucene.Net.Core/default.ruleset
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RuleSet Name="Copy of Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. You should include this rule set in any custom rule set you create for your projects." ToolsVersion="14.0">
+  <Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
+    <Rule Id="CA1001" Action="Warning" />
+    <Rule Id="CA1009" Action="Warning" />
+    <Rule Id="CA1016" Action="Warning" />
+    <Rule Id="CA1033" Action="Warning" />
+    <Rule Id="CA1049" Action="Warning" />
+    <Rule Id="CA1060" Action="Warning" />
+    <Rule Id="CA1061" Action="Warning" />
+    <Rule Id="CA1063" Action="Warning" />
+    <Rule Id="CA1065" Action="Warning" />
+    <Rule Id="CA1301" Action="Warning" />
+    <Rule Id="CA1400" Action="Warning" />
+    <Rule Id="CA1401" Action="Warning" />
+    <Rule Id="CA1403" Action="Warning" />
+    <Rule Id="CA1404" Action="Warning" />
+    <Rule Id="CA1405" Action="Warning" />
+    <Rule Id="CA1410" Action="Warning" />
+    <Rule Id="CA1415" Action="Warning" />
+    <Rule Id="CA1821" Action="Warning" />
+    <Rule Id="CA1900" Action="Warning" />
+    <Rule Id="CA1901" Action="Warning" />
+    <Rule Id="CA2002" Action="Warning" />
+    <Rule Id="CA2100" Action="Warning" />
+    <Rule Id="CA2101" Action="Warning" />
+    <Rule Id="CA2108" Action="Warning" />
+    <Rule Id="CA2111" Action="Warning" />
+    <Rule Id="CA2112" Action="Warning" />
+    <Rule Id="CA2114" Action="Warning" />
+    <Rule Id="CA2116" Action="Warning" />
+    <Rule Id="CA2117" Action="Warning" />
+    <Rule Id="CA2122" Action="Warning" />
+    <Rule Id="CA2123" Action="Warning" />
+    <Rule Id="CA2124" Action="Warning" />
+    <Rule Id="CA2126" Action="Warning" />
+    <Rule Id="CA2131" Action="Warning" />
+    <Rule Id="CA2132" Action="Warning" />
+    <Rule Id="CA2133" Action="Warning" />
+    <Rule Id="CA2134" Action="Warning" />
+    <Rule Id="CA2137" Action="Warning" />
+    <Rule Id="CA2138" Action="Warning" />
+    <Rule Id="CA2140" Action="Warning" />
+    <Rule Id="CA2141" Action="Warning" />
+    <Rule Id="CA2146" Action="Warning" />
+    <Rule Id="CA2147" Action="Warning" />
+    <Rule Id="CA2149" Action="Warning" />
+    <Rule Id="CA2200" Action="Warning" />
+    <Rule Id="CA2202" Action="Warning" />
+    <Rule Id="CA2207" Action="Warning" />
+    <Rule Id="CA2212" Action="Warning" />
+    <Rule Id="CA2213" Action="Warning" />
+    <Rule Id="CA2214" Action="Warning" />
+    <Rule Id="CA2216" Action="Warning" />
+    <Rule Id="CA2220" Action="Warning" />
+    <Rule Id="CA2229" Action="Warning" />
+    <Rule Id="CA2231" Action="Warning" />
+    <Rule Id="CA2232" Action="Warning" />
+    <Rule Id="CA2235" Action="Warning" />
+    <Rule Id="CA2236" Action="Warning" />
+    <Rule Id="CA2237" Action="Warning" />
+    <Rule Id="CA2238" Action="Warning" />
+    <Rule Id="CA2240" Action="Warning" />
+    <Rule Id="CA2241" Action="Warning" />
+    <Rule Id="CA2242" Action="Warning" />
+  </Rules>
+</RuleSet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.csproj
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.csproj b/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.csproj
index 94460f0..ddb0f71 100644
--- a/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.csproj
+++ b/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.csproj
@@ -9,8 +9,8 @@
     <ProjectGuid>{C879C7A6-FBE5-4F22-B363-A4356C7B8E76}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Lucene.Net.Core1</RootNamespace>
-    <AssemblyName>Lucene.Net.Core1</AssemblyName>
+    <RootNamespace>Lucene.Net</RootNamespace>
+    <AssemblyName>Lucene.Net.Core.Tests</AssemblyName>
     <DefaultLanguage>en-US</DefaultLanguage>
     <FileAlignment>512</FileAlignment>
     <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
@@ -22,7 +22,7 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DefineConstants>TRACE;DEBUG;PORTABLE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
@@ -36,6 +36,8 @@
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Support\ICloneableTests.cs" />
+    <Compile Include="Util\TestVersion.cs" />
   </ItemGroup>
   <ItemGroup>
     <Reference Include="xunit.abstractions">

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.kproj
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.kproj b/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.kproj
index 37d7192..fa78bba 100644
--- a/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.kproj
+++ b/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.kproj
@@ -12,7 +12,7 @@
   <PropertyGroup Label="Globals">
     <ProjectGuid>46467889-dcdd-4e2b-b583-6aacce996eac</ProjectGuid>
     <OutputType>Library</OutputType>
-    <RootNamespace>Lucene.Net.Core.Tests</RootNamespace>
+    <RootNamespace>Lucene.Net</RootNamespace>
   </PropertyGroup>
   <PropertyGroup Condition="$(OutputType) == 'Console'">
     <DebuggerFlavor>ConsoleDebugger</DebuggerFlavor>
@@ -26,13 +26,14 @@
     <SchemaVersion>2.0</SchemaVersion>
   </PropertyGroup>
   <ItemGroup>
+    <Content Include="default.ruleset" />
+    <Content Include="default1.ruleset" />
     <Content Include="packages.config" />
     <Content Include="project.json" />
   </ItemGroup>
   <ItemGroup>
-    <Folder Include="Properties\" />
-  </ItemGroup>
-  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Support\ICloneableTests.cs" />
     <Compile Include="Util\TestVersion.cs" />
   </ItemGroup>
   <Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.targets" Condition="'$(VSToolsPath)' != ''" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/test/Lucene.Net.Core.Tests/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.Core.Tests/Properties/AssemblyInfo.cs b/test/Lucene.Net.Core.Tests/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..fe2446e
--- /dev/null
+++ b/test/Lucene.Net.Core.Tests/Properties/AssemblyInfo.cs
@@ -0,0 +1,30 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+
+using System;
+using System.Reflection;
+
+
+[assembly: CLSCompliant(true)]
+#if PORTABLE
+    [assembly:AssemblyVersion("5.0.0.*")]
+#endif
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/test/Lucene.Net.Core.Tests/Support/ICloneableTests.cs
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.Core.Tests/Support/ICloneableTests.cs b/test/Lucene.Net.Core.Tests/Support/ICloneableTests.cs
new file mode 100644
index 0000000..cd0eef6
--- /dev/null
+++ b/test/Lucene.Net.Core.Tests/Support/ICloneableTests.cs
@@ -0,0 +1,133 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+
+namespace Lucene.Net.Support
+{
+    using Lucene.Net.TestFramework;
+    using System;
+
+    /// <summary>
+    /// Demonstrates how to use Lucene.Net's ICloneable
+    /// </summary>
+    public class ICloneableTests : LuceneTestCase
+    {
+	    
+        [Test]
+        public void CloneShallow()
+        {
+            var shallow = new Imitation() { Name = "Original" };
+            var clone = shallow.CloneAndCast();
+
+            var namesAreSame = Object.ReferenceEquals(shallow.Name, clone.Name);
+            var referencesAreSame = Object.ReferenceEquals(shallow.Reference, clone.Reference);
+            var message = "The clone {0} property must reference the same object in a shallow clone.";
+
+            Ok(namesAreSame, message, "Name");
+            Ok(referencesAreSame, message, "Reference");
+
+            // When a deep clone is not supported, it should throw DeepCloneNotSupportedException.
+            Throws<DeepCloneNotSupportedException>(() => {
+                clone.CloneAndCast(true);
+            });
+        }
+
+        [Test]
+        public void DeepClone()
+        {
+            var shadow = new ShadowClone() { Name = "Knockoff" };
+            var clone = shadow.CloneAndCast(true);
+
+            var namesAreNotSame = !Object.ReferenceEquals(shadow.Name, clone.Name);
+            var referencesAreNotSame = !Object.ReferenceEquals(shadow.Name, clone.Name);
+            var message = "The clone {0} property must not reference the same object in a deep clone.";
+
+            Ok(namesAreNotSame, message, "Name");
+            Ok(referencesAreNotSame, message, "Reference");
+
+            Throws<ShallowCloneNotSupportedException>(() => {
+                clone.CloneAndCast(false);
+            });
+        }
+
+
+        private class ShadowClone : Lucene.Net.Support.ICloneable
+        {
+            public ShadowClone()
+            {
+                this.Reference = new Reference() { Id = 2 };
+            }
+
+            public string Name { get; set; }
+
+            public Reference Reference { get; set; }
+
+            public object Clone(bool deepClone = false)
+            {
+                if (!deepClone)
+                    throw new ShallowCloneNotSupportedException(this.GetType());
+
+                var name = this.Name;
+                if (name != null)
+                    name = new String(name.ToCharArray());
+
+                return new ShadowClone()
+                {
+                    Name = name,
+                    Reference = new Reference()
+                    {
+                        Id = this.Reference.Id
+                    }
+                };
+            }
+        }
+
+        private class Imitation : Lucene.Net.Support.ICloneable
+        {
+            public Imitation()
+            {
+                this.Reference = new Reference();
+            }
+
+            public string Name { get; set; }
+
+            public Reference Reference { get; set; }
+
+            public object Clone(bool deepClone = false)
+            {
+                if (deepClone)
+                    throw new DeepCloneNotSupportedException(this.GetType());
+
+                return this.MemberwiseClone(); 
+            }
+        }
+
+        private class Reference
+        {
+            public Reference()
+            {
+                this.Id = 1;
+            }
+
+            public int Id { get; set; }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/test/Lucene.Net.Core.Tests/Util/TestVersion.cs
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.Core.Tests/Util/TestVersion.cs b/test/Lucene.Net.Core.Tests/Util/TestVersion.cs
index fadf0a3..4bc5cb0 100644
--- a/test/Lucene.Net.Core.Tests/Util/TestVersion.cs
+++ b/test/Lucene.Net.Core.Tests/Util/TestVersion.cs
@@ -42,6 +42,7 @@ namespace Lucene.Net.Util
         {
 
             var values = EnumUtil.ValuesOf<Version>();
+
             foreach (Version v in values)
             {
                 Ok(Version.LUCENE_CURRENT.OnOrAfter(v), "LUCENE_CURRENT must be always onOrAfter(" + v + ")");
@@ -80,6 +81,7 @@ namespace Lucene.Net.Util
                 {
                     // Object.ReferenceEquals will not work for enums
                     var same = Enum.Equals(Version.LUCENE_CURRENT, version);
+
                     Ok(same, "Last constant must be LUCENE_CURRENT, version was {0}", name);
                 }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/test/Lucene.Net.Core.Tests/default.ruleset
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.Core.Tests/default.ruleset b/test/Lucene.Net.Core.Tests/default.ruleset
new file mode 100644
index 0000000..80f7fb6
--- /dev/null
+++ b/test/Lucene.Net.Core.Tests/default.ruleset
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RuleSet Name="Copy of Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. You should include this rule set in any custom rule set you create for your projects." ToolsVersion="14.0">
+  <Include Path="..\..\default.ruleset" Action="Default" />
+  <Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
+    <Rule Id="CA1001" Action="Warning" />
+    <Rule Id="CA1009" Action="Warning" />
+    <Rule Id="CA1016" Action="Warning" />
+    <Rule Id="CA1033" Action="Warning" />
+    <Rule Id="CA1049" Action="Warning" />
+    <Rule Id="CA1060" Action="Warning" />
+    <Rule Id="CA1061" Action="Warning" />
+    <Rule Id="CA1063" Action="Warning" />
+    <Rule Id="CA1065" Action="Warning" />
+    <Rule Id="CA1301" Action="Warning" />
+    <Rule Id="CA1400" Action="Warning" />
+    <Rule Id="CA1401" Action="Warning" />
+    <Rule Id="CA1403" Action="Warning" />
+    <Rule Id="CA1404" Action="Warning" />
+    <Rule Id="CA1405" Action="Warning" />
+    <Rule Id="CA1410" Action="Warning" />
+    <Rule Id="CA1415" Action="Warning" />
+    <Rule Id="CA1821" Action="Warning" />
+    <Rule Id="CA1900" Action="Warning" />
+    <Rule Id="CA1901" Action="Warning" />
+    <Rule Id="CA2002" Action="Warning" />
+    <Rule Id="CA2100" Action="Warning" />
+    <Rule Id="CA2101" Action="Warning" />
+    <Rule Id="CA2108" Action="Warning" />
+    <Rule Id="CA2111" Action="Warning" />
+    <Rule Id="CA2112" Action="Warning" />
+    <Rule Id="CA2114" Action="Warning" />
+    <Rule Id="CA2116" Action="Warning" />
+    <Rule Id="CA2117" Action="Warning" />
+    <Rule Id="CA2122" Action="Warning" />
+    <Rule Id="CA2123" Action="Warning" />
+    <Rule Id="CA2124" Action="Warning" />
+    <Rule Id="CA2126" Action="Warning" />
+    <Rule Id="CA2131" Action="Warning" />
+    <Rule Id="CA2132" Action="Warning" />
+    <Rule Id="CA2133" Action="Warning" />
+    <Rule Id="CA2134" Action="Warning" />
+    <Rule Id="CA2137" Action="Warning" />
+    <Rule Id="CA2138" Action="Warning" />
+    <Rule Id="CA2140" Action="Warning" />
+    <Rule Id="CA2141" Action="Warning" />
+    <Rule Id="CA2146" Action="Warning" />
+    <Rule Id="CA2147" Action="Warning" />
+    <Rule Id="CA2149" Action="Warning" />
+    <Rule Id="CA2200" Action="Warning" />
+    <Rule Id="CA2202" Action="Warning" />
+    <Rule Id="CA2207" Action="Warning" />
+    <Rule Id="CA2212" Action="Warning" />
+    <Rule Id="CA2213" Action="Warning" />
+    <Rule Id="CA2214" Action="Warning" />
+    <Rule Id="CA2216" Action="Warning" />
+    <Rule Id="CA2220" Action="Warning" />
+    <Rule Id="CA2229" Action="Warning" />
+    <Rule Id="CA2231" Action="Warning" />
+    <Rule Id="CA2232" Action="Warning" />
+    <Rule Id="CA2235" Action="Warning" />
+    <Rule Id="CA2236" Action="Warning" />
+    <Rule Id="CA2237" Action="Warning" />
+    <Rule Id="CA2238" Action="Warning" />
+    <Rule Id="CA2240" Action="Warning" />
+    <Rule Id="CA2241" Action="Warning" />
+    <Rule Id="CA2242" Action="Warning" />
+  </Rules>
+</RuleSet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/test/Lucene.Net.Core.Tests/default1.ruleset
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.Core.Tests/default1.ruleset b/test/Lucene.Net.Core.Tests/default1.ruleset
new file mode 100644
index 0000000..8017df0
--- /dev/null
+++ b/test/Lucene.Net.Core.Tests/default1.ruleset
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RuleSet Name="Copy of Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. You should include this rule set in any custom rule set you create for your projects." ToolsVersion="14.0">
+  <Include Path="default.ruleset" Action="Default" />
+  <Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
+    <Rule Id="CA1001" Action="Warning" />
+    <Rule Id="CA1009" Action="Warning" />
+    <Rule Id="CA1016" Action="Warning" />
+    <Rule Id="CA1033" Action="Warning" />
+    <Rule Id="CA1049" Action="Warning" />
+    <Rule Id="CA1060" Action="Warning" />
+    <Rule Id="CA1061" Action="Warning" />
+    <Rule Id="CA1063" Action="Warning" />
+    <Rule Id="CA1065" Action="Warning" />
+    <Rule Id="CA1301" Action="Warning" />
+    <Rule Id="CA1400" Action="Warning" />
+    <Rule Id="CA1401" Action="Warning" />
+    <Rule Id="CA1403" Action="Warning" />
+    <Rule Id="CA1404" Action="Warning" />
+    <Rule Id="CA1405" Action="Warning" />
+    <Rule Id="CA1410" Action="Warning" />
+    <Rule Id="CA1415" Action="Warning" />
+    <Rule Id="CA1821" Action="Warning" />
+    <Rule Id="CA1900" Action="Warning" />
+    <Rule Id="CA1901" Action="Warning" />
+    <Rule Id="CA2002" Action="Warning" />
+    <Rule Id="CA2100" Action="Warning" />
+    <Rule Id="CA2101" Action="Warning" />
+    <Rule Id="CA2108" Action="Warning" />
+    <Rule Id="CA2111" Action="Warning" />
+    <Rule Id="CA2112" Action="Warning" />
+    <Rule Id="CA2114" Action="Warning" />
+    <Rule Id="CA2116" Action="Warning" />
+    <Rule Id="CA2117" Action="Warning" />
+    <Rule Id="CA2122" Action="Warning" />
+    <Rule Id="CA2123" Action="Warning" />
+    <Rule Id="CA2124" Action="Warning" />
+    <Rule Id="CA2126" Action="Warning" />
+    <Rule Id="CA2131" Action="Warning" />
+    <Rule Id="CA2132" Action="Warning" />
+    <Rule Id="CA2133" Action="Warning" />
+    <Rule Id="CA2134" Action="Warning" />
+    <Rule Id="CA2137" Action="Warning" />
+    <Rule Id="CA2138" Action="Warning" />
+    <Rule Id="CA2140" Action="Warning" />
+    <Rule Id="CA2141" Action="Warning" />
+    <Rule Id="CA2146" Action="Warning" />
+    <Rule Id="CA2147" Action="Warning" />
+    <Rule Id="CA2149" Action="Warning" />
+    <Rule Id="CA2200" Action="Warning" />
+    <Rule Id="CA2202" Action="Warning" />
+    <Rule Id="CA2207" Action="Warning" />
+    <Rule Id="CA2212" Action="Warning" />
+    <Rule Id="CA2213" Action="Warning" />
+    <Rule Id="CA2214" Action="Warning" />
+    <Rule Id="CA2216" Action="Warning" />
+    <Rule Id="CA2220" Action="Warning" />
+    <Rule Id="CA2229" Action="Warning" />
+    <Rule Id="CA2231" Action="Warning" />
+    <Rule Id="CA2232" Action="Warning" />
+    <Rule Id="CA2235" Action="Warning" />
+    <Rule Id="CA2236" Action="Warning" />
+    <Rule Id="CA2237" Action="Warning" />
+    <Rule Id="CA2238" Action="Warning" />
+    <Rule Id="CA2240" Action="Warning" />
+    <Rule Id="CA2241" Action="Warning" />
+    <Rule Id="CA2242" Action="Warning" />
+  </Rules>
+</RuleSet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj b/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
index f495942..4afee87 100644
--- a/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
+++ b/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
@@ -9,8 +9,8 @@
     <ProjectGuid>{F0D68FEA-B118-43B6-B760-3FB75CDE766D}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Lucene.Net.Core1</RootNamespace>
-    <AssemblyName>Lucene.Net.Core1</AssemblyName>
+    <RootNamespace>Lucene.Net</RootNamespace>
+    <AssemblyName>Lucene.Net.TestFramework</AssemblyName>
     <DefaultLanguage>en-US</DefaultLanguage>
     <FileAlignment>512</FileAlignment>
     <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
@@ -22,7 +22,7 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DefineConstants>TRACE;DEBUG;PORTABLE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.kproj
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.kproj b/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.kproj
index 9e7146b..2743db0 100644
--- a/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.kproj
+++ b/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.kproj
@@ -30,11 +30,9 @@
     <Content Include="project.json" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Util\LuceneTestCase.cs" />
     <Compile Include="Util\TestAttribute.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <Folder Include="Properties\" />
-  </ItemGroup>
   <Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.targets" Condition="'$(VSToolsPath)' != ''" />
 </Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/test/Lucene.Net.TestFramework/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.TestFramework/Properties/AssemblyInfo.cs b/test/Lucene.Net.TestFramework/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..fe2446e
--- /dev/null
+++ b/test/Lucene.Net.TestFramework/Properties/AssemblyInfo.cs
@@ -0,0 +1,30 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+
+using System;
+using System.Reflection;
+
+
+[assembly: CLSCompliant(true)]
+#if PORTABLE
+    [assembly:AssemblyVersion("5.0.0.*")]
+#endif
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/test/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.TestFramework/Util/LuceneTestCase.cs b/test/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
index 1651305..1e78bd5 100644
--- a/test/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
+++ b/test/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
@@ -31,9 +31,6 @@ namespace Lucene.Net.TestFramework
     {
 	    public LuceneTestCase()
 	    {
-		    //
-		    // TODO: Add constructor logic here
-		    //
 	    }
 
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0a44fa09/test/Lucene.Net.TestFramework/Util/TestAttribute.cs
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.TestFramework/Util/TestAttribute.cs b/test/Lucene.Net.TestFramework/Util/TestAttribute.cs
index 12b3c50..f46af2b 100644
--- a/test/Lucene.Net.TestFramework/Util/TestAttribute.cs
+++ b/test/Lucene.Net.TestFramework/Util/TestAttribute.cs
@@ -38,9 +38,6 @@ namespace Lucene.Net.TestFramework
 
 	    public TestAttribute()
 	    {
-		    //
-		    // TODO: Add constructor logic here
-		    //
 	    }
     }
 }
\ No newline at end of file


Mime
View raw message