You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by ma...@apache.org on 2015/11/24 20:31:33 UTC

[1/6] incubator-reef git commit: [REEF-979] Enable StyleCop.CSharp.SpacingRules and fix violations

Repository: incubator-reef
Updated Branches:
  refs/heads/master e7a560682 -> dd07dc3ef


http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/DoubleStreamingCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/DoubleStreamingCodec.cs b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/DoubleStreamingCodec.cs
index 6cca28f..2a2dd12 100644
--- a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/DoubleStreamingCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/DoubleStreamingCodec.cs
@@ -41,7 +41,7 @@ namespace Org.Apache.REEF.Wake.StreamingCodec.CommonStreamingCodecs
         /// Instantiate the class from the reader.
         /// </summary>
         /// <param name="reader">The reader from which to read</param>
-        ///<returns>The double read from the reader</returns>
+        /// <returns>The double read from the reader</returns>
         public double Read(IDataReader reader)
         {
             return reader.ReadDouble();
@@ -57,10 +57,10 @@ namespace Org.Apache.REEF.Wake.StreamingCodec.CommonStreamingCodecs
             writer.WriteDouble(obj);
         }
 
-        ///  <summary>
-        ///  Instantiate the class from the reader.
-        ///  </summary>
-        ///  <param name="reader">The reader from which to read</param>
+        /// <summary>
+        /// Instantiate the class from the reader.
+        /// </summary>
+        /// <param name="reader">The reader from which to read</param>
         /// <param name="token">Cancellation token</param>
         /// <returns>The double read from the reader</returns>
         public async Task<double> ReadAsync(IDataReader reader, CancellationToken token)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/FloatArrayStreamingCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/FloatArrayStreamingCodec.cs b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/FloatArrayStreamingCodec.cs
index 72b6140..06e7a07 100644
--- a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/FloatArrayStreamingCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/FloatArrayStreamingCodec.cs
@@ -42,11 +42,11 @@ namespace Org.Apache.REEF.Wake.StreamingCodec.CommonStreamingCodecs
         /// Instantiate the class from the reader.
         /// </summary>
         /// <param name="reader">The reader from which to read</param>
-        ///<returns>The float array read from the reader</returns>
+        /// <returns>The float array read from the reader</returns>
         public float[] Read(IDataReader reader)
         {
             int length = reader.ReadInt32();
-            byte[] buffer = new byte[sizeof(float)*length];
+            byte[] buffer = new byte[sizeof(float) * length];
             reader.Read(ref buffer, 0, buffer.Length);
             float[] floatArr = new float[length];
             Buffer.BlockCopy(buffer, 0, floatArr, 0, buffer.Length);
@@ -71,10 +71,10 @@ namespace Org.Apache.REEF.Wake.StreamingCodec.CommonStreamingCodecs
             writer.Write(buffer, 0, buffer.Length);
         }
 
-        ///  <summary>
-        ///  Instantiate the class from the reader.
-        ///  </summary>
-        ///  <param name="reader">The reader from which to read</param>
+        /// <summary>
+        /// Instantiate the class from the reader.
+        /// </summary>
+        /// <param name="reader">The reader from which to read</param>
         /// <param name="token">Cancellation token</param>
         /// <returns>The float array read from the reader</returns>
         public async Task<float[]> ReadAsync(IDataReader reader, CancellationToken token)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/FloatStreamingCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/FloatStreamingCodec.cs b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/FloatStreamingCodec.cs
index 7bc6215..4fcf175 100644
--- a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/FloatStreamingCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/FloatStreamingCodec.cs
@@ -41,7 +41,7 @@ namespace Org.Apache.REEF.Wake.StreamingCodec.CommonStreamingCodecs
         /// Instantiate the class from the reader.
         /// </summary>
         /// <param name="reader">The reader from which to read</param>
-        ///<returns>The float read from the reader</returns>
+        /// <returns>The float read from the reader</returns>
         public float Read(IDataReader reader)
         {
             return reader.ReadFloat();
@@ -57,10 +57,10 @@ namespace Org.Apache.REEF.Wake.StreamingCodec.CommonStreamingCodecs
             writer.WriteFloat(obj);
         }
 
-        ///  <summary>
-        ///  Instantiate the class from the reader.
-        ///  </summary>
-        ///  <param name="reader">The reader from which to read</param>
+        /// <summary>
+        /// Instantiate the class from the reader.
+        /// </summary>
+        /// <param name="reader">The reader from which to read</param>
         /// <param name="token">Cancellation token</param>
         /// <returns>The float read from the reader</returns>
         public async Task<float> ReadAsync(IDataReader reader, CancellationToken token)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/IntArrayStreamingCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/IntArrayStreamingCodec.cs b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/IntArrayStreamingCodec.cs
index 186cae0..86642a6 100644
--- a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/IntArrayStreamingCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/IntArrayStreamingCodec.cs
@@ -42,11 +42,11 @@ namespace Org.Apache.REEF.Wake.StreamingCodec.CommonStreamingCodecs
         /// Instantiate the class from the reader.
         /// </summary>
         /// <param name="reader">The reader from which to read</param>
-        ///<returns>The integer array read from the reader</returns>
+        /// <returns>The integer array read from the reader</returns>
         public int[] Read(IDataReader reader)
         {
             int length = reader.ReadInt32();
-            byte[] buffer = new byte[sizeof(int)*length];
+            byte[] buffer = new byte[sizeof(int) * length];
             reader.Read(ref buffer, 0, buffer.Length);
             int[] intArr = new int[length];
             Buffer.BlockCopy(buffer, 0, intArr, 0, buffer.Length);
@@ -71,10 +71,10 @@ namespace Org.Apache.REEF.Wake.StreamingCodec.CommonStreamingCodecs
             writer.Write(buffer, 0, buffer.Length);
         }
 
-        ///  <summary>
-        ///  Instantiate the class from the reader.
-        ///  </summary>
-        ///  <param name="reader">The reader from which to read</param>
+        /// <summary>
+        /// Instantiate the class from the reader.
+        /// </summary>
+        /// <param name="reader">The reader from which to read</param>
         /// <param name="token">Cancellation token</param>
         /// <returns>The integer array read from the reader</returns>
         public async Task<int[]> ReadAsync(IDataReader reader, CancellationToken token)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/IntStreamingCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/IntStreamingCodec.cs b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/IntStreamingCodec.cs
index 127dec6..48ac6d3 100644
--- a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/IntStreamingCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/IntStreamingCodec.cs
@@ -41,7 +41,7 @@ namespace Org.Apache.REEF.Wake.StreamingCodec.CommonStreamingCodecs
         /// Instantiate the class from the reader.
         /// </summary>
         /// <param name="reader">The reader from which to read</param>
-        ///<returns>The iinteger read from the reader</returns>
+        /// <returns>The integer read from the reader</returns>
         public int Read(IDataReader reader)
         {
             return reader.ReadInt32();
@@ -57,10 +57,10 @@ namespace Org.Apache.REEF.Wake.StreamingCodec.CommonStreamingCodecs
             writer.WriteInt32(obj);
         }
 
-        ///  <summary>
-        ///  Instantiate the class from the reader.
-        ///  </summary>
-        ///  <param name="reader">The reader from which to read</param>
+        /// <summary>
+        /// Instantiate the class from the reader.
+        /// </summary>
+        /// <param name="reader">The reader from which to read</param>
         /// <param name="token">Cancellation token</param>
         /// <returns>The integer read from the reader</returns>
         public async Task<int> ReadAsync(IDataReader reader, CancellationToken token)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/StringStreamingCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/StringStreamingCodec.cs b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/StringStreamingCodec.cs
index 8bbfb8e..b9c1244 100644
--- a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/StringStreamingCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/StringStreamingCodec.cs
@@ -41,7 +41,7 @@ namespace Org.Apache.REEF.Wake.StreamingCodec.CommonStreamingCodecs
         /// Instantiate the class from the reader.
         /// </summary>
         /// <param name="reader">The reader from which to read</param>
-        ///<returns>The string read from the reader</returns>
+        /// <returns>The string read from the reader</returns>
         public string Read(IDataReader reader)
         {
             return reader.ReadString();
@@ -57,10 +57,10 @@ namespace Org.Apache.REEF.Wake.StreamingCodec.CommonStreamingCodecs
             writer.WriteString(obj);
         }
 
-        ///  <summary>
-        ///  Instantiate the class from the reader.
-        ///  </summary>
-        ///  <param name="reader">The reader from which to read</param>
+        /// <summary>
+        /// Instantiate the class from the reader.
+        /// </summary>
+        /// <param name="reader">The reader from which to read</param>
         /// <param name="token">Cancellation token</param>
         /// <returns>The string read from the reader</returns>
         public async Task<string> ReadAsync(IDataReader reader, CancellationToken token)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/IStreamingCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/IStreamingCodec.cs b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/IStreamingCodec.cs
index 8eb1ce7..a2ea009 100644
--- a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/IStreamingCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/IStreamingCodec.cs
@@ -32,7 +32,7 @@ namespace Org.Apache.REEF.Wake.StreamingCodec
         /// Instantiate the class from the reader.
         /// </summary>
         /// <param name="reader">The reader from which to read</param>
-        ///<returns>The instance of type T read from the reader</returns>
+        /// <returns>The instance of type T read from the reader</returns>
         T Read(IDataReader reader);
 
         /// <summary>
@@ -42,10 +42,10 @@ namespace Org.Apache.REEF.Wake.StreamingCodec
         /// <param name="writer">The writer to which to write</param>
         void Write(T obj, IDataWriter writer);
 
-        ///  <summary>
-        ///  Instantiate the class from the reader.
-        ///  </summary>
-        ///  <param name="reader">The reader from which to read</param>
+        /// <summary>
+        /// Instantiate the class from the reader.
+        /// </summary>
+        /// <param name="reader">The reader from which to read</param>
         /// <param name="token">Cancellation token</param>
         /// <returns>The instance of type T read from the reader</returns>
         Task<T> ReadAsync(IDataReader reader, CancellationToken token);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RuntimeClock.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RuntimeClock.cs b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RuntimeClock.cs
index 48f7388..a9716fc 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RuntimeClock.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RuntimeClock.cs
@@ -242,7 +242,7 @@ namespace Org.Apache.REEF.Wake.Time.Runtime
         {
             if (time is Alarm)
             {
-                Alarm alarm = (Alarm) time;
+                Alarm alarm = (Alarm)time;
                 alarm.Handle();
             }
             else

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Settings.StyleCop
----------------------------------------------------------------------
diff --git a/lang/cs/Settings.StyleCop b/lang/cs/Settings.StyleCop
index 1e351b5..a1f105d 100644
--- a/lang/cs/Settings.StyleCop
+++ b/lang/cs/Settings.StyleCop
@@ -682,146 +682,146 @@ under the License.
       <Rules>
         <Rule Name="KeywordsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="CommasMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="SemicolonsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="SymbolsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="DocumentationLinesMustBeginWithSingleSpace">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="SingleLineCommentsMustBeginWithSingleSpace">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="PreprocessorKeywordsMustNotBePrecededBySpace">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="OperatorKeywordMustBeFollowedBySpace">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="OpeningParenthesisMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="ClosingParenthesisMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="OpeningSquareBracketsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="ClosingSquareBracketsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="OpeningCurlyBracketsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="ClosingCurlyBracketsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="OpeningGenericBracketsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="ClosingGenericBracketsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="OpeningAttributeBracketsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="ClosingAttributeBracketsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="NullableTypeSymbolsMustNotBePrecededBySpace">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="MemberAccessSymbolsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="IncrementDecrementSymbolsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="NegativeSignsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="PositiveSignsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="DereferenceAndAccessOfSymbolsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="ColonsMustBeSpacedCorrectly">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="CodeMustNotContainMultipleWhitespaceInARow">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocation">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
         <Rule Name="TabsMustNotBeUsed">
           <RuleSettings>
-            <BooleanProperty Name="Enabled">False</BooleanProperty>
+            <BooleanProperty Name="Enabled">True</BooleanProperty>
           </RuleSettings>
         </Rule>
       </Rules>
       <AnalyzerSettings />
     </Analyzer>
   </Analyzers>
-</StyleCopSettings>
\ No newline at end of file
+</StyleCopSettings>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/build.props
----------------------------------------------------------------------
diff --git a/lang/cs/build.props b/lang/cs/build.props
index 197c297..86b9711 100644
--- a/lang/cs/build.props
+++ b/lang/cs/build.props
@@ -28,6 +28,7 @@ under the License.
     <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
     <SignAssembly>true</SignAssembly>
     <AssemblyOriginatorKeyFile>$(SolutionDir)\keyfile.snk</AssemblyOriginatorKeyFile>
+    <StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings>
   </PropertyGroup>
 
   <!-- Common build configurations -->
@@ -141,7 +142,6 @@ under the License.
       DestinationFiles="@(MySourceFiles->'$(TargetDir)%(Filename)%(Extension)')"
     />
   </Target>
-  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
     <ItemGroup>
         <DirectoriesToRemove Include="$(IntermediateOutputPath)" />
      </ItemGroup>


[2/6] incubator-reef git commit: [REEF-979] Enable StyleCop.CSharp.SpacingRules and fix violations

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/CsConfigurationBuilderImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/CsConfigurationBuilderImpl.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/CsConfigurationBuilderImpl.cs
index ed36b3c..6698006 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/CsConfigurationBuilderImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/CsConfigurationBuilderImpl.cs
@@ -34,7 +34,8 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
         private static readonly Logger LOGGER = Logger.GetLogger(typeof(CsConfigurationBuilderImpl));
 
         #region Constructors
-        public CsConfigurationBuilderImpl(string[] assemblies, IConfiguration[] confs, Type[] parsers) : base(assemblies,confs,parsers)
+        public CsConfigurationBuilderImpl(string[] assemblies, IConfiguration[] confs, Type[] parsers)
+            : base(assemblies, confs, parsers)
         {
         }
 
@@ -74,7 +75,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
         /// <param name="value">The value.</param>
         /// <returns></returns>
         /// <exception cref="BindException">Detected type mismatch when setting named parameter  + name
-        ///                     +   Expected NamedParameterNode, but namespace contains a  + np</exception>
+        /// + Expected NamedParameterNode, but namespace contains a  + np</exception>
         public ICsConfigurationBuilder BindNamedParameter(Type name, string value)
         {
             if (value == null)
@@ -183,7 +184,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
             return ((ICsInternalConfigurationBuilder)this).BindConstructor(typeof(T), typeof(U));
         }
 
-        //public <T> void bindSetEntry(Class<? extends Name<Set<T>>> iface, String value) throws BindException;
+        // public <T> void bindSetEntry(Class<? extends Name<Set<T>>> iface, String value) throws BindException;
         /// <summary>
         /// Binds a string value to a named parameter of ISet.
         /// </summary>
@@ -198,7 +199,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
             return ((ICsInternalConfigurationBuilder)this).BindSetEntry(typeof(U), value);
         }
 
-        //public <T> void bindSetEntry(Class<? extends Name<Set<T>>> iface, Class<? extends T> impl) throws BindException;
+        // public <T> void bindSetEntry(Class<? extends Name<Set<T>>> iface, Class<? extends T> impl) throws BindException;
         /// <summary>
         /// Binds an implementation of T to a named parameter of ISet of T.
         /// </summary>
@@ -294,7 +295,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
         /// <param name="impl">The impl.</param>
         /// <returns></returns>
         /// <exception cref="BindException">Type mismatch when setting named parameter  + ifaceN
-        ///                     +  Expected NamedParameterNode</exception>
+        /// +  Expected NamedParameterNode</exception>
         ICsInternalConfigurationBuilder ICsInternalConfigurationBuilder.BindNamedParameter(Type iface, Type impl)
         {
             INode ifaceN = GetNode(iface);
@@ -309,7 +310,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
             return this;
         }
 
-        //public <T> void bindSetEntry(Class<? extends Name<Set<T>>> iface, String value) throws BindException;
+        // public <T> void bindSetEntry(Class<? extends Name<Set<T>>> iface, String value) throws BindException;
         /// <summary>
         /// Binds a string value to to a named parameter of ISet entry
         /// </summary>
@@ -328,18 +329,18 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
             }
             Type setType = ReflectionUtilities.GetInterfaceTarget(typeof(Name<>), iface);
 
-            //check if setType is ISet
+            // check if setType is ISet
             if (ReflectionUtilities.GetInterfaceTarget(typeof(ISet<>), setType) == null)
             {
                 var ex = new BindException("BindSetEntry got a NamedParameter that takes a " + setType + "; expected Set<...>");
                 Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(ex, LOGGER);
             }
-            //    Type valType = ReflectionUtilities.getInterfaceTarget(Set.class, setType);
+            // Type valType = ReflectionUtilities.getInterfaceTarget(Set.class, setType);
             BindSetEntry((INamedParameterNode)n, value);
             return this;
         }
 
-        //public <T> void bindSetEntry(Class<? extends Name<Set<T>>> iface, Class<? extends T> impl) throws BindException;
+        // public <T> void bindSetEntry(Class<? extends Name<Set<T>>> iface, Class<? extends T> impl) throws BindException;
         /// <summary>
         /// Binds an implementation to a named parameter of ISet entry.
         /// </summary>
@@ -359,7 +360,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
             }
             Type setType = ReflectionUtilities.GetInterfaceTarget(typeof(Name<>), iface);
 
-            //if (!ReflectionUtilities.GetRawClass(setType).Equals(typeof(ISet<>)))
+            // if (!ReflectionUtilities.GetRawClass(setType).Equals(typeof(ISet<>)))
             if (!ReflectionUtilities.IsGenericTypeof(typeof(ISet<>), setType))
             {
                 var ex = new BindException("BindSetEntry got a NamedParameter that takes a " + setType + "; expected Set<...>");
@@ -369,7 +370,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
             Type valType = ReflectionUtilities.GetInterfaceTarget(typeof(ISet<>), setType);
 
             if (!valType.IsAssignableFrom(impl))
-            //if (!ReflectionUtilities.GetRawClass(valType).IsAssignableFrom(impl))
+            // if (!ReflectionUtilities.GetRawClass(valType).IsAssignableFrom(impl))
             {
                 var ex = new BindException("BindSetEntry got implementation " + impl + " that is incompatible with expected type " + valType);
                 Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(ex, LOGGER);
@@ -400,7 +401,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
             return this;
         }
 
-        //public <T> void bindConstructor(Class<T> c, Class<? extends ExternalConstructor<? extends T>> v) throws BindException;
+        // public <T> void bindConstructor(Class<T> c, Class<? extends ExternalConstructor<? extends T>> v) throws BindException;
         /// <summary>
         /// Binds an external constructor.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Constructor.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Constructor.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Constructor.cs
index 9e8c71b..a8a90a5 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Constructor.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Constructor.cs
@@ -27,13 +27,13 @@ using Org.Apache.REEF.Utilities.Logging;
 
 namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
 {
-    //Base case for an injection plan. A plan for a class. 
+    // Base case for an injection plan. A plan for a class. 
     public class Constructor : InjectionPlan
     {
         private static readonly Logger LOGGER = Logger.GetLogger(typeof(Constructor));
 
-        readonly IConstructorDef constructor;  //which constructor to use
-        readonly InjectionPlan[] args; //constructor arguments in which we already got injectionPlan for each (nested cases)
+        readonly IConstructorDef constructor; // which constructor to use
+        readonly InjectionPlan[] args; // constructor arguments in which we already got injectionPlan for each (nested cases)
         readonly int numAlternatives;
         readonly bool isAmbiguous;
         readonly bool isInjectable;
@@ -74,7 +74,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
 
         public new IClassNode GetNode() 
         {
-            return (IClassNode) node;
+            return (IClassNode)node;
         }
 
         public override int GetNumAlternatives() 
@@ -202,16 +202,16 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             return false;
         }
 
-        //public override bool HasFutureDependency() 
-        //{
-        //    foreach (InjectionPlan p in args) 
-        //    {
-        //        if(p.HasFutureDependency()) 
-        //        {
-        //            return true;
-        //        }
-        //    }
-        //    return false;
-        //}
+        ////public override bool HasFutureDependency() 
+        ////{
+        ////   foreach (InjectionPlan p in args) 
+        ////   {
+        ////       if(p.HasFutureDependency()) 
+        ////       {
+        ////           return true;
+        ////       }
+        ////   }
+        ////   return false;
+        ////}
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/CsInstance.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/CsInstance.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/CsInstance.cs
index e14aa64..86940de 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/CsInstance.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/CsInstance.cs
@@ -57,10 +57,10 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             return instance.ToString();
         }
 
-        //public override bool HasFutureDependency()
-        //{
-        //    return false;
-        //}
+        ////public override bool HasFutureDependency()
+        ////{
+        ////    return false;
+        ////}
 
         public override string ToAmbiguousInjectString()
         {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionFuture.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionFuture.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionFuture.cs
index 445225b..22b260c 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionFuture.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionFuture.cs
@@ -33,15 +33,15 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
     public class InjectionFutureImpl<T> : IInjectionFuture<T>
     {
         protected readonly InjectorImpl injector;
-        private readonly Type iface; //entend from T
+        private readonly Type iface; // entend from T
         private readonly T instance; 
 
-        //public InjectionFuture()
-        //{
-        //    injector = null;
-        //    iface = null;
-        //    instance = null;
-        //}
+        ////public InjectionFuture()
+        ////{
+        ////   injector = null;
+        ////   iface = null;
+        ////   instance = null;
+        ////}
 
         public InjectionFutureImpl(IInjector injector, Type iface) 
         {
@@ -57,25 +57,25 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             this.instance = instance;
         }
 
-        //public bool Cancel(bool mayInterruptIfRunning) 
-        //{
-        //    return false;
-        //}
+        ////public bool Cancel(bool mayInterruptIfRunning) 
+        ////{
+        ////    return false;
+        ////}
 
-        //public bool IsCancelled()
-        //{
-        //    return false;
-        //}
+        ////public bool IsCancelled()
+        ////{
+        ////   return false;
+        ////}
 
-        //public bool IsDone()
-        //{
-        //    return true;
-        //}
+        ////public bool IsDone()
+        ////{
+        ////   return true;
+        ////}
 
         public T Get() 
         {
             if (instance != null) return instance;
-            lock(injector) 
+            lock (injector) 
             {
                 T t;
                 if (ReflectionUtilities.IsAssignableFromIgnoreGeneric(typeof(Name<>), iface))
@@ -87,7 +87,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
                     t = (T)injector.GetInstance(iface);
                 }
                 Aspect a = injector.GetAspect();
-                if(a != null) 
+                if (a != null) 
                 {
                     a.InjectionFutureInstantiated(this, t);
                 }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionFuturePlan.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionFuturePlan.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionFuturePlan.cs
index fcd969a..5a95232 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionFuturePlan.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionFuturePlan.cs
@@ -27,7 +27,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
     {
         private static readonly Logger LOGGER = Logger.GetLogger(typeof(InjectionFuturePlan));
 
-        public InjectionFuturePlan(INode name) : base (name)
+        public InjectionFuturePlan(INode name) : base(name)
         {
         }
 
@@ -46,10 +46,10 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             return true;
         }
 
-        //public override bool HasFutureDependency()
-        //{
-        //    return true;
-        //}
+        ////public override bool HasFutureDependency()
+        ////{
+        ////   return true;
+        ////}
 
         public override string ToAmbiguousInjectString()
         {
@@ -68,7 +68,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
 
         public override string ToShallowString()
         {
-            return "InjectionFuture<"+GetNode().GetFullName()+">";
+            return "InjectionFuture<" + GetNode().GetFullName() + ">";
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionPlan.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionPlan.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionPlan.cs
index 82503e8..baf4502 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionPlan.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionPlan.cs
@@ -25,7 +25,7 @@ using Org.Apache.REEF.Utilities.Logging;
 
 namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
 {
-    //contains the data for injecting a Node such as which Constructor to use, what are the arguments
+    // contains the data for injecting a Node such as which Constructor to use, what are the arguments
     public abstract class InjectionPlan : ITraversable<InjectionPlan> 
     {
         protected INode node;
@@ -62,7 +62,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
 
         abstract public bool IsInjectable();
 
-        //abstract public bool HasFutureDependency();
+        // abstract public bool HasFutureDependency();
 
         protected void pad(StringBuilder sb, int n)
         {
@@ -195,10 +195,10 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             throw new NotSupportedException();
         }
 
-        //public override bool HasFutureDependency()
-        //{
-        //    throw new NotSupportedException();
-        //}
+        ////public override bool HasFutureDependency()
+        ////{
+        ////    throw new NotSupportedException();
+        ////}
 
         public override string ToAmbiguousInjectString()
         {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectorImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectorImpl.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectorImpl.cs
index 67e22b1..cfd179e 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectorImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectorImpl.cs
@@ -44,7 +44,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
         private Aspect aspect;
         private readonly ISet<IInjectionFuture<object>> pendingFutures = new HashSet<IInjectionFuture<object>>();
 
-        static readonly InjectionPlan BUILDING = new BuildingInjectionPlan(null); //TODO anonymous class
+        static readonly InjectionPlan BUILDING = new BuildingInjectionPlan(null); // TODO anonymous class
 
 
         private bool concurrentModificationGuard = false;
@@ -53,8 +53,8 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
         {
             if (concurrentModificationGuard)
             {
-                //TODO
-                //throw new ConcurrentModificationException("Detected attempt to use Injector from within an injected constructor!");
+                // TODO
+                // throw new ConcurrentModificationException("Detected attempt to use Injector from within an injected constructor!");
             }
         }
         public InjectorImpl(IConfiguration c)
@@ -99,7 +99,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
                         t = classHierarchy.ClassForName(nn.GetFullArgName());
                         if (nn.IsSet())
                         {
-                            t = typeof (ISet<>).MakeGenericType(new Type[] {t});
+                            t = typeof(ISet<>).MakeGenericType(new Type[] { t });
                         }
                     }
                     else
@@ -108,14 +108,14 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
                         Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(ex, LOGGER);
                     }
                     
-                    //Java - InjectionFuture<?> ret = new InjectionFuture<>(this, javaNamespace.classForName(fut.getNode().getFullName()));
-                    //C# - InjectionFuture<object> ret = new InjectionFutureImpl<object>(this, classHierarchy.ClassForName(fut.GetNode().GetFullName()));
-                    //We cannot simply create an object from generic with object as <T>
-                    //typeof(InjectionFutureImpl<>).MakeGenericType(t) will get the InjectionFutureImpl generic Type with <T> as t 
-                    //for ClassNode, t is the Type of the class, for NamedParameterNode, t is the Type of the argument
-                    //we then use reflection to invoke the constructor
-                    //To retain generic argument information??                   
-                    Type injectionFuture = typeof (InjectionFutureImpl<>).MakeGenericType(t);
+                    // Java - InjectionFuture<?> ret = new InjectionFuture<>(this, javaNamespace.classForName(fut.getNode().getFullName()));
+                    // C# - InjectionFuture<object> ret = new InjectionFutureImpl<object>(this, classHierarchy.ClassForName(fut.GetNode().GetFullName()));
+                    // We cannot simply create an object from generic with object as <T>
+                    // typeof(InjectionFutureImpl<>).MakeGenericType(t) will get the InjectionFutureImpl generic Type with <T> as t 
+                    // for ClassNode, t is the Type of the class, for NamedParameterNode, t is the Type of the argument
+                    // we then use reflection to invoke the constructor
+                    // To retain generic argument information??                   
+                    Type injectionFuture = typeof(InjectionFutureImpl<>).MakeGenericType(t);
                     var constructor = injectionFuture.GetConstructor(new Type[] { typeof(IInjector), typeof(Type) });
                     IInjectionFuture<object> ret = (IInjectionFuture<object>)constructor.Invoke(new object[] { this, nodeType }); 
 
@@ -135,7 +135,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             else if (plan is CsInstance)
             {
                 // TODO: Must be named parameter node.  Check.
-                //      throw new IllegalStateException("Instance from plan not in Injector's set of instances?!?");
+                // throw new IllegalStateException("Instance from plan not in Injector's set of instances?!?");
                 return ((CsInstance)plan).instance;
             }
             else if (plan is Constructor)
@@ -227,14 +227,14 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
                 // Get constructor: MonotonicHashSet<int> -> public MonotonicHashSet<int>() { ... }
                 // Invoke: public MonotonicHashSet<int> -> new MonotonicHashSet<int>()
 
-                object ret = typeof(MonotonicHashSet<>).MakeGenericType(t).GetConstructor(new Type[] { }).Invoke(new object[] { }); //(this, classHierarchy.ClassForName(fut.GetNode().GetFullName()));
+                object ret = typeof(MonotonicHashSet<>).MakeGenericType(t).GetConstructor(new Type[] { }).Invoke(new object[] { }); // (this, classHierarchy.ClassForName(fut.GetNode().GetFullName()));
 
                 MethodInfo mf = ret.GetType().GetMethod("Add");
 
                 foreach (InjectionPlan subplan in setPlan.GetEntryPlans())
                 {
-//                    ret.Add(InjectFromPlan(subplan));
-                    mf.Invoke(ret, new object[] {InjectFromPlan(subplan)});
+                    // ret.Add(InjectFromPlan(subplan));
+                    mf.Invoke(ret, new object[] { InjectFromPlan(subplan) });
                 }
                 return ret;
             }
@@ -279,9 +279,9 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
         private object GetCachedInstance(IClassNode cn)
         {
             if (cn.GetFullName().Equals(ReflectionUtilities.GetAssemblyQualifiedName(typeof(IInjector))))
-                //if (cn.GetFullName().Equals(ReflectionUtilities.NonGenericFullName(typeof(IInjector))))
+                // if (cn.GetFullName().Equals(ReflectionUtilities.NonGenericFullName(typeof(IInjector))))
             {
-                return this.ForkInjector();// TODO: We should be insisting on injection futures here! .forkInjector();
+                return this.ForkInjector(); // TODO: We should be insisting on injection futures here! .forkInjector();
             }
             else
             {
@@ -315,8 +315,8 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             }
 
             ConstructorInfo cons = clazz.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, parameterTypes, null);
-            //TODO
-            //cons.setAccessible(true);
+            // TODO
+            // cons.setAccessible(true);
 
             if (cons == null)
             {
@@ -424,7 +424,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
         {
             ISet<InjectionPlan> plans = new MonotonicHashSet<InjectionPlan>();
             CreateInjectionPlanForCollectionElements(n, memo, entries, plans);
-            return  new SetInjectionPlan(n, plans);
+            return new SetInjectionPlan(n, plans);
         }
 
         private void CreateInjectionPlanForCollectionElements<T>(INode n, IDictionary<INode, InjectionPlan> memo, ICollection<T> entries, ICollection<InjectionPlan> plans)
@@ -433,9 +433,9 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             {
                 if (entry is IClassNode)
                 {
-                    BuildInjectionPlan((IClassNode) entry, memo);
+                    BuildInjectionPlan((IClassNode)entry, memo);
                     InjectionPlan p2 = null;
-                    memo.TryGetValue((INode) entry, out p2);
+                    memo.TryGetValue((INode)entry, out p2);
                     if (p2 != null)
                     {
                         plans.Add(p2);
@@ -599,7 +599,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
                         IConstructorDef ci = ((Constructor)constructors[(liveIndices[i])]).GetConstructorDef();
                         IConstructorDef cj = ((Constructor)constructors[(liveIndices[j])]).GetConstructorDef();
 
-                        if (ci.IsMoreSpecificThan(cj)) //ci's arguments is a superset of cj's
+                        if (ci.IsMoreSpecificThan(cj)) // ci's arguments is a superset of cj's
                         {
                             k = i;
                         }
@@ -712,10 +712,10 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
                 {
                     try
                     {
-                        var r = this.classHierarchy.Parse(np, (string) o);
+                        var r = this.classHierarchy.Parse(np, (string)o);
                         if (r is INode)
                         {
-                            ret3.Add((INode) r);
+                            ret3.Add((INode)r);
                         }
                         else
                         {
@@ -771,7 +771,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
 
         private void CheckNamedParameter(Type t)
         {
-            if (ReflectionUtilities.IsAssignableFromIgnoreGeneric(typeof (Name<>), t))
+            if (ReflectionUtilities.IsAssignableFromIgnoreGeneric(typeof(Name<>), t))
             {
                 var ex = new InjectionException("GetInstance() called on Name "
                                              + ReflectionUtilities.GetName(t)
@@ -816,7 +816,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
 
         public object GetNamedInstance(Type t)
         {
-            if (!ReflectionUtilities.IsAssignableFromIgnoreGeneric(typeof (Name<>), t))
+            if (!ReflectionUtilities.IsAssignableFromIgnoreGeneric(typeof(Name<>), t))
             {
                 var ex = new ApplicationException(string.Format(CultureInfo.CurrentCulture, "The parameter {0} is not inherit from Name<>", t));
                 Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(ex, LOGGER);
@@ -843,7 +843,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
                 return p;
             }
             Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new InjectionException("Fail to get injection plan" + n), LOGGER);
-            return null;//this line should be not reached as Throw throws exception
+            return null; // this line should be not reached as Throw throws exception
         }
 
         public bool IsInjectable(string name)
@@ -980,7 +980,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             INode n = this.classHierarchy.GetNode(typeof(T));
             if (n is IClassNode) 
             {
-                IClassNode cn = (IClassNode) n;
+                IClassNode cn = (IClassNode)n;
                 object old = GetCachedInstance(cn);
                 if (old != null) {
                     Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new BindException("Attempt to re-bind instance.  Old value was "
@@ -993,16 +993,16 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             }
         }
 
-        //void BindVolatileParameterNoCopy(Class<? extends Name<T>> c, T o)
+        // void BindVolatileParameterNoCopy(Class<? extends Name<T>> c, T o)
         void BindVolatileParameterNoCopy<U, T>(GenericType<U> c, T o)
             where U : Name<T>
         {
             INode n = this.classHierarchy.GetNode(typeof(U));
             if (n is INamedParameterNode) 
             {
-                INamedParameterNode np = (INamedParameterNode) n;
+                INamedParameterNode np = (INamedParameterNode)n;
                 Object old = this.configuration.GetNamedParameter(np);
-                if(old != null) 
+                if (old != null) 
                 {
                     // XXX need to get the binding site here!
                     var ex = new BindException(
@@ -1030,7 +1030,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             }
         }
 
-        //public <T> void bindVolatileInstance(Class<T> c, T o) throws BindException {
+        // public <T> void bindVolatileInstance(Class<T> c, T o) throws BindException {
         public void BindVolatileInstance<T>(GenericType<T> iface, T inst)
         {
             BindVolatileInstanceNoCopy(iface, inst);
@@ -1069,15 +1069,16 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             BindVolatileParameter(GenericType<U>.Class, inst);
         }
 
-        //public T GetNamedParameter<U, T>(GenericType<U> name) where U : Name<T>
-        //{
-        //    return (T)GetNamedInstance(typeof(U));
-        //}
+        ////public T GetNamedParameter<U, T>(GenericType<U> name) where U : Name<T>
+        ////{
+        ////   return (T)GetNamedInstance(typeof(U));
+        ////}
+
+        ////public IInjector CreateChildInjector(IConfiguration[] configurations)
+        ////{
+        ////   return ForkInjector(configurations);
+        ////}
 
-        //public IInjector CreateChildInjector(IConfiguration[] configurations)
-        //{
-        //    return ForkInjector(configurations);
-        //}
         /// <summary>
         /// Gets the injection plan for a given class name
         /// </summary>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/SetInjectionPlan.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/SetInjectionPlan.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/SetInjectionPlan.cs
index ffe2b7e..516a585 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/SetInjectionPlan.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/SetInjectionPlan.cs
@@ -66,10 +66,10 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
            return isInjectable;
        }
 
-       //public override bool HasFutureDependency()
-       //{
-       //    return false;
-       //}
+       ////public override bool HasFutureDependency()
+       ////{
+       ////   return false;
+       ////}
 
        public ISet<InjectionPlan> GetEntryPlans()
        {
@@ -81,7 +81,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             StringBuilder sb = new StringBuilder(GetNode().GetFullName() + "(set) includes ambiguous plans [");
             foreach (InjectionPlan ip in entries) 
             {
-                if(ip.IsAmbiguous()) 
+                if (ip.IsAmbiguous()) 
                 {
                     sb.Append("\n" + ip.ToAmbiguousInjectString());
                 }
@@ -95,7 +95,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             StringBuilder sb = new StringBuilder(GetNode().GetFullName() + "(set) includes infeasible plans [");
             foreach (InjectionPlan ip in entries) 
             {
-                if(!ip.IsFeasible()) 
+                if (!ip.IsFeasible()) 
                 {
                     sb.Append("\n" + ip.ToInfeasibleInjectString());
                 }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Subplan.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Subplan.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Subplan.cs
index 6d2ea30..e06030e 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Subplan.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Subplan.cs
@@ -32,9 +32,9 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
     {
         private static readonly Logger LOGGER = Logger.GetLogger(typeof(Subplan));
 
-        readonly InjectionPlan[] alternatives; //all implementations on the same interface
+        readonly InjectionPlan[] alternatives; // all implementations on the same interface
         readonly int numAlternatives;
-        readonly int selectedIndex; //the implementation that is bound
+        readonly int selectedIndex; // the implementation that is bound
 
         public Subplan(INode n, int selectedIndex, InjectionPlan[] alternatives)
             : base(n)
@@ -45,7 +45,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
                 Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new IndexOutOfRangeException(), LOGGER);
             }
             this.selectedIndex = selectedIndex;
-            if (selectedIndex != -1)   //one was bound
+            if (selectedIndex != -1) // one was bound
             {
                 this.numAlternatives = alternatives[selectedIndex].GetNumAlternatives();
             }
@@ -151,14 +151,14 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
             return null;
         }
 
-        //public override bool HasFutureDependency()
-        //{
-        //    if (selectedIndex == -1)
-        //    {
-        //        throw new IllegalStateException("hasFutureDependency() called on ambiguous subplan!");
-        //    }
-        //    return alternatives[selectedIndex].HasFutureDependency();
-        //}
+        ////public override bool HasFutureDependency()
+        ////{
+        ////   if (selectedIndex == -1)
+        ////   {
+        ////       throw new IllegalStateException("hasFutureDependency() called on ambiguous subplan!");
+        ////   }
+        ////   return alternatives[selectedIndex].HasFutureDependency();
+        ////}
 
         public override string ToAmbiguousInjectString()
         {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/Tang/TangImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/Tang/TangImpl.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/Tang/TangImpl.cs
index 6619bdf..a71a225 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/Tang/TangImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/Tang/TangImpl.cs
@@ -40,7 +40,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Tang
         {
             try
             {
-                return NewInjector(new ConfigurationImpl[] {});
+                return NewInjector(new ConfigurationImpl[] { });
             }
             catch (BindException e)
             {
@@ -66,16 +66,15 @@ namespace Org.Apache.REEF.Tang.Implementations.Tang
             return NewConfigurationBuilder(new IConfiguration[] { conf });
         }
 
-        //public IInjector NewInjector(string[] assemblies, IDictionary<string, string> configurations)
-        //{
-        //    ITang tang = TangFactory.GetTang();
-        //    ICsConfigurationBuilder cb1 = tang.NewConfigurationBuilder(assemblies);
-        //    ConfigurationFile.ProcessConfigData(cb1, configurations);
-        //    IConfiguration conf = cb1.Build();
-
-        //    IInjector injector = tang.NewInjector(conf);
-        //    return injector;
-        //}
+        ////public IInjector NewInjector(string[] assemblies, IDictionary<string, string> configurations)
+        ////{
+        ////   ITang tang = TangFactory.GetTang();
+        ////   ICsConfigurationBuilder cb1 = tang.NewConfigurationBuilder(assemblies);
+        ////   ConfigurationFile.ProcessConfigData(cb1, configurations);
+        ////   IConfiguration conf = cb1.Build();
+        ////   IInjector injector = tang.NewInjector(conf);
+        ////   return injector;
+        ////}
 
         public IInjector NewInjector(string[] assemblies, IDictionary<string, string> configurations)
         {
@@ -105,7 +104,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Tang
 
         public IInjector NewInjector(IConfiguration conf)
         {
-            //return new InjectorImpl(conf);
+            // return new InjectorImpl(conf);
             try
             {
                 return NewInjector(new ConfigurationImpl[] { (ConfigurationImpl)conf });

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Interface/IConfiguration.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Interface/IConfiguration.cs b/lang/cs/Org.Apache.REEF.Tang/Interface/IConfiguration.cs
index 2544c4d..8405557 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Interface/IConfiguration.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Interface/IConfiguration.cs
@@ -29,8 +29,8 @@ namespace Org.Apache.REEF.Tang.Interface
         string GetNamedParameter(INamedParameterNode np);
         IClassHierarchy GetClassHierarchy();
 
-        ISet<Object> GetBoundSet(INamedParameterNode np); //named parameter for a set
-        IList<Object> GetBoundList(INamedParameterNode np); //named parameter for a list
+        ISet<Object> GetBoundSet(INamedParameterNode np); // named parameter for a set
+        IList<Object> GetBoundList(INamedParameterNode np); // named parameter for a list
 
         IClassNode GetBoundConstructor(IClassNode cn);
         IClassNode GetBoundImplementation(IClassNode cn);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Interface/IConfigurationBuilder.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Interface/IConfigurationBuilder.cs b/lang/cs/Org.Apache.REEF.Tang/Interface/IConfigurationBuilder.cs
index 96c023a..54ef5f6 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Interface/IConfigurationBuilder.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Interface/IConfigurationBuilder.cs
@@ -39,7 +39,7 @@ namespace Org.Apache.REEF.Tang.Interface
 
         void Bind(INode key, INode value);
 
-        void BindConstructor(IClassNode k, IClassNode v); //v extended from ExternalConstructor
+        void BindConstructor(IClassNode k, IClassNode v); // v extended from ExternalConstructor
         string ClassPrettyDefaultString(string longName);
         string ClassPrettyDescriptionString(string longName);
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Interface/ICsConfigurationBuilder.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Interface/ICsConfigurationBuilder.cs b/lang/cs/Org.Apache.REEF.Tang/Interface/ICsConfigurationBuilder.cs
index e553995..f0a1d00 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Interface/ICsConfigurationBuilder.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Interface/ICsConfigurationBuilder.cs
@@ -31,7 +31,7 @@ namespace Org.Apache.REEF.Tang.Interface
         /// </summary>
         /// <param name="name">The name.</param>
         /// <param name="value">The value.</param>
-        ICsConfigurationBuilder BindNamedParameter(Type name, string value);  //name must extend from Name<T>
+        ICsConfigurationBuilder BindNamedParameter(Type name, string value);  // name must extend from Name<T>
 
         /// <summary>
         /// Binds the class impl as the implementation of the interface iface
@@ -79,15 +79,15 @@ namespace Org.Apache.REEF.Tang.Interface
         ICsConfigurationBuilder BindImplementation<U, T>(GenericType<U> iface, GenericType<T> impl)
             where T : U;
 
-        //public <T> void bindConstructor(Class<T> c, Class<? extends ExternalConstructor<? extends T>> v) throws BindException;
+        // public <T> void bindConstructor(Class<T> c, Class<? extends ExternalConstructor<? extends T>> v) throws BindException;
         ICsConfigurationBuilder BindConstructor<T, U>(GenericType<T> c, GenericType<U> v)
             where U : IExternalConstructor<T>;
   
-        //public <T> void bindSetEntry(Class<? extends Name<Set<T>>> iface, String value) throws BindException;
+        // public <T> void bindSetEntry(Class<? extends Name<Set<T>>> iface, String value) throws BindException;
         ICsConfigurationBuilder BindSetEntry<U, T>(GenericType<U> iface, string value)
             where U : Name<ISet<T>>;
 
-         //public <T> void bindSetEntry(Class<? extends Name<Set<T>>> iface, Class<? extends T> impl) throws BindException;
+         // public <T> void bindSetEntry(Class<? extends Name<Set<T>>> iface, Class<? extends T> impl) throws BindException;
         ICsConfigurationBuilder BindSetEntry<U, V, T>(GenericType<U> iface, GenericType<V> impl)
             where U : Name<ISet<T>>
             where V : T;

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.csproj b/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.csproj
index 51cf18f..d075351 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.csproj
+++ b/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.csproj
@@ -74,12 +74,24 @@ under the License.
     <Compile Include="Implementations\ClassHierarchy\AbstractNode.cs" />
     <Compile Include="Implementations\ClassHierarchy\AvroClassHierarchy.cs" />
     <Compile Include="Implementations\ClassHierarchy\AvroClassHierarchySerializer.cs" />
-    <Compile Include="Implementations\ClassHierarchy\AvroDataContract\AvroClassNode.cs" />
-    <Compile Include="Implementations\ClassHierarchy\AvroDataContract\AvroConstructorArg.cs" />
-    <Compile Include="Implementations\ClassHierarchy\AvroDataContract\AvroConstructorDef.cs" />
-    <Compile Include="Implementations\ClassHierarchy\AvroDataContract\AvroNamedParameterNode.cs" />
-    <Compile Include="Implementations\ClassHierarchy\AvroDataContract\AvroNode.cs" />
-    <Compile Include="Implementations\ClassHierarchy\AvroDataContract\AvroPackageNode.cs" />
+    <Compile Include="Implementations\ClassHierarchy\AvroDataContract\AvroClassNode.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="Implementations\ClassHierarchy\AvroDataContract\AvroConstructorArg.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="Implementations\ClassHierarchy\AvroDataContract\AvroConstructorDef.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="Implementations\ClassHierarchy\AvroDataContract\AvroNamedParameterNode.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="Implementations\ClassHierarchy\AvroDataContract\AvroNode.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="Implementations\ClassHierarchy\AvroDataContract\AvroPackageNode.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
     <Compile Include="Implementations\ClassHierarchy\ClassHierarchyImpl.cs" />
     <Compile Include="Implementations\ClassHierarchy\ClassNodeImpl.cs" />
     <Compile Include="Implementations\ClassHierarchy\ConstructorArgImpl.cs" />
@@ -117,8 +129,12 @@ under the License.
     <Compile Include="Interface\IConfigurationProvider.cs" />
     <Compile Include="Interface\ITang.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Protobuf\class_hierarchy.cs" />
-    <Compile Include="Protobuf\injection_plan.cs" />
+    <Compile Include="Protobuf\class_hierarchy.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="Protobuf\injection_plan.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
     <Compile Include="Protobuf\ProtocolBufferClassHierarchy.cs" />
     <Compile Include="Protobuf\ProtocolBufferInjectionPlan.cs" />
     <Compile Include="Types\IClassNode.cs" />
@@ -153,6 +169,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
@@ -160,4 +177,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferClassHierarchy.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferClassHierarchy.cs b/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferClassHierarchy.cs
index 7bd5fc1..27ae514 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferClassHierarchy.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferClassHierarchy.cs
@@ -92,7 +92,7 @@ namespace Org.Apache.REEF.Tang.Protobuf
                 List<string> implFullNames = new List<string>();
                 foreach (IClassNode impl in cn.GetKnownImplementations())
                 {
-                    implFullNames.Add(impl.GetFullName());  //we use class fully qualifed name 
+                    implFullNames.Add(impl.GetFullName());  // we use class fully qualifed name 
                 }
 
                 return NewClassNode(cn.GetName(), cn.GetFullName(),
@@ -261,7 +261,8 @@ namespace Org.Apache.REEF.Tang.Protobuf
             return new ProtocolBufferClassHierarchy(root);
         }
 
-        public ProtocolBufferClassHierarchy()  //create a ProtocolBufferClassHierarchy with empty nodes and lookup table. It can be used to merge other class hierarchy to it
+        // create a ProtocolBufferClassHierarchy with empty nodes and lookup table. It can be used to merge other class hierarchy to it
+        public ProtocolBufferClassHierarchy()
         {
             this.rootNode = new PackageNodeImpl();
         }
@@ -544,7 +545,7 @@ namespace Org.Apache.REEF.Tang.Protobuf
                 {
                     if (n is INamedParameterNode)
                     {
-                        INamedParameterNode np = (INamedParameterNode) n;
+                        INamedParameterNode np = (INamedParameterNode)n;
                         new NamedParameterNodeImpl(this.rootNode, np.GetName(),
                                                    np.GetFullName(), np.GetFullArgName(), np.GetSimpleArgName(),
                                                    np.IsSet(), np.IsList(), np.GetDocumentation(), np.GetShortName(),
@@ -552,7 +553,7 @@ namespace Org.Apache.REEF.Tang.Protobuf
                     }
                     else if (n is IClassNode)
                     {
-                        IClassNode cn = (IClassNode) n;
+                        IClassNode cn = (IClassNode)n;
                         new ClassNodeImpl(rootNode, cn.GetName(), cn.GetFullName(),
                                           cn.IsUnit(), cn.IsInjectionCandidate(),
                                           cn.IsExternalConstructor(), cn.GetInjectableConstructors(),

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferInjectionPlan.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferInjectionPlan.cs b/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferInjectionPlan.cs
index f82c4e2..0719a0d 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferInjectionPlan.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferInjectionPlan.cs
@@ -90,7 +90,7 @@ namespace Org.Apache.REEF.Tang.Protobuf
         {
             if (ip is Org.Apache.REEF.Tang.Implementations.InjectionPlan.Constructor) 
             {
-                Org.Apache.REEF.Tang.Implementations.InjectionPlan.Constructor cons = (Org.Apache.REEF.Tang.Implementations.InjectionPlan.Constructor) ip;
+                Org.Apache.REEF.Tang.Implementations.InjectionPlan.Constructor cons = (Org.Apache.REEF.Tang.Implementations.InjectionPlan.Constructor)ip;
                 Org.Apache.REEF.Tang.Implementations.InjectionPlan.InjectionPlan[] args = cons.GetArgs();
                 Org.Apache.REEF.Tang.Protobuf.InjectionPlan[] protoArgs = new Org.Apache.REEF.Tang.Protobuf.InjectionPlan[args.Length];
                 for (int i = 0; i < args.Length; i++) 
@@ -101,7 +101,7 @@ namespace Org.Apache.REEF.Tang.Protobuf
             } 
             if (ip is Org.Apache.REEF.Tang.Implementations.InjectionPlan.Subplan) 
             {
-                Org.Apache.REEF.Tang.Implementations.InjectionPlan.Subplan sp = (Org.Apache.REEF.Tang.Implementations.InjectionPlan.Subplan) ip;
+                Org.Apache.REEF.Tang.Implementations.InjectionPlan.Subplan sp = (Org.Apache.REEF.Tang.Implementations.InjectionPlan.Subplan)ip;
                 Org.Apache.REEF.Tang.Implementations.InjectionPlan.InjectionPlan[] args = sp.GetPlans();
                 Org.Apache.REEF.Tang.Protobuf.InjectionPlan[] subPlans = new Org.Apache.REEF.Tang.Protobuf.InjectionPlan[args.Length];
                 for (int i = 0; i < args.Length; i++) 
@@ -113,7 +113,7 @@ namespace Org.Apache.REEF.Tang.Protobuf
             } 
             if (ip is CsInstance) 
             {
-                CsInstance ji = (CsInstance) ip;
+                CsInstance ji = (CsInstance)ip;
                 return NewInstance(ip.GetNode().GetFullName(), ji.GetInstanceAsString());
             } 
             Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new IllegalStateException(
@@ -139,7 +139,7 @@ namespace Org.Apache.REEF.Tang.Protobuf
             if (ip.constructor != null) 
             {
                 Org.Apache.REEF.Tang.Protobuf.Constructor cons = ip.constructor;
-                IClassNode cn = (IClassNode) ch.GetNode(fullName);
+                IClassNode cn = (IClassNode)ch.GetNode(fullName);
 
                 Org.Apache.REEF.Tang.Protobuf.InjectionPlan[] protoBufArgs = cons.args.ToArray();
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Util/MonotonicSet.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Util/MonotonicSet.cs b/lang/cs/Org.Apache.REEF.Tang/Util/MonotonicSet.cs
index 14dcb00..8713a99 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Util/MonotonicSet.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Util/MonotonicSet.cs
@@ -27,15 +27,15 @@ namespace Org.Apache.REEF.Tang.Util
     {
         private static readonly Logger LOGGER = Logger.GetLogger(typeof(MonotonicSet<T>));
 
-        //private static readonly long serialVersionUID = 1L;
+        // private static readonly long serialVersionUID = 1L;
         public MonotonicSet() : base()
         {
         }
 
-        //public MonotonicSet(SortedSet<T> c) : base(c.Comparer)
-        //{
-        //    AddAll(c);
-        //}
+        ////public MonotonicSet(SortedSet<T> c) : base(c.Comparer)
+        ////{
+        ////   AddAll(c);
+        ////}
 
         public MonotonicSet(ICollection<T> c)
             : base(c)
@@ -47,7 +47,7 @@ namespace Org.Apache.REEF.Tang.Util
         {
         }
 
-        public new bool Add(T e) //TODO
+        public new bool Add(T e) // TODO
         {
             if (this.Contains(e))
             {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Util/MonotonicTreeMap.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Util/MonotonicTreeMap.cs b/lang/cs/Org.Apache.REEF.Tang/Util/MonotonicTreeMap.cs
index e19c631..e83444d 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Util/MonotonicTreeMap.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Util/MonotonicTreeMap.cs
@@ -56,12 +56,12 @@ namespace Org.Apache.REEF.Tang.Util
             }
         }
 
-        public new void Clear() //TODO
+        public new void Clear() // TODO
         {
             throw new NotSupportedException();
         }
 
-        public new void Remove(TKey key) //TODO
+        public new void Remove(TKey key) // TODO
         {
             throw new NotSupportedException();
         }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Util/ReflectionUtilities.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Util/ReflectionUtilities.cs b/lang/cs/Org.Apache.REEF.Tang/Util/ReflectionUtilities.cs
index 48afeed..a5356c9 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Util/ReflectionUtilities.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Util/ReflectionUtilities.cs
@@ -79,21 +79,21 @@ namespace Org.Apache.REEF.Tang.Util
                 return name.FullName;
             }
 
-            //The following lines should be not reached by C# syntax definition. However, it happens  for some generic type such as AbstractObserver<T>
-            //It results in name as null. When null name in the class node gets deserialized, as name is required filed in class hierarchy proto buffer schema,
-            //it causes exception during deserialization. The code below is to use first portion of AssemblyQualifiedName for the name of the node node in case type.name is null. 
+            // The following lines should be not reached by C# syntax definition. However, it happens  for some generic type such as AbstractObserver<T>
+            // It results in name as null. When null name in the class node gets deserialized, as name is required filed in class hierarchy proto buffer schema,
+            // it causes exception during deserialization. The code below is to use first portion of AssemblyQualifiedName for the name of the node node in case type.name is null. 
             string[] parts = GetAssemblyQualifiedName(name).Split(',');
             return parts[0];
         }
 
         /// <summary>
         /// Gets the interface target.
-        // Foo<T> ,  given Foo<T> and Foo return T
-        // example class Foo : Bar<U>, Bas<T>
-        // iface: Bar, type: Foo, return U
-        // iface: Bas, type: Foo, return T
-        // class ACons implements IExternalConstructor<A> 
-        // iface: IExternalConstructor<>, type: ACons return A
+        /// Foo<T> ,  given Foo<T> and Foo return T
+        /// example class Foo : Bar<U>, Bas<T>
+        /// iface: Bar, type: Foo, return U
+        /// iface: Bas, type: Foo, return T
+        /// class ACons implements IExternalConstructor<A> 
+        /// iface: IExternalConstructor<>, type: ACons return A
         /// </summary>
         /// <param name="iface">The iface.</param>
         /// <param name="type">The type.</param>
@@ -104,7 +104,7 @@ namespace Org.Apache.REEF.Tang.Util
             {
                 if (IsGenericTypeof(iface, t))
                 {
-                    return t.GetGenericArguments()[0]; //verify it
+                    return t.GetGenericArguments()[0]; // verify it
                 }
             }
             return null;
@@ -114,7 +114,7 @@ namespace Org.Apache.REEF.Tang.Util
         {
             if (IsGenericTypeof(iface, type))
             {
-                return type.GetGenericArguments()[0]; //verify it
+                return type.GetGenericArguments()[0]; // verify it
             }
             return null;
         }
@@ -155,7 +155,7 @@ namespace Org.Apache.REEF.Tang.Util
         public static IEnumerable<Type> ClassAndAncestors(Type c)
         {
             List<Type> workQueue = new List<Type>();
-            workQueue.Add(c); //including itself
+            workQueue.Add(c); // including itself
 
             foreach (Type t in c.GetInterfaces())
             {
@@ -180,7 +180,7 @@ namespace Org.Apache.REEF.Tang.Util
         public static IEnumerable<Type> ClassAndAncestorsExcludeSelf(Type c)
         {
             List<Type> workQueue = new List<Type>();
-            //workQueue.Add(c); //including itself
+            // workQueue.Add(c); // including itself
 
             foreach (Type t in c.GetInterfaces())
             {
@@ -270,12 +270,12 @@ namespace Org.Apache.REEF.Tang.Util
         {
             to = BoxClass(to);
             from = BoxClass(from);
-            //TODO
-            //if (Number.class.isAssignableFrom(to)
-            //    && Number.class.isAssignableFrom(from)) {
-            //return sizeof.get(from) <= sizeof.get(to);
+            ////TODO
+            ////if (Number.class.isAssignableFrom(to)
+            ////   && Number.class.isAssignableFrom(from)) {
+            ////return sizeof.get(from) <= sizeof.get(to);
             return to.IsAssignableFrom(from);
-            //return IsAssignableFromIgnoreGeneric(to, from);
+            // return IsAssignableFromIgnoreGeneric(to, from);
         }
 
         /// <summary>
@@ -309,7 +309,7 @@ namespace Org.Apache.REEF.Tang.Util
         {
             if (interf != null && interf.IsGenericType && null == interf.FullName)
             {
-                return interf.GetGenericTypeDefinition(); //this is to test if this line is ever reached
+                return interf.GetGenericTypeDefinition(); // this is to test if this line is ever reached
             }
             return interf;
         }
@@ -441,7 +441,7 @@ namespace Org.Apache.REEF.Tang.Util
         /// <param name="type">The type.</param>
         /// <returns></returns>
         /// <exception cref="ClassHierarchyException">Named parameter  + GetName(type) +  implements 
-        ///                                   + multiple interfaces.  It is only allowed to implement Name</exception>
+        /// + multiple interfaces.  It is only allowed to implement Name</exception>
         public static Type GetNamedParameterTargetOrNull(Type type)
         {
             var npAnnotation = type.GetCustomAttribute<NamedParameterAttribute>();
@@ -485,7 +485,7 @@ namespace Org.Apache.REEF.Tang.Util
                 return args[0];
             }
 
-            if (ImplementName(type)) //Implement Name<> but no  [NamedParameter] attribute
+            if (ImplementName(type)) // Implement Name<> but no  [NamedParameter] attribute
             {
                 var ex = new ClassHierarchyException("Named parameter " + GetName(type)
                                   + " is missing its [NamedParameter] attribute.");
@@ -540,7 +540,7 @@ namespace Org.Apache.REEF.Tang.Util
         {
             if (t.IsGenericType)
             {
-                return t.GetGenericTypeDefinition().AssemblyQualifiedName.Equals(typeof (Name<>).AssemblyQualifiedName);
+                return t.GetGenericTypeDefinition().AssemblyQualifiedName.Equals(typeof(Name<>).AssemblyQualifiedName);
             }
             return false;
         }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/HelloSimpleEventHandlers.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/HelloSimpleEventHandlers.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/HelloSimpleEventHandlers.cs
index 0fa9794..e51eae4 100644
--- a/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/HelloSimpleEventHandlers.cs
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/HelloSimpleEventHandlers.cs
@@ -392,7 +392,7 @@ namespace Org.Apache.REEF.Tests.Functional.Bridge
                 Logger.Log(Level.Verbose, "CurrentTaskId: " + _taskIds[NextTaskIndex - 1]);
                 return _taskIds[NextTaskIndex - 1];
             }
-            return null; //either not started or completed
+            return null; // either not started or completed
         }
 
         public void UpdateTaskStatus(string taskId, TaskStatus status)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestBridgeClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestBridgeClient.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestBridgeClient.cs
index 2a63697..b520b5d 100644
--- a/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestBridgeClient.cs
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestBridgeClient.cs
@@ -45,7 +45,7 @@ namespace Org.Apache.REEF.Tests.Functional.Bridge
         [TestMethod, Priority(1), TestCategory("FunctionalGated")]
         [Description("Run CLR Bridge on local runtime")]
         [DeploymentItem(@".")]
-        [Ignore] //This test needs to be run on Yarn environment with test framework installed.
+        [Ignore] // this test needs to be run on Yarn environment with test framework installed.
         public void CanRunClrBridgeExampleOnYarn()
         {
             string testRuntimeFolder = DefaultRuntimeFolder + TestNumber++;
@@ -72,7 +72,7 @@ namespace Org.Apache.REEF.Tests.Functional.Bridge
             var strStatus = driverHttpEndpoint.GetUrlResult(uri);
             Assert.IsTrue(strStatus.Equals("Byte array returned from HelloHttpHandler in CLR!!!\r\n"));
 
-            await ((JobSubmissionResult)driverHttpEndpoint).TryUntilNoConnection(uri);
+            await((JobSubmissionResult)driverHttpEndpoint).TryUntilNoConnection(uri);
 
             ValidateSuccessForLocalRuntime(2, testFolder: testRuntimeFolder);
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj b/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj
index 72ee065..933049a 100644
--- a/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj
+++ b/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj
@@ -167,6 +167,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <!--begin jar reference-->
   <PropertyGroup>
     <AfterBuildDependsOn>
@@ -188,4 +189,4 @@ under the License.
   <Target Name="BeforeBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Utilities/IIdentifiable.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Utilities/IIdentifiable.cs b/lang/cs/Org.Apache.REEF.Utilities/IIdentifiable.cs
index a6c2e34..621e55c 100644
--- a/lang/cs/Org.Apache.REEF.Utilities/IIdentifiable.cs
+++ b/lang/cs/Org.Apache.REEF.Utilities/IIdentifiable.cs
@@ -27,6 +27,6 @@ namespace Org.Apache.REEF.Utilities
         /// <summary>
         /// The Id of this object, e.g. the TaskId.
         /// </summary>
-        string Id { get;}
+        string Id { get; }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj b/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
index 45c1408..d6b5f08 100644
--- a/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
+++ b/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
@@ -59,6 +59,7 @@ under the License.
   <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
@@ -66,4 +67,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake.Tests/ClockTest.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake.Tests/ClockTest.cs b/lang/cs/Org.Apache.REEF.Wake.Tests/ClockTest.cs
index a4e4f0e..1ce7b13 100644
--- a/lang/cs/Org.Apache.REEF.Wake.Tests/ClockTest.cs
+++ b/lang/cs/Org.Apache.REEF.Wake.Tests/ClockTest.cs
@@ -115,7 +115,7 @@ namespace Org.Apache.REEF.Wake.Tests
                 List<long> recordedTimestamps = new List<long>();
                 IObserver<Alarm> eventRecorder = Observer.Create<Alarm>(alarm => recordedTimestamps.Add(alarm.TimeStamp));
 
-                //  Schedule 10 alarms every 100 ms 
+                // Schedule 10 alarms every 100 ms 
                 List<long> expectedTimestamps = Enumerable.Range(0, 10).Select(offset => (long)offset * 100).ToList();
                 expectedTimestamps.ForEach(offset => clock.ScheduleAlarm(offset, eventRecorder));
     

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake.Tests/Org.Apache.REEF.Wake.Tests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake.Tests/Org.Apache.REEF.Wake.Tests.csproj b/lang/cs/Org.Apache.REEF.Wake.Tests/Org.Apache.REEF.Wake.Tests.csproj
index 5cb28c9..f04bdf6 100644
--- a/lang/cs/Org.Apache.REEF.Wake.Tests/Org.Apache.REEF.Wake.Tests.csproj
+++ b/lang/cs/Org.Apache.REEF.Wake.Tests/Org.Apache.REEF.Wake.Tests.csproj
@@ -89,6 +89,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -103,4 +104,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/IStage.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/IStage.cs b/lang/cs/Org.Apache.REEF.Wake/IStage.cs
index d7121a8..98808e9 100644
--- a/lang/cs/Org.Apache.REEF.Wake/IStage.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/IStage.cs
@@ -22,7 +22,7 @@ using System;
 namespace Org.Apache.REEF.Wake
 {
     /// <summary>Stage is an execution unit for events and provides a way to reclaim its resources
-    ///     </summary>
+    /// </summary>
     public interface IStage : IDisposable
     {
     }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/Impl/TimerStage.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Impl/TimerStage.cs b/lang/cs/Org.Apache.REEF.Wake/Impl/TimerStage.cs
index 3102f66..75e1eac 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Impl/TimerStage.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Impl/TimerStage.cs
@@ -24,7 +24,7 @@ namespace Org.Apache.REEF.Wake.Impl
     /// <summary>Stage that triggers an event handler periodically</summary>
     public class TimerStage : IStage
     {
-        //private readonly ScheduledExecutorService executor;
+        // private readonly ScheduledExecutorService executor;
         private readonly Timer _timer;
         private readonly PeriodicEvent _value = new PeriodicEvent();
         private readonly IEventHandler<PeriodicEvent> _handler;

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj b/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj
index 5767f8a..9e2098b 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj
+++ b/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj
@@ -77,7 +77,9 @@ under the License.
     <Compile Include="Remote\Impl\StreamingTransportClient.cs" />
     <Compile Include="Remote\Impl\StreamingTransportServer.cs" />
     <Compile Include="Remote\IRemoteManagerFactory.cs" />
-    <Compile Include="Remote\Proto\WakeRemoteProtosGen.cs" />
+    <Compile Include="Remote\Proto\WakeRemoteProtosGen.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
     <Compile Include="Remote\ICodec.cs" />
     <Compile Include="Remote\ICodecFactory.cs" />
     <Compile Include="Remote\IDecoder.cs" />
@@ -186,6 +188,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
@@ -193,4 +196,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/RX/AbstractRxStage.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/RX/AbstractRxStage.cs b/lang/cs/Org.Apache.REEF.Wake/RX/AbstractRxStage.cs
index 5238935..6cea1e0 100644
--- a/lang/cs/Org.Apache.REEF.Wake/RX/AbstractRxStage.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/RX/AbstractRxStage.cs
@@ -26,20 +26,20 @@ namespace Org.Apache.REEF.Wake.RX
     /// </summary>
     public abstract class AbstractRxStage<T> : IRxStage<T>
     {
-        //protected internal readonly Meter meter;
+        // protected internal readonly Meter meter;
 
         /// <summary>Constructs an abstact rxstage</summary>
         /// <param name="meterName">the name of the meter</param>
         public AbstractRxStage(string meterName)
         {
-            //meter = new Meter(meterName);
+            // meter = new Meter(meterName);
         }
 
         /// <summary>Updates the meter</summary>
         /// <param name="value">the event</param>
         public virtual void OnNext(T value)
         {
-            //meter.Mark(1);
+            // meter.Mark(1);
         }
 
         public abstract void OnCompleted();

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/RX/IStaticObservable.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/RX/IStaticObservable.cs b/lang/cs/Org.Apache.REEF.Wake/RX/IStaticObservable.cs
index cf77e74..e13c094 100644
--- a/lang/cs/Org.Apache.REEF.Wake/RX/IStaticObservable.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/RX/IStaticObservable.cs
@@ -21,6 +21,6 @@ namespace Org.Apache.REEF.Wake.RX
 {
     public interface IStaticObservable
     {
-        //intentionally empty
+        // intentionally empty
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/RX/Impl/PubSubSubject.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/RX/Impl/PubSubSubject.cs b/lang/cs/Org.Apache.REEF.Wake/RX/Impl/PubSubSubject.cs
index 0f0f663..36c0f6e 100644
--- a/lang/cs/Org.Apache.REEF.Wake/RX/Impl/PubSubSubject.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/RX/Impl/PubSubSubject.cs
@@ -103,7 +103,7 @@ namespace Org.Apache.REEF.Wake.RX.Impl
                 {
                     Type handlerType = typeof(IObserver<>).MakeGenericType(new[] { value.GetType() });
                     MethodInfo info = handlerType.GetMethod("OnNext");
-                    info.Invoke(handler, new[] { (object) value });
+                    info.Invoke(handler, new[] { (object)value });
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/Link.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/Link.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/Link.cs
index 72619df..16efd4b 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/Link.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/Link.cs
@@ -104,7 +104,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
         /// </summary>
         public IPEndPoint RemoteEndpoint
         {
-            get { return (IPEndPoint) Client.Client.RemoteEndPoint; }
+            get { return (IPEndPoint)Client.Client.RemoteEndPoint; }
         }
 
         /// <summary>
@@ -246,7 +246,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
         private IPEndPoint GetLocalEndpoint()
         {
             IPAddress address = NetworkUtils.LocalIPAddress;
-            int port = ((IPEndPoint) Client.Client.LocalEndPoint).Port;
+            int port = ((IPEndPoint)Client.Client.LocalEndPoint).Port;
             return new IPEndPoint(address, port);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiDecoder.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiDecoder.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiDecoder.cs
index 7dec8e1..d0559d3 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiDecoder.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiDecoder.cs
@@ -103,7 +103,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
             // Invoke the decoder to decode the byte array
             Type handlerType = typeof(IDecoder<>).MakeGenericType(new[] { type });
             MethodInfo info = handlerType.GetMethod("Decode");
-            return (T) info.Invoke(decoder, new[] { (object) pbuf.data });
+            return (T)info.Invoke(decoder, new[] { (object)pbuf.data });
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiEncoder.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiEncoder.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiEncoder.cs
index 2a75769..466e850 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiEncoder.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiEncoder.cs
@@ -71,7 +71,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
             // Invoke encoder for this type
             Type handlerType = typeof(IEncoder<>).MakeGenericType(new[] { obj.GetType() });
             MethodInfo info = handlerType.GetMethod("Encode");
-            byte[] data = (byte[]) info.Invoke(encoder, new[] { (object) obj });
+            byte[] data = (byte[])info.Invoke(encoder, new[] { (object)obj });
 
             // Serialize object type and object data into well known tuple
             // To decode, deserialize the tuple, get object type, and look up the

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteEventStreamingCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteEventStreamingCodec.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteEventStreamingCodec.cs
index 01acd73..14e5a78 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteEventStreamingCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteEventStreamingCodec.cs
@@ -62,9 +62,9 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
         /// <param name="reader">The reader from which to read </param>
         /// <param name="token">The cancellation token</param>
         /// <returns>The remote event</returns>
-        public async Task<IRemoteEvent<T>>  ReadAsync(IDataReader reader, CancellationToken token)
+        public async Task<IRemoteEvent<T>> ReadAsync(IDataReader reader, CancellationToken token)
         {
-            T message =  await _codec.ReadAsync(reader, token);
+            T message = await _codec.ReadAsync(reader, token);
             return new RemoteEvent<T>(null, null, message);     
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataReader.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataReader.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataReader.cs
index 2e88573..5a3c6c2 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataReader.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataReader.cs
@@ -91,7 +91,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
         public long ReadLong()
         {
             byte[] longBytes = new byte[sizeof(long)];
-            int readBytes = Read(ref longBytes, 0, sizeof (long));
+            int readBytes = Read(ref longBytes, 0, sizeof(long));
 
             if (readBytes == -1)
             {
@@ -123,7 +123,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
         public int ReadInt32()
         {
             byte[] intBytes = new byte[sizeof(int)];
-            int readBytes = Read(ref intBytes, 0, sizeof (int));
+            int readBytes = Read(ref intBytes, 0, sizeof(int));
 
             if (readBytes == -1)
             {
@@ -243,7 +243,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
         public async Task<long> ReadLongAsync(CancellationToken token)
         {
             byte[] longBytes = new byte[sizeof(long)];
-            int readBytes = await ReadAsync(longBytes, 0, sizeof (long), token);
+            int readBytes = await ReadAsync(longBytes, 0, sizeof(long), token);
 
             if (readBytes == -1)
             {
@@ -277,7 +277,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
         public async Task<int> ReadInt32Async(CancellationToken token)
         {
             byte[] intBytes = new byte[sizeof(int)];
-            int readBytes = await ReadAsync(intBytes, 0, sizeof (int), token);
+            int readBytes = await ReadAsync(intBytes, 0, sizeof(int), token);
 
             if (readBytes == -1)
             {
@@ -294,7 +294,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
         public async Task<short> ReadInt16Async(CancellationToken token)
         {
             byte[] intBytes = new byte[sizeof(Int16)];
-            int readBytes = await ReadAsync(intBytes, 0, sizeof (Int16), token);
+            int readBytes = await ReadAsync(intBytes, 0, sizeof(Int16), token);
 
             if (readBytes == -1)
             {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingLink.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingLink.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingLink.cs
index 4396b56..466a02d 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingLink.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingLink.cs
@@ -36,7 +36,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
     /// <typeparam name="T">Generic Type of message.</typeparam>
     internal sealed class StreamingLink<T> : ILink<T>
     {
-        private static readonly Logger Logger = Logger.GetLogger(typeof (StreamingLink<T>));
+        private static readonly Logger Logger = Logger.GetLogger(typeof(StreamingLink<T>));
 
         private readonly IPEndPoint _localEndpoint;
         private bool _disposed;
@@ -112,7 +112,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
         /// </summary>
         public IPEndPoint RemoteEndpoint
         {
-            get { return (IPEndPoint) _client.Client.RemoteEndPoint; }
+            get { return (IPEndPoint)_client.Client.RemoteEndPoint; }
         }
 
         /// <summary>
@@ -251,7 +251,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
         private IPEndPoint GetLocalEndpoint()
         {
             IPAddress address = NetworkUtils.LocalIPAddress;
-            int port = ((IPEndPoint) _client.Client.LocalEndPoint).Port;
+            int port = ((IPEndPoint)_client.Client.LocalEndPoint).Port;
             return new IPEndPoint(address, port);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingTransportServer.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingTransportServer.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingTransportServer.cs
index 58ab094..3f01df9 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingTransportServer.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingTransportServer.cs
@@ -35,7 +35,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
     /// <typeparam name="T">Generic Type of message. It is constrained to have implemented IWritable and IType interface</typeparam>
     internal sealed class StreamingTransportServer<T> : IDisposable
     {
-        private static readonly Logger LOGGER = Logger.GetLogger(typeof (TransportServer<>));
+        private static readonly Logger LOGGER = Logger.GetLogger(typeof(TransportServer<>));
 
         private TcpListener _listener;
         private readonly CancellationTokenSource _cancellationSource;
@@ -92,8 +92,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
             var foundAPort = false;
             var exception = new SocketException((int)SocketError.AddressAlreadyInUse);
             for (var enumerator = _tcpPortProvider.GetEnumerator();
-                !foundAPort && enumerator.MoveNext();
-                )
+                !foundAPort && enumerator.MoveNext();)
             {
                 _listener = new TcpListener(LocalEndpoint.Address, enumerator.Current);
                 try

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/TransportServer.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/TransportServer.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/TransportServer.cs
index 3d29288..7d5f47e 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/TransportServer.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/TransportServer.cs
@@ -97,8 +97,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
             var foundAPort = false;
             var exception = new SocketException((int)SocketError.AddressAlreadyInUse);
             for (var enumerator = _tcpPortProvider.GetEnumerator();
-                !foundAPort && enumerator.MoveNext();
-                )
+                !foundAPort && enumerator.MoveNext();)
             {
                 _listener = new TcpListener(LocalEndpoint.Address, enumerator.Current);
                 try

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeSeed.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeSeed.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeSeed.cs
index f60f169..a433c36 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeSeed.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeSeed.cs
@@ -22,7 +22,7 @@ using Org.Apache.REEF.Tang.Annotations;
 namespace Org.Apache.REEF.Wake.Remote.Parameters
 {
     [NamedParameter(Documentation = "Seed for the random port number generator", DefaultValue = "0")]
-    public class TcpPortRangeSeed: Name<int>
+    public class TcpPortRangeSeed : Name<int>
     {
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/Remote/TcpPortProvider.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/TcpPortProvider.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/TcpPortProvider.cs
index 5662d7f..8d0e8ba 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/TcpPortProvider.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/TcpPortProvider.cs
@@ -39,8 +39,7 @@ namespace Org.Apache.REEF.Wake.Remote
             [Parameter(typeof(TcpPortRangeStart))] int tcpPortRangeStart,
             [Parameter(typeof(TcpPortRangeCount))] int tcpPortRangeCount,
             [Parameter(typeof(TcpPortRangeTryCount))] int tcpPortRangeTryCount,
-            [Parameter(typeof(TcpPortRangeSeed))] int tcpPortRangeSeed
-            )
+            [Parameter(typeof(TcpPortRangeSeed))] int tcpPortRangeSeed)
         {
             _tcpPortRangeStart = tcpPortRangeStart;
             _tcpPortRangeCount = tcpPortRangeCount;

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/DoubleArrayStreamingCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/DoubleArrayStreamingCodec.cs b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/DoubleArrayStreamingCodec.cs
index a4d8654..ba0b954 100644
--- a/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/DoubleArrayStreamingCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/StreamingCodec/CommonStreamingCodecs/DoubleArrayStreamingCodec.cs
@@ -42,11 +42,11 @@ namespace Org.Apache.REEF.Wake.StreamingCodec.CommonStreamingCodecs
         /// Instantiate the class from the reader.
         /// </summary>
         /// <param name="reader">The reader from which to read</param>
-        ///<returns>The double array read from the reader</returns>
+        /// <returns>The double array read from the reader</returns>
         public double[] Read(IDataReader reader)
         {
             int length = reader.ReadInt32();
-            byte[] buffer = new byte[sizeof(double)*length];
+            byte[] buffer = new byte[sizeof(double) * length];
             reader.Read(ref buffer, 0, buffer.Length);
             double[] doubleArr = new double[length];
             Buffer.BlockCopy(buffer, 0, doubleArr, 0, buffer.Length);
@@ -71,10 +71,10 @@ namespace Org.Apache.REEF.Wake.StreamingCodec.CommonStreamingCodecs
             writer.Write(buffer, 0, buffer.Length);
         }
 
-        ///  <summary>
-        ///  Instantiate the class from the reader.
-        ///  </summary>
-        ///  <param name="reader">The reader from which to read</param>
+        /// <summary>
+        /// Instantiate the class from the reader.
+        /// </summary>
+        /// <param name="reader">The reader from which to read</param>
         /// <param name="token">Cancellation token</param>
         /// <returns>The double array read from the reader</returns>
         public async Task<double[]> ReadAsync(IDataReader reader, CancellationToken token)



[4/6] incubator-reef git commit: [REEF-979] Enable StyleCop.CSharp.SpacingRules and fix violations

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Naming/NameCache.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/NameCache.cs b/lang/cs/Org.Apache.REEF.Network/Naming/NameCache.cs
index 9757915..66c8647 100644
--- a/lang/cs/Org.Apache.REEF.Network/Naming/NameCache.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Naming/NameCache.cs
@@ -41,15 +41,15 @@ namespace Org.Apache.REEF.Network.Naming
 
         [Inject]
         private NameCache(
-            [Parameter(typeof (NameCacheConfiguration.CacheEntryExpiryTime))] double expirationDuration,
-            [Parameter(typeof (NameCacheConfiguration.CacheMemoryLimit))] string memoryLimit,
-            [Parameter(typeof (NameCacheConfiguration.PollingInterval))] string pollingInterval)
+            [Parameter(typeof(NameCacheConfiguration.CacheEntryExpiryTime))] double expirationDuration,
+            [Parameter(typeof(NameCacheConfiguration.CacheMemoryLimit))] string memoryLimit,
+            [Parameter(typeof(NameCacheConfiguration.PollingInterval))] string pollingInterval)
         {
             var config = new NameValueCollection
             {
-                {"pollingInterval", pollingInterval},
-                {"physicalMemoryLimitPercentage", "0"},
-                {"cacheMemoryLimitMegabytes", memoryLimit}
+                { "pollingInterval", pollingInterval },
+                { "physicalMemoryLimitPercentage", "0" },
+                { "cacheMemoryLimitMegabytes", memoryLimit }
             };
 
             _cache = new MemoryCache("NameClientCache", config);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs b/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs
index 226e145..1eab872 100644
--- a/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs
@@ -66,8 +66,8 @@ namespace Org.Apache.REEF.Network.Naming
         /// <param name="remotePort">The port of the NameServer</param>
         [Inject]
         private NameClient(
-            [Parameter(typeof (NamingConfigurationOptions.NameServerAddress))] string remoteAddress,
-            [Parameter(typeof (NamingConfigurationOptions.NameServerPort))] int remotePort)
+            [Parameter(typeof(NamingConfigurationOptions.NameServerAddress))] string remoteAddress,
+            [Parameter(typeof(NamingConfigurationOptions.NameServerPort))] int remotePort)
         {
             IPEndPoint remoteEndpoint = new IPEndPoint(IPAddress.Parse(remoteAddress), remotePort);
             Initialize(remoteEndpoint);
@@ -202,7 +202,7 @@ namespace Org.Apache.REEF.Network.Naming
                 return assignments;
             }
             Exceptions.Throw(new WakeRuntimeException("NameClient failed to look up ids."), _logger);
-            return null;  //above line will throw exception. So null will never be returned.
+            return null;  // above line will throw exception. So null will never be returned.
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/ControlMessageCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/ControlMessageCodec.cs b/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/ControlMessageCodec.cs
index 471e651..89993cd 100644
--- a/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/ControlMessageCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/ControlMessageCodec.cs
@@ -32,12 +32,12 @@ namespace Org.Apache.REEF.Network.NetworkService.Codec
 
         public byte[] Encode(ControlMessage message)
         {
-            return BitConverter.GetBytes((int) message);
+            return BitConverter.GetBytes((int)message);
         }
 
         public ControlMessage Decode(byte[] data)
         {
-            return (ControlMessage) BitConverter.ToInt32(data, 0);
+            return (ControlMessage)BitConverter.ToInt32(data, 0);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/NsMessageStreamingCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/NsMessageStreamingCodec.cs b/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/NsMessageStreamingCodec.cs
index 1ac4e14..f6544c0 100644
--- a/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/NsMessageStreamingCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/NsMessageStreamingCodec.cs
@@ -55,7 +55,7 @@ namespace Org.Apache.REEF.Network.NetworkService.Codec
         /// Instantiate the class from the reader.
         /// </summary>
         /// <param name="reader">The reader from which to read</param>
-        ///<returns>The instance of type NsMessage<T></T> read from the reader</returns>
+        /// <returns>The instance of type NsMessage<T></T> read from the reader</returns>
         public NsMessage<T> Read(IDataReader reader)
         {
             int metadataSize = reader.ReadInt32();
@@ -98,10 +98,10 @@ namespace Org.Apache.REEF.Network.NetworkService.Codec
             }
         }
 
-        ///  <summary>
-        ///  Instantiate the class from the reader.
-        ///  </summary>
-        ///  <param name="reader">The reader from which to read</param>
+        /// <summary>
+        /// Instantiate the class from the reader.
+        /// </summary>
+        /// <param name="reader">The reader from which to read</param>
         /// <param name="token">Cancellation token</param>
         /// <returns>The instance of type NsMessage<T> read from the reader</returns>
         public async Task<NsMessage<T>> ReadAsync(IDataReader reader, CancellationToken token)
@@ -147,7 +147,7 @@ namespace Org.Apache.REEF.Network.NetworkService.Codec
             }
         }
 
-        private static byte[] GenerateMetaDataEncoding(NsMessage<T> obj )
+        private static byte[] GenerateMetaDataEncoding(NsMessage<T> obj)
         {
             List<byte[]> metadataBytes = new List<byte[]>();
             byte[] sourceBytes = StringToBytes(obj.SourceId.ToString());
@@ -169,10 +169,10 @@ namespace Org.Apache.REEF.Network.NetworkService.Codec
         private Tuple<NsMessage<T>, int, Type> GenerateMetaDataDecoding(byte[] obj)
         {
             int srcCount = BitConverter.ToInt32(obj, 0);
-            int dstCount = BitConverter.ToInt32(obj, sizeof (int));
-            int msgTypeCount = BitConverter.ToInt32(obj, 2*sizeof (int));
+            int dstCount = BitConverter.ToInt32(obj, sizeof(int));
+            int msgTypeCount = BitConverter.ToInt32(obj, 2 * sizeof(int));
 
-            int offset = 3*sizeof (int);
+            int offset = 3 * sizeof(int);
             string srcString = BytesToString(obj.Skip(offset).Take(srcCount).ToArray());
             offset += srcCount;
             string dstString = BytesToString(obj.Skip(offset).Take(dstCount).ToArray());

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/StreamingCodecFunctionCache.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/StreamingCodecFunctionCache.cs b/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/StreamingCodecFunctionCache.cs
index 5248407..5866013 100644
--- a/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/StreamingCodecFunctionCache.cs
+++ b/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/StreamingCodecFunctionCache.cs
@@ -38,7 +38,7 @@ namespace Org.Apache.REEF.Network.NetworkService.Codec
     /// <typeparam name="T">The message type</typeparam>
     internal class StreamingCodecFunctionCache<T>
     {
-        private static readonly Logger Logger = Logger.GetLogger(typeof (StreamingCodecFunctionCache<T>));
+        private static readonly Logger Logger = Logger.GetLogger(typeof(StreamingCodecFunctionCache<T>));
         private readonly ConcurrentDictionary<Type, Func<IDataReader, T>> _readFuncCache;
         private readonly ConcurrentDictionary<Type, Func<IDataReader, CancellationToken, T>> _readAsyncFuncCache;
         private readonly ConcurrentDictionary<Type, Action<T, IDataWriter>> _writeFuncCache;
@@ -148,8 +148,8 @@ namespace Org.Apache.REEF.Network.NetworkService.Codec
                 var codec = _injector.GetInstance(codecType);
 
                 MethodInfo readMethod = codec.GetType().GetMethod("Read");
-                _readFuncCache[messageType] = (Func<IDataReader, T>) Delegate.CreateDelegate
-                    (typeof (Func<IDataReader, T>), codec, readMethod);
+                _readFuncCache[messageType] = (Func<IDataReader, T>)Delegate.CreateDelegate
+                    (typeof(Func<IDataReader, T>), codec, readMethod);
 
                 MethodInfo readAsyncMethod = codec.GetType().GetMethod("ReadAsync");
                 MethodInfo genericHelper = GetType()
@@ -157,13 +157,13 @@ namespace Org.Apache.REEF.Network.NetworkService.Codec
                 MethodInfo constructedHelper = genericHelper.MakeGenericMethod(messageType);
                 _readAsyncFuncCache[messageType] =
                     (Func<IDataReader, CancellationToken, T>)
-                        constructedHelper.Invoke(this, new[] {readAsyncMethod, codec});
+                        constructedHelper.Invoke(this, new[] { readAsyncMethod, codec });
 
                 MethodInfo writeMethod = codec.GetType().GetMethod("Write");
                 genericHelper = GetType().GetMethod("WriteHelperFunc", BindingFlags.NonPublic | BindingFlags.Instance);
                 constructedHelper = genericHelper.MakeGenericMethod(messageType);
                 _writeFuncCache[messageType] =
-                    (Action<T, IDataWriter>) constructedHelper.Invoke(this, new[] {writeMethod, codec});
+                    (Action<T, IDataWriter>)constructedHelper.Invoke(this, new[] { writeMethod, codec });
 
                 MethodInfo writeAsyncMethod = codec.GetType().GetMethod("WriteAsync");
                 genericHelper = GetType()
@@ -171,14 +171,14 @@ namespace Org.Apache.REEF.Network.NetworkService.Codec
                 constructedHelper = genericHelper.MakeGenericMethod(messageType);
                 _writeAsyncFuncCache[messageType] =
                     (Func<T, IDataWriter, CancellationToken, Task>)
-                        constructedHelper.Invoke(this, new[] {writeAsyncMethod, codec});
+                        constructedHelper.Invoke(this, new[] { writeAsyncMethod, codec });
             }
         }
 
         private Action<T, IDataWriter> WriteHelperFunc<T1>(MethodInfo method, object codec) where T1 : class
         {
-            Action<T1, IDataWriter> func = (Action<T1, IDataWriter>) Delegate.CreateDelegate
-                (typeof (Action<T1, IDataWriter>), codec, method);
+            Action<T1, IDataWriter> func = (Action<T1, IDataWriter>)Delegate.CreateDelegate
+                (typeof(Action<T1, IDataWriter>), codec, method);
 
             Action<T, IDataWriter> ret = (obj, writer) => func(obj as T1, writer);
             return ret;
@@ -188,8 +188,8 @@ namespace Org.Apache.REEF.Network.NetworkService.Codec
             where T1 : class
         {
             Func<T1, IDataWriter, CancellationToken, Task> func =
-                (Func<T1, IDataWriter, CancellationToken, Task>) Delegate.CreateDelegate
-                    (typeof (Func<T1, IDataWriter, CancellationToken, Task>), codec, method);
+                (Func<T1, IDataWriter, CancellationToken, Task>)Delegate.CreateDelegate
+                    (typeof(Func<T1, IDataWriter, CancellationToken, Task>), codec, method);
 
             Func<T, IDataWriter, CancellationToken, Task> ret = (obj, writer, token) => func(obj as T1, writer, token);
             return ret;
@@ -199,8 +199,8 @@ namespace Org.Apache.REEF.Network.NetworkService.Codec
             where T1 : class
         {
             Func<IDataReader, CancellationToken, Task<T1>> func =
-                (Func<IDataReader, CancellationToken, Task<T1>>) Delegate.CreateDelegate
-                    (typeof (Func<IDataReader, CancellationToken, Task<T1>>), codec, method);
+                (Func<IDataReader, CancellationToken, Task<T1>>)Delegate.CreateDelegate
+                    (typeof(Func<IDataReader, CancellationToken, Task<T1>>), codec, method);
 
             Func<IDataReader, CancellationToken, T1> func1 = (writer, token) => func(writer, token).Result;
             Func<IDataReader, CancellationToken, T> func2 = (writer, token) => ((T)(object)func1(writer, token));

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj b/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj
index 4cf303c..f8a189a 100644
--- a/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj
+++ b/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj
@@ -190,6 +190,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
@@ -197,4 +198,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Examples/AnonymousType.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Examples/AnonymousType.cs b/lang/cs/Org.Apache.REEF.Tang.Examples/AnonymousType.cs
index 1d9595a..d7f076e 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Examples/AnonymousType.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Examples/AnonymousType.cs
@@ -36,7 +36,7 @@ namespace Org.Apache.REEF.Tang.Examples
         private readonly Dictionary<string, MyEventStreamDefinition> d = new Dictionary<string, MyEventStreamDefinition>();
         private Dictionary<string, int> d2;
 
-        //Anonymous class in injectable constructor
+        // Anonymous class in injectable constructor
         [Inject]
         public AnonymousType()
         {
@@ -45,7 +45,7 @@ namespace Org.Apache.REEF.Tang.Examples
                 .ToDictionary(e => e.Key, e => e.i);
         }
 
-        //Anonymous class in other constructor
+        // Anonymous class in other constructor
         public AnonymousType(Dictionary<string, MyEventStreamDefinition> d)
         {
             this.d = d;            

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Examples/CheckChild.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Examples/CheckChild.cs b/lang/cs/Org.Apache.REEF.Tang.Examples/CheckChild.cs
index 785ba2d..db4a170 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Examples/CheckChild.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Examples/CheckChild.cs
@@ -28,6 +28,6 @@ namespace Org.Apache.REEF.Tang.Examples
     public class CheckChildImpl : CheckChildIface
     {
         [Inject]
-        public CheckChildImpl() {}
+        public CheckChildImpl() { }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Examples/ForksInjectorInConstructor.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Examples/ForksInjectorInConstructor.cs b/lang/cs/Org.Apache.REEF.Tang.Examples/ForksInjectorInConstructor.cs
index 7661791..0b9a4ef 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Examples/ForksInjectorInConstructor.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Examples/ForksInjectorInConstructor.cs
@@ -47,7 +47,7 @@ namespace Org.Apache.REEF.Tang.Examples
         public ForksInjectorInConstructor(IInjector i)
         {
             ICsConfigurationBuilder cb = TangFactory.GetTang().NewConfigurationBuilder(new string[] { @"Org.Apache.REEF.Tang.Examples" });
-            //cb.BindImplementation(Number.class, typeof(Int32));
+            // cb.BindImplementation(Number.class, typeof(Int32));
             i.ForkInjector(cb.Build());
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.csproj b/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.csproj
index 186d86d..b0bc78d 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.csproj
+++ b/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.csproj
@@ -64,6 +64,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -77,4 +78,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Examples/ShortNameFooAB.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Examples/ShortNameFooAB.cs b/lang/cs/Org.Apache.REEF.Tang.Examples/ShortNameFooAB.cs
index 1529004..4214111 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Examples/ShortNameFooAB.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Examples/ShortNameFooAB.cs
@@ -27,7 +27,7 @@ namespace Org.Apache.REEF.Tang.Examples
     {
     }
 
-    //when same short name is used, exception would throw when building the class hierarchy
+    // when same short name is used, exception would throw when building the class hierarchy
     [NamedParameter(ShortName = "fooB")]
     public class ShortNameFooB : Name<Int32> 
     {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Examples/TweetExample.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Examples/TweetExample.cs b/lang/cs/Org.Apache.REEF.Tang.Examples/TweetExample.cs
index d72636d..fab15e1 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Examples/TweetExample.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Examples/TweetExample.cs
@@ -67,7 +67,7 @@ namespace Org.Apache.REEF.Tang.Examples
         readonly ISMS sms;
         readonly long phoneNumber;
 
-        [NamedParameter(Documentation="Phone number", ShortName="number", DefaultValue="1800")]
+        [NamedParameter(Documentation = "Phone number", ShortName = "number", DefaultValue = "1800")]
         public class PhoneNumber : Name<long> { }
         [Inject]
         public Tweeter(ITweetFactory tw, ISMS sms, [Parameter(typeof(PhoneNumber))] long phoneNumber)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestAvroSerialization.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestAvroSerialization.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestAvroSerialization.cs
index ade7479..ad3d8a8 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestAvroSerialization.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestAvroSerialization.cs
@@ -74,7 +74,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
             INode secondNode = ns.GetNode(secondType.AssemblyQualifiedName);
             IClassNode simpleConstructorsClassNode = (IClassNode)ns.GetNode(simpleConstructorType.AssemblyQualifiedName);
 
-            AvroNode n =_serializer.ToAvroNode(ns);
+            AvroNode n = _serializer.ToAvroNode(ns);
             IClassHierarchy ns2 = _serializer.FromAvroNode(n);
 
             IClassNode timerClassNode2 = (IClassNode)ns2.GetNode(timerType.AssemblyQualifiedName);
@@ -96,7 +96,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
         public void TestGetSchema()
         {
             var serializer = AvroSerializer.Create<AvroNode>();
-            var s =  serializer.WriterSchema.ToString();
+            var s = serializer.WriterSchema.ToString();
             Assert.IsNotNull(s);
         }
 
@@ -157,7 +157,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
         /// Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type 'Org.Apache.REEF.Tang.Implementations.ClassHierarchy.AvroDataContract.AvroClassNode'.
         /// This is because auto generated code use object as return type instead of AvroClassNode
         /// </summary>
-        [Ignore]  //TODO: after Avro fix the issue. Enable the test
+        [Ignore]  // TODO: after Avro fix the issue. Enable the test
         [TestMethod]
         public void TestToFromJsonString()
         {
@@ -189,7 +189,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
         /// Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type 'Org.Apache.REEF.Tang.Implementations.ClassHierarchy.AvroDataContract.AvroClassNode'.
         /// This is because auto generated code use object as return type instead of AvroClassNode
         /// </summary>
-        [Ignore] //TODO: after Avro fix the issue. Enable the test
+        [Ignore] // TODO: after Avro fix the issue. Enable the test
         [TestMethod]
         public void TestToFromTextFile()
         {
@@ -219,7 +219,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
         /// Test serialize a class hierarchy to a file and deserialize from the file
         /// Currently, in ToFile() method, writer.Write(avroNodeData) throw exception "Value cannot be null.\r\nParameter name: value". 
         /// </summary>
-        [Ignore]  //TODO: after Avro fix the issue. Enable the test
+        [Ignore]  // TODO: after Avro fix the issue. Enable the test
         [TestMethod]
         public void TestToFromFile()
         {
@@ -249,7 +249,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
         /// Test serialize class hierarchy to byte array and deserializa back to class hierarchy
         /// AvroSerializer.Serialize(stream, obj) doesn't allow any null values in the obj to be serialized even if it is nullable
         /// </summary>
-        [Ignore]  //TODO: after Avro fix the issue. Enable the test
+        [Ignore]  // TODO: after Avro fix the issue. Enable the test
         [TestMethod]
         public void TestToFromByteArray()
         {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestClassHierarchy.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestClassHierarchy.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestClassHierarchy.cs
index f6e36b5..a543aa5 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestClassHierarchy.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestClassHierarchy.cs
@@ -43,7 +43,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
             if (ns == null)
             {
                 TangImpl.Reset();
-                ns = TangFactory.GetTang().GetClassHierarchy(new string[] {FileNames.Examples, FileNames.Common, FileNames.Tasks});
+                ns = TangFactory.GetTang().GetClassHierarchy(new string[] { FileNames.Examples, FileNames.Common, FileNames.Tasks });
             }
         }
 
@@ -649,7 +649,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
     {
     }
 
-    //when same short name is used, exception would throw when building the class hierarchy
+    // when same short name is used, exception would throw when building the class hierarchy
     [NamedParameter(ShortName = "foo")]
     public class ShortNameFooB : Name<Int32>
     {
@@ -670,31 +670,31 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
 
         public class X1 : X
         {
-            //int i;
+            // int i;
         }
 
         public class Y1 : X
         {
-            //int j;
+            // int j;
         }
 
         public static X XObj = new X1();
         public static X YObj = new Y1();
     }
 
-    //Negative case: Int32 doesn't match string
+    // Negative case: Int32 doesn't match string
     [NamedParameter(DefaultClass = typeof(Int32))]
     class BadName : Name<string>
     {        
     }
 
-    //Negative case: Int32 doesn't match string in the ISet
+    // Negative case: Int32 doesn't match string in the ISet
     [NamedParameter(DefaultClass = typeof(Int32))]
     class BadNameForGeneric : Name<ISet<string>>
     {
     }
 
-    //Positive case: type matched. ISet is not in parsable list
+    // Positive case: type matched. ISet is not in parsable list
     [NamedParameter(DefaultClass = typeof(string))]
     class GoodNameForGeneric : Name<ISet<string>>
     {
@@ -705,7 +705,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
     {        
     }
 
-    //negative case: type matched. However, string is in the parsable list and DefaultClass is not null. 
+    // negative case: type matched. However, string is in the parsable list and DefaultClass is not null. 
     [NamedParameter(DefaultClass = typeof(string))]
     class BadParsableDefaultClass : Name<string>
     {        

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestNamedParameter.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestNamedParameter.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestNamedParameter.cs
index 33f0a67..cf7bdd4 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestNamedParameter.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestNamedParameter.cs
@@ -87,8 +87,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
         DefaultValues = null,
         DefaultClasses = null,
         Alias = "org.apache.REEF.tang.tests.classHierarchy.NamedParameterWithDefaultValues",
-        AliasLanguage = Language.Java
-     )]
+        AliasLanguage = Language.Java)]
 
     public class NamedParameterWithDefaultValues : Name<string> 
     {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestParameterParser.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestParameterParser.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestParameterParser.cs
index bf8a11e..3d107be 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestParameterParser.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestParameterParser.cs
@@ -115,11 +115,11 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
         {
             ParameterParser p = new ParameterParser();
             
-            //p.AddParser(typeof(FooParser));
+            // p.AddParser(typeof(FooParser));
             Foo f = null;
             try
             {
-                f = (Foo) p.Parse(typeof (Foo), "woot");
+                f = (Foo)p.Parse(typeof(Foo), "woot");
             }
             catch (NotSupportedException)
             {
@@ -182,7 +182,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
         public void testEndToEnd() 
         {
             ITang tang = TangFactory.GetTang();
-            ICsConfigurationBuilder cb = tang.NewConfigurationBuilder(new Type[] {typeof(BarParser) });
+            ICsConfigurationBuilder cb = tang.NewConfigurationBuilder(new Type[] { typeof(BarParser) });
             cb.BindNamedParameter<SomeNamedFoo, Foo>(GenericType<SomeNamedFoo>.Class, "hdfs://woot");
             ILikeBars ilb = tang.NewInjector(cb.Build()).GetInstance<ILikeBars>();
             Assert.IsNotNull(ilb);
@@ -196,14 +196,14 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
 
             ICsConfigurationBuilder cb2 = tang.NewConfigurationBuilder(new IConfiguration[] { cb.Build() });
 
-            cb2.BindNamedParameter<ParseName, ParseableType>(GenericType<ParseName>.Class, "a"); //ParseName : Name<ParseableType>
+            cb2.BindNamedParameter<ParseName, ParseableType>(GenericType<ParseName>.Class, "a"); // ParseName : Name<ParseableType>
 
             ParseableType t = (ParseableType)tang.NewInjector(cb2.Build()).GetNamedInstance(typeof(ParseName));
             Assert.IsTrue(t is ParseTypeA);
 
             cb2 = tang.NewConfigurationBuilder(cb.Build());
-            cb2.BindNamedParameter<ParseNameB, ParseTypeB>(GenericType<ParseNameB>.Class, "b"); //ParseNameB : Name<ParseTypeB : ParseableType>
-            cb2.BindNamedParameter<ParseNameA, ParseableType>(GenericType<ParseNameA>.Class, "a"); //ParseNameA : Name<ParseableType>
+            cb2.BindNamedParameter<ParseNameB, ParseTypeB>(GenericType<ParseNameB>.Class, "b"); // ParseNameB : Name<ParseTypeB : ParseableType>
+            cb2.BindNamedParameter<ParseNameA, ParseableType>(GenericType<ParseNameA>.Class, "a"); // ParseNameA : Name<ParseableType>
 
             tang.NewInjector(cb2.Build()).GetInstance(typeof(NeedsA));
             tang.NewInjector(cb2.Build()).GetInstance(typeof(NeedsB));

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestSerilization.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestSerilization.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestSerilization.cs
index 477d876..6d698a0 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestSerilization.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestSerilization.cs
@@ -70,9 +70,9 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
         [TestMethod]
         public void TestDeSerializeClassHierarchy()
         {
-            Type timerType = typeof (Timer);
-            Type SecondType = typeof (Timer.Seconds);
-            Type simpleCOnstuctorType = typeof (SimpleConstructors);
+            Type timerType = typeof(Timer);
+            Type SecondType = typeof(Timer.Seconds);
+            Type simpleCOnstuctorType = typeof(SimpleConstructors);
 
             IClassHierarchy ns = TangFactory.GetTang().GetClassHierarchy(new string[] { typeof(Timer).Assembly.GetName().Name });
             IClassNode timerClassNode = (IClassNode)ns.GetNode(timerType.AssemblyQualifiedName);
@@ -98,8 +98,8 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
         [TestMethod]
         public void TestDeSerializeClassHierarchyForTask()
         {
-            Type streamTask1Type = typeof (StreamTask1);
-            Type helloTaskType = typeof (HelloTask);
+            Type streamTask1Type = typeof(StreamTask1);
+            Type helloTaskType = typeof(HelloTask);
 
             IClassHierarchy ns = TangFactory.GetTang().GetClassHierarchy(new string[] { typeof(HelloTask).Assembly.GetName().Name });
             IClassNode StreamTask1ClassNode = (IClassNode)ns.GetNode(streamTask1Type.AssemblyQualifiedName);
@@ -118,7 +118,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
         [DeploymentItem(@".")]
         public void TestDeSerializeClassHierarchyFromJava()
         {
-            //the file comes from Java TestClassHierarchyRoundTrip SetUp3 testSimpleConstructors
+            // the file comes from Java TestClassHierarchyRoundTrip SetUp3 testSimpleConstructors
             IClassHierarchy ch = ProtocolBufferClassHierarchy.DeSerialize("simpleConstructorJavaProto.bin");
             IClassNode simpleConstructorNode = (IClassNode)ch.GetNode("org.apache.reef.tang.implementation.SimpleConstructors");
             Assert.AreEqual(simpleConstructorNode.GetChildren().Count, 0);
@@ -153,7 +153,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
             Assert.AreEqual(StreamTask1ClassNode.GetName(), StreamTask1ClassNode2.GetName());
             Assert.AreEqual(HelloTaskClassNode.GetName(), HelloTaskClassNode2.GetName());
 
-            //have to use original class hierarchy for the merge. ClassHierarchy from ProtoBuffer doesn't support merge. 
+            // have to use original class hierarchy for the merge. ClassHierarchy from ProtoBuffer doesn't support merge. 
             IConfigurationBuilder cb = TangFactory.GetTang()
                   .NewConfigurationBuilder(ns);
             cb.AddConfiguration(TaskConfiguration.ConfigurationModule
@@ -172,7 +172,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
             Type timerType = typeof(Timer);
             ITang tang = TangFactory.GetTang();
             ICsConfigurationBuilder cb = tang.NewConfigurationBuilder(new string[] { FileNames.Examples });
-            cb.BindNamedParameter<Timer.Seconds, Int32>(GenericType < Timer.Seconds>.Class, "2");
+            cb.BindNamedParameter<Timer.Seconds, Int32>(GenericType<Timer.Seconds>.Class, "2");
             IConfiguration conf = cb.Build();
             IInjector injector = tang.NewInjector(conf);
             Org.Apache.REEF.Tang.Implementations.InjectionPlan.InjectionPlan ip = injector.GetInjectionPlan(timerType);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs
index 89005b2..f986316 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs
@@ -81,7 +81,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
         [TestMethod]
         public void TestActivityConfiguration()
         {
-            Type activityInterfaceType = typeof (ITask);
+            Type activityInterfaceType = typeof(ITask);
             ITang tang = TangFactory.GetTang();
             ICsConfigurationBuilder cb = tang.NewConfigurationBuilder(new string[] { FileNames.Common, FileNames.Tasks });
             cb.BindImplementation(GenericType<ITask>.Class, GenericType<HelloTask>.Class);
@@ -98,14 +98,14 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
             IConfiguration conf1 = cb1.Build();
 
             IInjector injector = tang1.NewInjector(conf1);
-            var activityRef = (ITask) injector.GetInstance(activityInterfaceType);
+            var activityRef = (ITask)injector.GetInstance(activityInterfaceType);
             Assert.IsNotNull(activityRef);
         }
 
         [TestMethod]
         public void TestMultipleConfiguration()
         {
-            Type activityInterfaceType = typeof (ITask);
+            Type activityInterfaceType = typeof(ITask);
             ITang tang = TangFactory.GetTang();
             ICsConfigurationBuilder cb = tang.NewConfigurationBuilder(new string[] { FileNames.Common, FileNames.Tasks });
             cb.BindImplementation(GenericType<ITask>.Class, GenericType<HelloTask>.Class);
@@ -118,8 +118,8 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
                 .Set(HttpHandlerConfiguration.P, GenericType<HttpServerNrtEventHandler>.Class)
                 .Build();
 
-            IInjector injector = TangFactory.GetTang().NewInjector(new IConfiguration[] {conf, httpConfiguraiton});
-            var activityRef = (ITask) injector.GetInstance(activityInterfaceType);
+            IInjector injector = TangFactory.GetTang().NewInjector(new IConfiguration[] { conf, httpConfiguraiton });
+            var activityRef = (ITask)injector.GetInstance(activityInterfaceType);
             Assert.IsNotNull(activityRef);
 
             RuntimeClock clock = injector.GetInstance<RuntimeClock>();
@@ -130,7 +130,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
         [TestMethod]
         public void TestActivityConfigWithSeparateAssembly()
         {
-            Type activityInterfaceType = typeof (ITask);
+            Type activityInterfaceType = typeof(ITask);
             ITang tang = TangFactory.GetTang();
             ICsConfigurationBuilder cb = tang.NewConfigurationBuilder(new string[] { FileNames.Common, FileNames.Tasks });
             cb.BindImplementation(GenericType<ITask>.Class, GenericType<HelloTask>.Class);
@@ -140,12 +140,12 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
             IDictionary<string, string> p = ConfigurationFile.FromFile("TaskConf1.txt");
 
             IInjector injector = tang.NewInjector(new string[] { FileNames.Common, FileNames.Tasks }, "TaskConf1.txt");
-            var activityRef = (ITask) injector.GetInstance(activityInterfaceType);
+            var activityRef = (ITask)injector.GetInstance(activityInterfaceType);
 
-            //combined line sample
-            var o = (ITask) TangFactory.GetTang()
+            // combined line sample
+            var o = (ITask)TangFactory.GetTang()
                    .NewInjector(new string[] { FileNames.Common, FileNames.Tasks }, "TaskConf1.txt")
-                   .GetInstance(typeof (ITask));
+                   .GetInstance(typeof(ITask));
 
             Assert.IsNotNull(activityRef);
         }
@@ -155,7 +155,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
         {
             Type iTaskType = typeof(ITask);
             Type helloTaskType = typeof(HelloTask);
-            Type identifierType = typeof (TaskConfigurationOptions.Identifier);
+            Type identifierType = typeof(TaskConfigurationOptions.Identifier);
 
             IClassHierarchy ns = TangFactory.GetTang().GetClassHierarchy(new string[] { FileNames.Common, FileNames.Tasks });
             ProtocolBufferClassHierarchy.Serialize("Task.bin", ns);
@@ -171,7 +171,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
         [TestMethod]
         public void TestActivityConfig()
         {
-            Type activityInterfaceType = typeof (ITask);
+            Type activityInterfaceType = typeof(ITask);
             ITang tang = TangFactory.GetTang();
             ICsConfigurationBuilder cb = tang.NewConfigurationBuilder(new string[] { FileNames.Examples, FileNames.Common, FileNames.Tasks });
             cb.BindImplementation(GenericType<ITask>.Class, GenericType<HelloTask>.Class);
@@ -180,7 +180,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
             IDictionary<string, string> p = ConfigurationFile.FromFile("TaskConf.txt");
 
             IInjector injector = tang.NewInjector(new string[] { FileNames.Common, FileNames.Tasks }, "TaskConf.txt");
-            var activityRef = (ITask) injector.GetInstance(activityInterfaceType);
+            var activityRef = (ITask)injector.GetInstance(activityInterfaceType);
 
             Assert.IsNotNull(activityRef);
         }
@@ -188,7 +188,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
         [TestMethod]
         public void TestActivityConfigWithString()
         {
-            Type activityInterfaceType = typeof (ITask);
+            Type activityInterfaceType = typeof(ITask);
             ITang tang = TangFactory.GetTang();
             ICsConfigurationBuilder cb = tang.NewConfigurationBuilder(new string[] { FileNames.Examples, FileNames.Common, FileNames.Tasks });
             cb.BindImplementation(GenericType<ITask>.Class, GenericType<HelloTask>.Class);
@@ -200,7 +200,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
             IConfiguration conf2 = cb2.Build();
 
             IInjector injector = tang.NewInjector(conf2);
-            var activityRef = (ITask) injector.GetInstance(activityInterfaceType);
+            var activityRef = (ITask)injector.GetInstance(activityInterfaceType);
 
             Assert.IsNotNull(activityRef);
         }
@@ -208,7 +208,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
         [TestMethod]
         public void TestTweetConfiguration()
         {
-            Type tweeterType = typeof (Tweeter);
+            Type tweeterType = typeof(Tweeter);
             ITang tang = TangFactory.GetTang();
             ICsConfigurationBuilder cb = tang.NewConfigurationBuilder(new string[] { FileNames.Examples });
             cb.BindImplementation(GenericType<ITweetFactory>.Class, GenericType<MockTweetFactory>.Class);
@@ -224,14 +224,14 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
             IConfiguration conf1 = cb1.Build();
 
             IInjector injector = tang1.NewInjector(conf1);
-            var tweeter = (Tweeter) injector.GetInstance(tweeterType);
+            var tweeter = (Tweeter)injector.GetInstance(tweeterType);
             tweeter.sendMessage();
         }
 
         [TestMethod]
         public void TestTweetConfig()
         {
-            Type tweeterType = typeof (Tweeter);
+            Type tweeterType = typeof(Tweeter);
             ITang tang = TangFactory.GetTang();
             ICsConfigurationBuilder cb = tang.NewConfigurationBuilder(new string[] { FileNames.Examples });
             cb.BindImplementation(GenericType<ITweetFactory>.Class, GenericType<MockTweetFactory>.Class);
@@ -243,7 +243,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
             IDictionary<string, string> p = ConfigurationFile.FromFile("tweeterConf.txt");
 
             IInjector injector = tang.NewInjector(new string[] { FileNames.Examples }, "tweeterConf.txt");
-            var tweeter = (Tweeter) injector.GetInstance(tweeterType);
+            var tweeter = (Tweeter)injector.GetInstance(tweeterType);
             tweeter.sendMessage();
         }
 
@@ -251,7 +251,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
         [TestMethod]
         public void TestTweetConfigWithAvroThroughFile()
         {
-            Type tweeterType = typeof (Tweeter);
+            Type tweeterType = typeof(Tweeter);
             ITang tang = TangFactory.GetTang();
             IConfiguration conf = tang.NewConfigurationBuilder(new string[] { FileNames.Examples })
                                       .BindImplementation(GenericType<ITweetFactory>.Class,
@@ -266,14 +266,14 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
             IConfiguration conf2 = serializer.FromFileStream("tweeterConfAvro.bin");
 
             IInjector injector = tang.NewInjector(conf2);
-            var tweeter = (Tweeter) injector.GetInstance(tweeterType);
+            var tweeter = (Tweeter)injector.GetInstance(tweeterType);
             tweeter.sendMessage();
         }
 
         [TestMethod]
         public void TestTweetConfigAddConfigurationFromString()
         {
-            Type tweeterType = typeof (Tweeter);
+            Type tweeterType = typeof(Tweeter);
             ITang tang = TangFactory.GetTang();
             IConfiguration conf = tang.NewConfigurationBuilder(new string[] { FileNames.Examples })
                                       .BindImplementation(GenericType<ITweetFactory>.Class,
@@ -290,14 +290,14 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
             IConfiguration conf2 = cb2.Build();
 
             IInjector injector = tang.NewInjector(conf2);
-            var tweeter = (Tweeter) injector.GetInstance(tweeterType);
+            var tweeter = (Tweeter)injector.GetInstance(tweeterType);
             tweeter.sendMessage();
         }
 
         [TestMethod]
         public void TestTweetConfigWithAvroSerialization()
         {
-            Type tweeterType = typeof (Tweeter);
+            Type tweeterType = typeof(Tweeter);
             ITang tang = TangFactory.GetTang();
             IConfiguration conf = tang.NewConfigurationBuilder(new string[] { FileNames.Examples })
                                       .BindImplementation(GenericType<ITweetFactory>.Class,
@@ -312,14 +312,14 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
             IConfiguration conf2 = serializer.FromByteArray(bytes);
 
             IInjector injector = tang.NewInjector(conf2);
-            var tweeter = (Tweeter) injector.GetInstance(tweeterType);
+            var tweeter = (Tweeter)injector.GetInstance(tweeterType);
             tweeter.sendMessage();
         }
 
         [TestMethod]
         public void TestTweetConfigGetConfigurationFromString()
         {
-            Type tweeterType = typeof (Tweeter);
+            Type tweeterType = typeof(Tweeter);
             ITang tang = TangFactory.GetTang();
             IConfiguration conf = tang.NewConfigurationBuilder(new string[] { FileNames.Examples })
                                       .BindImplementation(GenericType<ITweetFactory>.Class,
@@ -334,7 +334,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
             IConfiguration conf2 = ConfigurationFile.GetConfiguration(s);
 
             IInjector injector = tang.NewInjector(conf2);
-            var tweeter = (Tweeter) injector.GetInstance(tweeterType);
+            var tweeter = (Tweeter)injector.GetInstance(tweeterType);
             tweeter.sendMessage();
         }
 
@@ -345,7 +345,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
             try
             {
                 TangFactory.GetTang().NewConfigurationBuilder(new string[] { FileNames.Examples })
-                           .BindImplementation(typeof (ITweetFactory), typeof (MockSMS))
+                           .BindImplementation(typeof(ITweetFactory), typeof(MockSMS))
                            .Build();
             }
             catch (ArgumentException e)
@@ -358,7 +358,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
         [TestMethod]
         public void TestTimerConfiguration()
         {
-            Type timerType = typeof (Timer);
+            Type timerType = typeof(Timer);
             ITang tang = TangFactory.GetTang();
             ICsConfigurationBuilder cb = tang.NewConfigurationBuilder(new string[] { FileNames.Examples });
             cb.BindNamedParameter<Timer.Seconds, Int32>(GenericType<Timer.Seconds>.Class, "2");
@@ -373,7 +373,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
             IConfiguration conf1 = cb1.Build();
 
             IInjector injector = tang.NewInjector(conf1);
-            var timer = (Timer) injector.GetInstance(timerType);
+            var timer = (Timer)injector.GetInstance(timerType);
 
             Assert.IsNotNull(timer);
 
@@ -383,7 +383,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
         [TestMethod]
         public void TestDocumentLoadNamedParameterConfiguration()
         {
-            Type documentedLocalNamedParameterType = typeof (DocumentedLocalNamedParameter);
+            Type documentedLocalNamedParameterType = typeof(DocumentedLocalNamedParameter);
             ITang tang = TangFactory.GetTang();
             ICsConfigurationBuilder cb = tang.NewConfigurationBuilder(new string[] { FileNames.Examples });
             cb.BindNamedParameter<DocumentedLocalNamedParameter.Foo, string>(
@@ -399,7 +399,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
             IConfiguration conf1 = cb1.Build();
 
             IInjector injector = tang1.NewInjector(conf1);
-            var doc = (DocumentedLocalNamedParameter) injector.GetInstance(documentedLocalNamedParameterType);
+            var doc = (DocumentedLocalNamedParameter)injector.GetInstance(documentedLocalNamedParameterType);
 
             Assert.IsNotNull(doc);
             var s = doc.ToString();
@@ -408,7 +408,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
         [TestMethod]
         public void TestTimerConfigurationWithClassHierarchy()
         {
-            Type timerType = typeof (Timer);
+            Type timerType = typeof(Timer);
             ClassHierarchyImpl classHierarchyImpl = new ClassHierarchyImpl(FileNames.Examples);
 
             ITang tang = TangFactory.GetTang();
@@ -425,7 +425,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
             IConfiguration conf1 = cb1.Build();
 
             IInjector injector = tang1.NewInjector(conf1);
-            var timer = (Timer) injector.GetInstance(timerType);
+            var timer = (Timer)injector.GetInstance(timerType);
 
             Assert.IsNotNull(timer);
             timer.sleep();
@@ -440,13 +440,13 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
                 .BindSetEntry<SetOfNumbers, string>(GenericType<SetOfNumbers>.Class, "six")
                 .Build();
 
-            Box b = (Box) TangFactory.GetTang().NewInjector(conf).GetInstance(typeof (Box));
+            Box b = (Box)TangFactory.GetTang().NewInjector(conf).GetInstance(typeof(Box));
             ConfigurationFile.WriteConfigurationFile(conf, "SetOfNumbersConf.txt");
 
             string s = ConfigurationFile.ToConfigurationString(conf);
             IConfiguration conf2 = ConfigurationFile.GetConfiguration(s);
 
-            Box b2 = (Box) TangFactory.GetTang().NewInjector(conf2).GetInstance(typeof (Box));
+            Box b2 = (Box)TangFactory.GetTang().NewInjector(conf2).GetInstance(typeof(Box));
             ISet<string> actual = b2.Numbers;
 
             Assert.IsTrue(actual.Contains("four"));
@@ -463,13 +463,13 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
                     .BindSetEntry<SetOfNumbers, string>(GenericType<SetOfNumbers>.Class, "six")
                     .Build();
 
-            Box b = (Box) TangFactory.GetTang().NewInjector(conf).GetInstance(typeof (Box));
+            Box b = (Box)TangFactory.GetTang().NewInjector(conf).GetInstance(typeof(Box));
 
             var serializer = new AvroConfigurationSerializer();
             byte[] bytes = serializer.ToByteArray(conf);
             IConfiguration conf2 = serializer.FromByteArray(bytes);
 
-            Box b2 = (Box) TangFactory.GetTang().NewInjector(conf2).GetInstance(typeof (Box));
+            Box b2 = (Box)TangFactory.GetTang().NewInjector(conf2).GetInstance(typeof(Box));
             ISet<string> actual = b2.Numbers;
 
             Assert.IsTrue(actual.Contains("four"));
@@ -514,7 +514,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
         }
     }
 
-    [NamedParameter(DefaultValues = new string[] {"one", "two", "three"})]
+    [NamedParameter(DefaultValues = new string[] { "one", "two", "three" })]
     class SetOfNumbers : Name<ISet<string>>
     {
     }
@@ -524,7 +524,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
         public ISet<string> Numbers;
 
         [Inject]
-        Box([Parameter(typeof (SetOfNumbers))] ISet<string> numbers)
+        Box([Parameter(typeof(SetOfNumbers))] ISet<string> numbers)
         {
             this.Numbers = numbers;
         }
@@ -556,7 +556,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
         }
 
         [Inject]
-        NamedParameterNoDefault([Parameter(typeof (NamedString))] string str)
+        NamedParameterNoDefault([Parameter(typeof(NamedString))] string str)
         {
             this.str = str;
         }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestCsConfigurationBuilderExtension.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestCsConfigurationBuilderExtension.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestCsConfigurationBuilderExtension.cs
index ef9adfa..3740fd7 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestCsConfigurationBuilderExtension.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestCsConfigurationBuilderExtension.cs
@@ -83,8 +83,8 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
         public void TestBindSetEntryImplValue()
         {
             ICsConfigurationBuilder cb = TangFactory.GetTang().NewConfigurationBuilder();
-            cb.BindSetEntry<TestSetInjection.SetOfClasses, TestSetInjection.Integer1, INumber>()  //bind an impl to the interface of the set
-              .BindIntNamedParam<TestSetInjection.Integer1.NamedInt>("4"); //bind parameter for the impl
+            cb.BindSetEntry<TestSetInjection.SetOfClasses, TestSetInjection.Integer1, INumber>()  // bind an impl to the interface of the set
+              .BindIntNamedParam<TestSetInjection.Integer1.NamedInt>("4"); // bind parameter for the impl
 
             IInjector i = TangFactory.GetTang().NewInjector(cb.Build());
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModule.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModule.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModule.cs
index 7a5c117..dfa6805 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModule.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModule.cs
@@ -109,7 +109,7 @@ namespace Org.Apache.REEF.Tang.Tests.Format
             IFoo f5 = (IFoo)TangFactory.GetTang().NewInjector(c5).GetInstance(fooType);
             Assert.AreEqual(f5.getFooness(), 12);
            
-            //this is to test the file generated from Java. name,value b=must be recognized by C# class hierarchy
+            // this is to test the file generated from Java. name,value b=must be recognized by C# class hierarchy
             AvroConfigurationSerializer serializer = new AvroConfigurationSerializer();
             var avroConfig = serializer.AvroDeserializeFromFile("Evaluator.conf");
             Assert.IsNotNull(avroConfig);
@@ -318,7 +318,7 @@ namespace Org.Apache.REEF.Tang.Tests.Format
             AvroConfigurationSerializer serializer = new AvroConfigurationSerializer();
             IConfiguration c2 = serializer.FromString(serializer.ToString(cb.Build()));
 
-            //ConfigurationFile.AddConfiguration(cb, ConfigurationFile.ToConfigurationString(c));
+            // ConfigurationFile.AddConfiguration(cb, ConfigurationFile.ToConfigurationString(c));
             ISet<ISuper> s = (ISet<ISuper>)TangFactory.GetTang().NewInjector(c2).GetNamedInstance(typeof(SetClass));
             Assert.AreEqual(2, s.Count);
             bool sawA = false, sawB = false;

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModuleForList.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModuleForList.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModuleForList.cs
index 509c4d5..1132868 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModuleForList.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModuleForList.cs
@@ -35,8 +35,8 @@ namespace Org.Apache.REEF.Tang.Tests.Format
     [TestClass]
     public class TestConfigurationModuleForList
     {
-        //ConfigurationModuleBuilder BindList<U, T>(GenericType<U> iface, IParam<IList<T>> opt)
-        //public ConfigurationModule Set<T>(IImpl<IList<T>> opt, IList<string> impl)
+        // ConfigurationModuleBuilder BindList<U, T>(GenericType<U> iface, IParam<IList<T>> opt)
+        // public ConfigurationModule Set<T>(IImpl<IList<T>> opt, IList<string> impl)
         [TestMethod]
         public void ListParamTest()
         {
@@ -73,7 +73,7 @@ namespace Org.Apache.REEF.Tang.Tests.Format
             Assert.IsTrue(s[1] is ListSubB);
         }
 
-        //public ConfigurationModuleBuilder BindList<U, T>(GenericType<U> iface, IList<string> impl)
+        // public ConfigurationModuleBuilder BindList<U, T>(GenericType<U> iface, IList<string> impl)
         [TestMethod]
         public void ListStringTest()
         {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestAmbigousConstructors.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestAmbigousConstructors.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestAmbigousConstructors.cs
index 53c3fd9..56b9d52 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestAmbigousConstructors.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestAmbigousConstructors.cs
@@ -32,11 +32,11 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
         [TestMethod]
         public void AmbigousConstructorTest()
         {
-            //Cannot inject Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
-            //Ambiguous subplan Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-            //  new Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass(System.String Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass+NamedString = foo, System.Int32 Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass+NamedInt = 8) 
-            //  new Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass(System.Int32 Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass+NamedInt = 8, System.String Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass+NamedString = foo) 
-            //]
+            // Cannot inject Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
+            // Ambiguous subplan Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+            // new Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass(System.String Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass+NamedString = foo, System.Int32 Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass+NamedInt = 8) 
+            // new Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass(System.Int32 Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass+NamedInt = 8, System.String Org.Apache.REEF.Tang.Tests.Injection.AmbigousConstructorClass+NamedString = foo) 
+            // ]
             AmbigousConstructorClass obj = null;
             try
             {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestInjection.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestInjection.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestInjection.cs
index 99bb297..c87187a 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestInjection.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestInjection.cs
@@ -298,7 +298,7 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
 
             IInjector injector = tang.NewInjector(cb.Build());
 
-            //bind an object to the injetor so that Tang will get this instance from cache directly instead of inject it when injecting ClassWithExternalObject
+            // bind an object to the injetor so that Tang will get this instance from cache directly instead of inject it when injecting ClassWithExternalObject
             injector.BindVolatileInstance(GenericType<ExternalClass>.Class, new ExternalClass());
             ClassWithExternalObject o = injector.GetInstance<ClassWithExternalObject>();
 
@@ -319,7 +319,7 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
 
             var injector = TangFactory.GetTang().NewInjector(c);
 
-            //argument type must be specified in injection
+            // argument type must be specified in injection
             var o1 = injector.GetInstance(typeof(IMyOperator<int>));
             var o2 = injector.GetInstance(typeof(IMyOperator<string>));
             var o3 = injector.GetInstance(typeof(MyOperatorTopology<int>));
@@ -343,11 +343,11 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
 
             var injector = TangFactory.GetTang().NewInjector(c);
 
-            //get argument type from configuration
+            // get argument type from configuration
             var messageTypeAsString = injector.GetNamedInstance<MessageType, string>(GenericType<MessageType>.Class);
             Type messageType = Type.GetType(messageTypeAsString);
 
-            //creat interface with generic type on the fly
+            // create interface with generic type on the fly
             Type genericInterfaceType = typeof(IMyOperator<>);
             Type interfaceOfMessageType = genericInterfaceType.MakeGenericType(messageType);
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestListInjection.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestListInjection.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestListInjection.cs
index bbf92b6..4d4115e 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestListInjection.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestListInjection.cs
@@ -406,43 +406,43 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
             Assert.IsTrue(actual.Contains(new TestSetInjection.Float(42.0001f)));
         }
 
-        ///// <summary>
-        ///// Tests the subclass inject with multiple instances.
-        ///// </summary>
-        //[TestMethod] 
-        //public void TestSubclassInjectWithMultipleInstances()
-        //{
-        //    ICsConfigurationBuilder cb1 = TangFactory.GetTang().NewConfigurationBuilder()
-        //        .BindNamedParameter<TestSetInjection.Integer3.NamedInt, int>(GenericType<TestSetInjection.Integer3.NamedInt>.Class, "10");
-        //    TestSetInjection.Integer3 integer3 = TangFactory.GetTang().NewInjector(cb1.Build()).GetInstance<TestSetInjection.Integer3>();
-
-        //    ICsClassHierarchy classH = TangFactory.GetTang().GetDefaultClassHierarchy();
-        //    INamedParameterNode np = (INamedParameterNode)classH.GetNode(typeof(ListOfClasses));
-        //    IList<object> injected = new List<object>();
-        //    injected.Add(new TestSetInjection.Integer1(42)); //instance from the same class
-        //    injected.Add(new TestSetInjection.Integer1(30)); //instance from the same class
-        //    injected.Add(new TestSetInjection.Float1(42.0001f)); //instance from another subclass of the same interface
-        //    injected.Add(typeof(TestSetInjection.Float1).AssemblyQualifiedName); //inject from another subclass of the same interface
-        //    injected.Add(typeof(TestSetInjection.Integer1).AssemblyQualifiedName); //inject using configuration
-        //    injected.Add(typeof(TestSetInjection.Integer2).AssemblyQualifiedName); //inject using default
-        //    injected.Add(integer3); //add pre injected instance
-
-        //    ICsConfigurationBuilder cb = TangFactory.GetTang().NewConfigurationBuilder();
-        //    cb.BindNamedParameter<TestSetInjection.Integer1.NamedInt, int>(GenericType<TestSetInjection.Integer1.NamedInt>.Class, "5");
-        //    cb.BindNamedParameter<TestSetInjection.Float1.NamedFloat, float>(GenericType<TestSetInjection.Float1.NamedFloat>.Class, "12.5");
-        //    cb.BindList(np, injected);
-
-        //    IInjector i = TangFactory.GetTang().NewInjector(cb.Build());
-        //    IList<INumber> actual = ((PoolListClass)i.GetInstance(typeof(PoolListClass))).Numbers;
-        //    Assert.IsTrue(actual.Count == 7);
-        //    Assert.IsTrue(actual.Contains(new TestSetInjection.Integer1(42)));
-        //    Assert.IsTrue(actual.Contains(new TestSetInjection.Integer1(30)));
-        //    Assert.IsTrue(actual.Contains(new TestSetInjection.Float1(42.0001f)));
-        //    Assert.IsTrue(actual.Contains(new TestSetInjection.Float1(12.5f)));
-        //    Assert.IsTrue(actual.Contains(new TestSetInjection.Integer1(5)));
-        //    Assert.IsTrue(actual.Contains(new TestSetInjection.Integer2()));
-        //    Assert.IsTrue(actual.Contains(new TestSetInjection.Integer3(10)));
-        //}
+        ////<summary>
+        ////Tests the subclass inject with multiple instances.
+        ////</summary>
+        ////[TestMethod] 
+        ////public void TestSubclassInjectWithMultipleInstances()
+        ////{
+        ////    ICsConfigurationBuilder cb1 = TangFactory.GetTang().NewConfigurationBuilder()
+        ////        .BindNamedParameter<TestSetInjection.Integer3.NamedInt, int>(GenericType<TestSetInjection.Integer3.NamedInt>.Class, "10");
+        ////    TestSetInjection.Integer3 integer3 = TangFactory.GetTang().NewInjector(cb1.Build()).GetInstance<TestSetInjection.Integer3>();
+
+        ////    ICsClassHierarchy classH = TangFactory.GetTang().GetDefaultClassHierarchy();
+        ////    INamedParameterNode np = (INamedParameterNode)classH.GetNode(typeof(ListOfClasses));
+        ////    IList<object> injected = new List<object>();
+        ////    injected.Add(new TestSetInjection.Integer1(42)); //instance from the same class
+        ////    injected.Add(new TestSetInjection.Integer1(30)); //instance from the same class
+        ////    injected.Add(new TestSetInjection.Float1(42.0001f)); //instance from another subclass of the same interface
+        ////    injected.Add(typeof(TestSetInjection.Float1).AssemblyQualifiedName); //inject from another subclass of the same interface
+        ////    injected.Add(typeof(TestSetInjection.Integer1).AssemblyQualifiedName); //inject using configuration
+        ////    injected.Add(typeof(TestSetInjection.Integer2).AssemblyQualifiedName); //inject using default
+        ////    injected.Add(integer3); //add pre injected instance
+
+        ////    ICsConfigurationBuilder cb = TangFactory.GetTang().NewConfigurationBuilder();
+        ////    cb.BindNamedParameter<TestSetInjection.Integer1.NamedInt, int>(GenericType<TestSetInjection.Integer1.NamedInt>.Class, "5");
+        ////    cb.BindNamedParameter<TestSetInjection.Float1.NamedFloat, float>(GenericType<TestSetInjection.Float1.NamedFloat>.Class, "12.5");
+        ////    cb.BindList(np, injected);
+
+        ////    IInjector i = TangFactory.GetTang().NewInjector(cb.Build());
+        ////    IList<INumber> actual = ((PoolListClass)i.GetInstance(typeof(PoolListClass))).Numbers;
+        ////    Assert.IsTrue(actual.Count == 7);
+        ////    Assert.IsTrue(actual.Contains(new TestSetInjection.Integer1(42)));
+        ////    Assert.IsTrue(actual.Contains(new TestSetInjection.Integer1(30)));
+        ////    Assert.IsTrue(actual.Contains(new TestSetInjection.Float1(42.0001f)));
+        ////    Assert.IsTrue(actual.Contains(new TestSetInjection.Float1(12.5f)));
+        ////    Assert.IsTrue(actual.Contains(new TestSetInjection.Integer1(5)));
+        ////    Assert.IsTrue(actual.Contains(new TestSetInjection.Integer2()));
+        ////    Assert.IsTrue(actual.Contains(new TestSetInjection.Integer3(10)));
+        ////}
     }
 
     [NamedParameter(DefaultValues = new string[] { "one", "two", "three" })]

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMissingParameters.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMissingParameters.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMissingParameters.cs
index a00d994..faaa785 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMissingParameters.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMissingParameters.cs
@@ -44,12 +44,12 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
         [TestMethod]
         public void MissingAllParameterTest()
         {
-            //Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
-            //missing arguments: [ 
-            //Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor+NamedBool, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
-            //Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor+NamedString, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
-            //Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor+NamedInt, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
-            //]
+            // Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
+            // missing arguments: [ 
+            // Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor+NamedBool, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
+            // Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor+NamedString, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
+            // Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor+NamedInt, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
+            // ]
             MultiParameterConstructor obj = null;
             try
             {
@@ -67,12 +67,12 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
         [TestMethod]
         public void MissingTwoParameterTest()
         {
-            //Cannot inject Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 
-            //Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
-            //missing arguments: [ 
-            //Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor+NamedString, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
-            //Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor+NamedInt, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
-            //]
+            // Cannot inject Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 
+            // Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
+            // missing arguments: [ 
+            // Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor+NamedString, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
+            // Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor+NamedInt, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
+            // ]
             MultiParameterConstructor obj = null;
             try
             {
@@ -91,9 +91,9 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
         [TestMethod]
         public void MissingOneParameterTest()
         {
-            //Cannot inject Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 
-            //Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
-            //missing argument Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor+NamedInt, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+            // Cannot inject Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 
+            // Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
+            // missing argument Org.Apache.REEF.Tang.Tests.Injection.MultiParameterConstructor+NamedInt, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
             MultiParameterConstructor obj = null;
             try
             {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMissingParamtersInNested.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMissingParamtersInNested.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMissingParamtersInNested.cs
index 93b105a..69eed2e 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMissingParamtersInNested.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMissingParamtersInNested.cs
@@ -53,9 +53,9 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
         [TestMethod]
         public void MissingAllParameterTest()
         {
-            //Cannot inject Org.Apache.REEF.Tang.Tests.Injection.OuterClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 
-            //Org.Apache.REEF.Tang.Tests.Injection.ReferencedClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
-            //missing argument Org.Apache.REEF.Tang.Tests.Injection.ReferencedClass+NamedInt, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+            // Cannot inject Org.Apache.REEF.Tang.Tests.Injection.OuterClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 
+            // Org.Apache.REEF.Tang.Tests.Injection.ReferencedClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
+            // missing argument Org.Apache.REEF.Tang.Tests.Injection.ReferencedClass+NamedInt, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
             OuterClass obj = null;
             try
             {
@@ -73,9 +73,9 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
         [TestMethod]
         public void MissingInnerParameterTest()
         {
-            //Cannot inject Org.Apache.REEF.Tang.Tests.Injection.OuterClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 
-            //Org.Apache.REEF.Tang.Tests.Injection.ReferencedClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
-            //missing argument Org.Apache.REEF.Tang.Tests.Injection.ReferencedClass+NamedInt, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+            // Cannot inject Org.Apache.REEF.Tang.Tests.Injection.OuterClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 
+            // Org.Apache.REEF.Tang.Tests.Injection.ReferencedClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
+            // missing argument Org.Apache.REEF.Tang.Tests.Injection.ReferencedClass+NamedInt, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
             OuterClass obj = null;
             try
             {
@@ -94,9 +94,9 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
         [TestMethod]
         public void MissingOuterParameterTest()
         {
-            //Cannot inject Org.Apache.REEF.Tang.Tests.Injection.OuterClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 
-            //Org.Apache.REEF.Tang.Tests.Injection.OuterClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
-            //missing argument Org.Apache.REEF.Tang.Tests.Injection.OuterClass+NamedString, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+            // Cannot inject Org.Apache.REEF.Tang.Tests.Injection.OuterClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 
+            // Org.Apache.REEF.Tang.Tests.Injection.OuterClass, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 
+            // missing argument Org.Apache.REEF.Tang.Tests.Injection.OuterClass+NamedString, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
             OuterClass obj = null;
             try
             {


[5/6] incubator-reef git commit: [REEF-979] Enable StyleCop.CSharp.SpacingRules and fix violations

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/PipelinedBroadcastAndReduce.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/PipelinedBroadcastAndReduce.cs b/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/PipelinedBroadcastAndReduce.cs
index 8dacca1..515630a 100644
--- a/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/PipelinedBroadcastAndReduce.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/PipelinedBroadcastAndReduce.cs
@@ -49,11 +49,11 @@ namespace Org.Apache.REEF.IMRU.Examples.PipelinedBroadcastReduce
                 TangFactory.GetTang().NewConfigurationBuilder(IMRUUpdateConfiguration<int[], int[], int[]>.ConfigurationModule
                     .Set(IMRUUpdateConfiguration<int[], int[], int[]>.UpdateFunction,
                         GenericType<BroadcastSenderReduceReceiverUpdateFunction>.Class).Build())
-                    .BindNamedParameter(typeof (BroadcastReduceConfiguration.NumberOfIterations),
+                    .BindNamedParameter(typeof(BroadcastReduceConfiguration.NumberOfIterations),
                         numIterations.ToString(CultureInfo.InvariantCulture))
-                    .BindNamedParameter(typeof (BroadcastReduceConfiguration.Dimensions),
+                    .BindNamedParameter(typeof(BroadcastReduceConfiguration.Dimensions),
                         dim.ToString(CultureInfo.InvariantCulture))
-                    .BindNamedParameter(typeof (BroadcastReduceConfiguration.NumWorkers),
+                    .BindNamedParameter(typeof(BroadcastReduceConfiguration.NumWorkers),
                         numberofMappers.ToString(CultureInfo.InvariantCulture))
                     .Build();
 
@@ -62,7 +62,7 @@ namespace Org.Apache.REEF.IMRU.Examples.PipelinedBroadcastReduce
                     .NewConfigurationBuilder(IMRUPipelineDataConverterConfiguration<int[]>.ConfigurationModule
                         .Set(IMRUPipelineDataConverterConfiguration<int[]>.MapInputPiplelineDataConverter,
                             GenericType<PipelineIntDataConverter>.Class).Build())
-                    .BindNamedParameter(typeof (BroadcastReduceConfiguration.ChunkSize),
+                    .BindNamedParameter(typeof(BroadcastReduceConfiguration.ChunkSize),
                         chunkSize.ToString(CultureInfo.InvariantCulture))
                     .Build();
 
@@ -71,7 +71,7 @@ namespace Org.Apache.REEF.IMRU.Examples.PipelinedBroadcastReduce
                     .NewConfigurationBuilder(IMRUPipelineDataConverterConfiguration<int[]>.ConfigurationModule
                         .Set(IMRUPipelineDataConverterConfiguration<int[]>.MapInputPiplelineDataConverter,
                             GenericType<PipelineIntDataConverter>.Class).Build())
-                    .BindNamedParameter(typeof (BroadcastReduceConfiguration.ChunkSize),
+                    .BindNamedParameter(typeof(BroadcastReduceConfiguration.ChunkSize),
                         chunkSize.ToString(CultureInfo.InvariantCulture))
                     .Build();
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU.Tests/MapInputWithControlMessageTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU.Tests/MapInputWithControlMessageTests.cs b/lang/cs/Org.Apache.REEF.IMRU.Tests/MapInputWithControlMessageTests.cs
index cf7d9e1..29e1259 100644
--- a/lang/cs/Org.Apache.REEF.IMRU.Tests/MapInputWithControlMessageTests.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU.Tests/MapInputWithControlMessageTests.cs
@@ -51,7 +51,7 @@ namespace Org.Apache.REEF.IMRU.Tests
         [TestMethod]
         public void TestMapInputWithControlMessageCodec()
         {
-            float[] baseMessage = {0, 1};
+            float[] baseMessage = { 0, 1 };
 
             var config = TangFactory.GetTang().NewConfigurationBuilder()
                 .BindImplementation(GenericType<IStreamingCodec<float[]>>.Class,
@@ -101,7 +101,7 @@ namespace Org.Apache.REEF.IMRU.Tests
                     .NewInjector(config)
                     .GetInstance<MapInputwithControlMessagePipelineDataConverter<int[]>>();
 
-            int[] baseMessage = {1, 2, 3};
+            int[] baseMessage = { 1, 2, 3 };
 
             var chunks1 = dataConverter.PipelineMessage(new MapInputWithControlMessage<int[]>(baseMessage,
                 MapControlMessage.AnotherRound));

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU.Tests/MapperCountTest.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU.Tests/MapperCountTest.cs b/lang/cs/Org.Apache.REEF.IMRU.Tests/MapperCountTest.cs
index 9599c1d..a676b18 100644
--- a/lang/cs/Org.Apache.REEF.IMRU.Tests/MapperCountTest.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU.Tests/MapperCountTest.cs
@@ -43,8 +43,7 @@ namespace Org.Apache.REEF.IMRU.Tests
                     .NewInjector(
                         InProcessIMRUConfiguration.ConfigurationModule
                             .Set(InProcessIMRUConfiguration.NumberOfMappers, NumberOfMappers.ToString())
-                            .Build()
-                    )
+                            .Build())
                     .GetInstance<MapperCount>();
             var result = tested.Run(NumberOfMappers, "", TangFactory.GetTang().NewConfigurationBuilder().Build());
             Assert.AreEqual(NumberOfMappers, result, "The result of the run should be the number of Mappers.");

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU.Tests/Org.Apache.REEF.IMRU.Tests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU.Tests/Org.Apache.REEF.IMRU.Tests.csproj b/lang/cs/Org.Apache.REEF.IMRU.Tests/Org.Apache.REEF.IMRU.Tests.csproj
index 64974c8..25c6118 100644
--- a/lang/cs/Org.Apache.REEF.IMRU.Tests/Org.Apache.REEF.IMRU.Tests.csproj
+++ b/lang/cs/Org.Apache.REEF.IMRU.Tests/Org.Apache.REEF.IMRU.Tests.csproj
@@ -96,6 +96,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -104,4 +105,4 @@ under the License.
     <Error Condition="!Exists('$(PackagesDir)\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesDir)\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props'))" />
     <Error Condition="!Exists('$(PackagesDir)\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesDir)\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props'))" />
   </Target>
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/API/IMRUJobDefinitionBuilder.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/API/IMRUJobDefinitionBuilder.cs b/lang/cs/Org.Apache.REEF.IMRU/API/IMRUJobDefinitionBuilder.cs
index c55877a..018a8fd 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/API/IMRUJobDefinitionBuilder.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/API/IMRUJobDefinitionBuilder.cs
@@ -36,7 +36,7 @@ namespace Org.Apache.REEF.IMRU.API
     /// <seealso cref="IMRUJobDefinition" />
     public sealed class IMRUJobDefinitionBuilder
     {
-        private static readonly Logger Logger = Logger.GetLogger(typeof (IMRUJobDefinitionBuilder));
+        private static readonly Logger Logger = Logger.GetLogger(typeof(IMRUJobDefinitionBuilder));
 
         private string _jobName;
         private int _numberOfMappers;

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/InProcess/IMRURunner.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/InProcess/IMRURunner.cs b/lang/cs/Org.Apache.REEF.IMRU/InProcess/IMRURunner.cs
index a08e3d6..d7ca55d 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/InProcess/IMRURunner.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/InProcess/IMRURunner.cs
@@ -74,8 +74,8 @@ namespace Org.Apache.REEF.IMRU.InProcess
 
                 foreach (var mapfunc in _mapfunctions)
                 {
-                    //We create a copy by doing coding and decoding since the map task might 
-                    //reuse the fields in next iteration and meanwhile update task might update it.
+                    // We create a copy by doing coding and decoding since the map task might 
+                    // reuse the fields in next iteration and meanwhile update task might update it.
                     using (MemoryStream mapInputStream = new MemoryStream(), mapOutputStream = new MemoryStream())
                     {
                         var mapInputWriter = new StreamDataWriter(mapInputStream);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/InProcess/InProcessIMRUClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/InProcess/InProcessIMRUClient.cs b/lang/cs/Org.Apache.REEF.IMRU/InProcess/InProcessIMRUClient.cs
index 54aa4a1..844c00a 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/InProcess/InProcessIMRUClient.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/InProcess/InProcessIMRUClient.cs
@@ -89,7 +89,7 @@ namespace Org.Apache.REEF.IMRU.InProcess
             var injector = TangFactory.GetTang().NewInjector(mergedConfig);
 
             ISet<IPerMapperConfigGenerator> perMapConfigGenerators =
-                (ISet<IPerMapperConfigGenerator>) injector.GetNamedInstance(typeof (PerMapConfigGeneratorSet));
+                (ISet<IPerMapperConfigGenerator>)injector.GetNamedInstance(typeof(PerMapConfigGeneratorSet));
 
             injector.BindVolatileInstance(GenericType<MapFunctions<TMapInput, TMapOutput>>.Class,
                 MakeMapFunctions<TMapInput, TMapOutput>(jobDefinition.MapFunctionConfiguration,
@@ -122,7 +122,7 @@ namespace Org.Apache.REEF.IMRU.InProcess
             ISet<IMapFunction<TMapInput, TMapOutput>> mappers = new HashSet<IMapFunction<TMapInput, TMapOutput>>();
 
             int counter = 0;
-            foreach(var descriptor in dataset )
+            foreach (var descriptor in dataset)
             {
                 var emptyConfig = TangFactory.GetTang().NewConfigurationBuilder().Build();
                 IConfiguration perMapConfig = perMapConfigGenerators.Aggregate(emptyConfig,

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Client/REEFIMRUClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Client/REEFIMRUClient.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Client/REEFIMRUClient.cs
index adbcea3..6201d89 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Client/REEFIMRUClient.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Client/REEFIMRUClient.cs
@@ -46,7 +46,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Client
     /// </summary>
     internal sealed class REEFIMRUClient : IIMRUClient
     {
-        private static readonly Logger Logger = Logger.GetLogger(typeof (REEFIMRUClient));
+        private static readonly Logger Logger = Logger.GetLogger(typeof(REEFIMRUClient));
 
         private readonly IREEFClient _reefClient;
         private readonly JobSubmissionBuilderFactory _jobSubmissionBuilderFactory;
@@ -145,7 +145,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Client
             // The JobSubmission contains the Driver configuration as well as the files needed on the Driver.
             var imruJobSubmission = _jobSubmissionBuilderFactory.GetJobSubmissionBuilder()
                 .AddDriverConfiguration(imruDriverConfiguration)
-                .AddGlobalAssemblyForType(typeof (IMRUDriver<TMapInput, TMapOutput, TResult>))
+                .AddGlobalAssemblyForType(typeof(IMRUDriver<TMapInput, TMapOutput, TResult>))
                 .SetJobIdentifier(jobDefinition.JobName)
                 .Build();
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ConfigurationManager.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ConfigurationManager.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ConfigurationManager.cs
index 682ee34..4045fc7 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ConfigurationManager.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ConfigurationManager.cs
@@ -124,7 +124,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
             {
                 _resultHandlerConfiguration =
                     configurationSerializer.FromString(resultHandlerConfiguration);
-                Logger.Log(Level.Verbose,"Serialized result handler is " + resultHandlerConfiguration);
+                Logger.Log(Level.Verbose, "Serialized result handler is " + resultHandlerConfiguration);
             }
             catch (Exception e)
             {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs
index 8fb59b5..9eb91cf 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs
@@ -56,7 +56,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
     internal sealed class IMRUDriver<TMapInput, TMapOutput, TResult> : IObserver<IDriverStarted>,
         IObserver<IAllocatedEvaluator>, IObserver<IActiveContext>, IObserver<ICompletedTask>, IObserver<IFailedEvaluator>
     {
-        private static readonly Logger Logger = Logger.GetLogger(typeof (IMRUDriver<TMapInput, TMapOutput, TResult>));
+        private static readonly Logger Logger = Logger.GetLogger(typeof(IMRUDriver<TMapInput, TMapOutput, TResult>));
 
         private readonly ConfigurationManager _configurationManager;
         private readonly IPartitionedInputDataSet _dataSet;
@@ -83,14 +83,14 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
 
         [Inject]
         private IMRUDriver(IPartitionedInputDataSet dataSet,
-            [Parameter(typeof (PerMapConfigGeneratorSet))] ISet<IPerMapperConfigGenerator> perMapperConfigs,
+            [Parameter(typeof(PerMapConfigGeneratorSet))] ISet<IPerMapperConfigGenerator> perMapperConfigs,
             ConfigurationManager configurationManager,
             IEvaluatorRequestor evaluatorRequestor,
-            [Parameter(typeof (CoresPerMapper))] int coresPerMapper,
-            [Parameter(typeof (CoresForUpdateTask))] int coresForUpdateTask,
-            [Parameter(typeof (MemoryPerMapper))] int memoryPerMapper,
-            [Parameter(typeof (MemoryForUpdateTask))] int memoryForUpdateTask,
-            [Parameter(typeof (AllowedFailedEvaluatorsFraction))] double failedEvaluatorsFraction,
+            [Parameter(typeof(CoresPerMapper))] int coresPerMapper,
+            [Parameter(typeof(CoresForUpdateTask))] int coresForUpdateTask,
+            [Parameter(typeof(MemoryPerMapper))] int memoryPerMapper,
+            [Parameter(typeof(MemoryForUpdateTask))] int memoryForUpdateTask,
+            [Parameter(typeof(AllowedFailedEvaluatorsFraction))] double failedEvaluatorsFraction,
             [Parameter(typeof(InvokeGC))] bool invokeGC,
             IGroupCommDriver groupCommDriver)
         {
@@ -104,7 +104,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
             _memoryForUpdateTask = memoryForUpdateTask;
             _perMapperConfigs = perMapperConfigs;
             _completedTasks = new ConcurrentBag<ICompletedTask>();
-            _allowedFailedEvaluators = (int) (failedEvaluatorsFraction*dataSet.Count);
+            _allowedFailedEvaluators = (int)(failedEvaluatorsFraction * dataSet.Count);
             _invokeGC = invokeGC;
 
             AddGroupCommunicationOperators();
@@ -130,7 +130,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
         public void OnNext(IDriverStarted value)
         {
             RequestUpdateEvaluator();
-            //TODO[REEF-598]: Set a timeout for this request to be satisfied. If it is not within that time, exit the Driver.
+            // TODO[REEF-598]: Set a timeout for this request to be satisfied. If it is not within that time, exit the Driver.
         }
 
         /// <summary>
@@ -171,7 +171,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
                             _configurationManager.UpdateFunctionConfiguration,
                             _configurationManager.ResultHandlerConfiguration
                         })
-                        .BindNamedParameter(typeof (InvokeGC), _invokeGC.ToString())
+                        .BindNamedParameter(typeof(InvokeGC), _invokeGC.ToString())
                         .Build();
 
                 try
@@ -180,7 +180,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
                         .NewInjector(partialTaskConf, _configurationManager.UpdateFunctionCodecsConfiguration)
                         .GetInstance<IIMRUResultHandler<TResult>>();
                 }
-                catch(InjectionException)
+                catch (InjectionException)
                 {
                     partialTaskConf = TangFactory.GetTang().NewConfigurationBuilder(partialTaskConf)
                         .BindImplementation(GenericType<IIMRUResultHandler<TResult>>.Class,
@@ -227,7 +227,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
                             _configurationManager.MapFunctionConfiguration,
                             mapSpecificConfig
                         })
-                        .BindNamedParameter(typeof (InvokeGC), _invokeGC.ToString())
+                        .BindNamedParameter(typeof(InvokeGC), _invokeGC.ToString())
                         .Build();
 
                 _commGroup.AddTask(taskId);
@@ -274,8 +274,8 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
 
             _serviceAndContextConfigurationProvider.EvaluatorFailed(value.Id);
 
-            //If active context stage is reached for Update Task then assume that failed
-            //evaluator belongs to mapper
+            // if active context stage is reached for Update Task then assume that failed
+            // evaluator belongs to mapper
             if (_reachedUpdateTaskActiveContext)
             {
                 RequestMapEvaluators(1);
@@ -292,7 +292,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
         /// <param name="error">Kind of exception</param>
         public void OnError(Exception error)
         {
-            Logger.Log(Level.Error,"Cannot currently handle the Exception in OnError function");
+            Logger.Log(Level.Error, "Cannot currently handle the Exception in OnError function");
             throw new NotImplementedException("Cannot currently handle exception in OneError", error);
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ServiceAndContextConfigurationProvider.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ServiceAndContextConfigurationProvider.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ServiceAndContextConfigurationProvider.cs
index a6ef459..f06b459 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ServiceAndContextConfigurationProvider.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ServiceAndContextConfigurationProvider.cs
@@ -37,9 +37,9 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
     /// </summary>
     /// <typeparam name="TMapInput"></typeparam>
     /// <typeparam name="TMapOutput"></typeparam>
-    internal class ServiceAndContextConfigurationProvider<TMapInput,TMapOutput>
+    internal class ServiceAndContextConfigurationProvider<TMapInput, TMapOutput>
     {
-        private static readonly Logger Logger = Logger.GetLogger(typeof(ServiceAndContextConfigurationProvider<TMapInput,TMapOutput>));
+        private static readonly Logger Logger = Logger.GetLogger(typeof(ServiceAndContextConfigurationProvider<TMapInput, TMapOutput>));
 
         private readonly Dictionary<string, ContextAndServiceConfiguration> _configurationProvider;
         private readonly ISet<string> _failedEvaluators;
@@ -104,7 +104,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
                     Exceptions.Throw(new Exception("No more configuration can be provided"), Logger);
                 }
 
-                //If some failed id exists return that configuration
+                // if some failed id exists return that configuration
                 if (_failedEvaluators.Count != 0)
                 {
                     string failedEvaluatorId = _failedEvaluators.First();
@@ -125,7 +125,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
                             Logger);
                     }
 
-                    //Checks whether to put update task configuration or map task configuration
+                    // Checks whether to put update task configuration or map task configuration
                     if (_assignedPartitionDescriptors == 1)
                     {
                         _configurationProvider[evaluatorId] = GetUpdateTaskContextAndServiceConfiguration();
@@ -151,8 +151,8 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
                             StreamingCodecConfiguration<MapInputWithControlMessage<TMapInput>>.Codec,
                             GenericType<MapInputWithControlMessageCodec<TMapInput>>.Class).Build(),
                         StreamingCodecConfigurationMinusMessage<TMapOutput>.Conf.Build(),
-                        _configurationManager.MapInputCodecConfiguration
-                    ).Build();
+                        _configurationManager.MapInputCodecConfiguration)
+                    .Build();
 
             var contextConf = _groupCommDriver.GetContextConfiguration();
             var serviceConf = Configurations.Merge(_groupCommDriver.GetServiceConfiguration(), codecConfig, partitionDescriptor.GetPartitionConfiguration());
@@ -172,8 +172,8 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
                                 GenericType<MapInputWithControlMessageCodec<TMapInput>>.Class).Build(),
                             StreamingCodecConfigurationMinusMessage<TMapOutput>.Conf.Build(),
                             _configurationManager.UpdateFunctionCodecsConfiguration
-                        }
-                    ).Build();
+                        })
+                    .Build();
 
             var serviceConf = Configurations.Merge(_groupCommDriver.GetServiceConfiguration(), codecConfig);
             return new ContextAndServiceConfiguration(_groupCommDriver.GetContextConfiguration(), serviceConf);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/MapTaskHost.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/MapTaskHost.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/MapTaskHost.cs
index 3b2b2df..35c1050 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/MapTaskHost.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/MapTaskHost.cs
@@ -53,7 +53,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.IMRUTasks
         private MapTaskHost(
             IMapFunction<TMapInput, TMapOutput> mapTask,
             IGroupCommClient groupCommunicationsClient,
-            [Parameter(typeof (InvokeGC))] bool invokeGC)
+            [Parameter(typeof(InvokeGC))] bool invokeGC)
         {
             _mapTask = mapTask;
             var cg = groupCommunicationsClient.GetCommunicationGroup(IMRUConstants.CommunicationGroupName);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs
index ceaf8f9..7eddd26 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs
@@ -55,7 +55,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.IMRUTasks
             IUpdateFunction<TMapInput, TMapOutput, TResult> updateTask,
             IGroupCommClient groupCommunicationsClient,
             IIMRUResultHandler<TResult> resultHandler,
-            [Parameter(typeof (InvokeGC))] bool invokeGC)
+            [Parameter(typeof(InvokeGC))] bool invokeGC)
         {
             _updateTask = updateTask;
             var cg = groupCommunicationsClient.GetCommunicationGroup(IMRUConstants.CommunicationGroupName);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapControlMessage.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapControlMessage.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapControlMessage.cs
index e0a6eb1..57e4d5f 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapControlMessage.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapControlMessage.cs
@@ -22,7 +22,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.MapInputWithControlMessage
     /// </summary>
     internal enum MapControlMessage
     {
-        AnotherRound, //Do another round of map function
-        Stop //Stop
+        AnotherRound, // Do another round of map function
+        Stop // Stop
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapInputWithControlMessageCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapInputWithControlMessageCodec.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapInputWithControlMessageCodec.cs
index 644b487..3a6f384 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapInputWithControlMessageCodec.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapInputWithControlMessageCodec.cs
@@ -80,11 +80,11 @@ namespace Org.Apache.REEF.IMRU.OnREEF.MapInputWithControlMessage
             switch (obj.ControlMessage)
             {
                 case MapControlMessage.AnotherRound:
-                    writer.Write(new byte[] {0}, 0, 1);
+                    writer.Write(new byte[] { 0 }, 0, 1);
                     _baseCodec.Write(obj.Message, writer);
                     break;
                 case MapControlMessage.Stop:
-                    writer.Write(new byte[] {1}, 0, 1);
+                    writer.Write(new byte[] { 1 }, 0, 1);
                     break;
             }
         }
@@ -95,8 +95,8 @@ namespace Org.Apache.REEF.IMRU.OnREEF.MapInputWithControlMessage
         /// <param name="reader">reader from which to read the message</param>
         /// <param name="token">Cancellation token</param>
         /// <returns>Read message</returns>
-        async Task<MapInputWithControlMessage<TMapInput>> IStreamingCodec<MapInputWithControlMessage<TMapInput>>.
-            ReadAsync(IDataReader reader, CancellationToken token)
+        async Task<MapInputWithControlMessage<TMapInput>> IStreamingCodec<MapInputWithControlMessage<TMapInput>>.ReadAsync(
+            IDataReader reader, CancellationToken token)
         {
             byte[] messageType = new byte[1];
             await reader.ReadAsync(messageType, 0, 1, token);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs
index 0e1162d..e588480 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs
@@ -37,7 +37,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.ResultHandler
     [Unstable("0.14", "This API will change after introducing proper API for output in REEF.IO")]
     public class WriteResultHandler<TResult> : IIMRUResultHandler<TResult>
     {
-        private static readonly Logger Logger = Logger.GetLogger(typeof (WriteResultHandler<>));
+        private static readonly Logger Logger = Logger.GetLogger(typeof(WriteResultHandler<>));
 
         private readonly IStreamingCodec<TResult> _resultCodec;
         private readonly IFileSystem _fileSystem;

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/Org.Apache.REEF.IMRU.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/Org.Apache.REEF.IMRU.csproj b/lang/cs/Org.Apache.REEF.IMRU/Org.Apache.REEF.IMRU.csproj
index 0fc67d9..0b99dcc 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/Org.Apache.REEF.IMRU.csproj
+++ b/lang/cs/Org.Apache.REEF.IMRU/Org.Apache.REEF.IMRU.csproj
@@ -34,6 +34,7 @@ under the License.
   </PropertyGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -141,4 +142,4 @@ under the License.
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup />
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.TestClient/HadoopFileInputPartitionTest.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.TestClient/HadoopFileInputPartitionTest.cs b/lang/cs/Org.Apache.REEF.IO.TestClient/HadoopFileInputPartitionTest.cs
index 8066d4b..6189562 100644
--- a/lang/cs/Org.Apache.REEF.IO.TestClient/HadoopFileInputPartitionTest.cs
+++ b/lang/cs/Org.Apache.REEF.IO.TestClient/HadoopFileInputPartitionTest.cs
@@ -34,7 +34,7 @@ using Org.Apache.REEF.Utilities.Logging;
 
 namespace Org.Apache.REEF.IO.TestClient
 {
-    //TODO[JIRA REEF-815]: once move to Nunit, tose test should be moved to Test project
+    // TODO[JIRA REEF-815]: once move to Nunit, tose test should be moved to Test project
     internal class HadoopFileInputPartitionTest
     {
         private static readonly Logger Logger = Logger.GetLogger(typeof(HadoopFileInputPartitionTest));

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj b/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj
index aa0503f..7e60f30 100644
--- a/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj
+++ b/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj
@@ -95,6 +95,7 @@ under the License.
     </ProjectReference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
@@ -102,4 +103,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.TestClient/Run.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.TestClient/Run.cs b/lang/cs/Org.Apache.REEF.IO.TestClient/Run.cs
index 3ed0e2a..d0811f4 100644
--- a/lang/cs/Org.Apache.REEF.IO.TestClient/Run.cs
+++ b/lang/cs/Org.Apache.REEF.IO.TestClient/Run.cs
@@ -22,7 +22,7 @@ using Org.Apache.REEF.Utilities.Logging;
 
 namespace Org.Apache.REEF.IO.TestClient
 {
-    //TODO[JIRA REEF-815]: once move to Nunit, tose test should be moved to Test project
+    // TODO[JIRA REEF-815]: once move to Nunit, tose test should be moved to Test project
     /// <summary>
     /// This purpose of this test is to run tests in Yarn envionment
     /// 
@@ -37,7 +37,7 @@ namespace Org.Apache.REEF.IO.TestClient
                 Assert.IsTrue(result);
             }
 
-            //the remote path name can be either full or relative, passing with the second argument
+            // the remote path name can be either full or relative, passing with the second argument
             if (args.Length > 1 && args[0].Equals("c"))
             {
                 HadoopFileSystemTest t = new HadoopFileSystemTest();

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.csproj b/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.csproj
index 048a23b..0ed61a5 100644
--- a/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.csproj
+++ b/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.csproj
@@ -109,6 +109,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -117,4 +118,4 @@ under the License.
     <Error Condition="!Exists('$(PackagesDir)\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesDir)\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props'))" />
     <Error Condition="!Exists('$(PackagesDir)\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesDir)\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props'))" />
   </Target>
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs b/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs
index 79d7d94..ece4cd6 100644
--- a/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs
+++ b/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs
@@ -49,7 +49,7 @@ namespace Org.Apache.REEF.IO.Tests
                 .Set(AzureBlockBlobFileSystemConfiguration.ConnectionString, connectionString)
                 .Build();
 
-            _fileSystem= TangFactory.GetTang().NewInjector(conf).GetInstance<AzureBlockBlobFileSystem>();
+            _fileSystem = TangFactory.GetTang().NewInjector(conf).GetInstance<AzureBlockBlobFileSystem>();
             _container = CloudStorageAccount.Parse(connectionString).CreateCloudBlobClient().GetContainerReference(defaultContainerName);
             _container.CreateIfNotExists();
         }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.Tests/TestFilePartitionInputDataSet.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.Tests/TestFilePartitionInputDataSet.cs b/lang/cs/Org.Apache.REEF.IO.Tests/TestFilePartitionInputDataSet.cs
index 2162719..88058a7 100644
--- a/lang/cs/Org.Apache.REEF.IO.Tests/TestFilePartitionInputDataSet.cs
+++ b/lang/cs/Org.Apache.REEF.IO.Tests/TestFilePartitionInputDataSet.cs
@@ -154,7 +154,7 @@ namespace Org.Apache.REEF.IO.Tests
             MakeLocalTestFile(sourceFilePath2, new byte[] { 114, 115, 116, 117 });
 
             var c = TangFactory.GetTang().NewConfigurationBuilder()
-                .BindImplementation(GenericType<IPartitionedInputDataSet>.Class, GenericType < FileSystemPartitionInputDataSet<IEnumerable<byte>>>.Class)
+                .BindImplementation(GenericType<IPartitionedInputDataSet>.Class, GenericType<FileSystemPartitionInputDataSet<IEnumerable<byte>>>.Class)
                 .BindStringNamedParam<FileDeSerializerConfigString>(GetByteSerializerConfigString())
                 .BindSetEntry<FilePathsForInputPartitions, string>(GenericType<FilePathsForInputPartitions>.Class, sourceFilePath1)
                 .BindSetEntry<FilePathsForInputPartitions, string>(GenericType<FilePathsForInputPartitions>.Class, sourceFilePath2)
@@ -190,7 +190,7 @@ namespace Org.Apache.REEF.IO.Tests
         [TestMethod]
         public void TestWithRowDeserializer()
         {
-            MakeLocalTestFile(sourceFilePath1, new byte[] {111, 112, 113});
+            MakeLocalTestFile(sourceFilePath1, new byte[] { 111, 112, 113 });
             MakeLocalTestFile(sourceFilePath2, new byte[] { 114, 115 });
 
             var dataSet = TangFactory.GetTang()
@@ -250,7 +250,7 @@ namespace Org.Apache.REEF.IO.Tests
         {
             var serializerConf = TangFactory.GetTang().NewConfigurationBuilder()
                 .BindImplementation<IFileDeSerializer<IEnumerable<Row>>, RowSerializer>(
-                    GenericType <IFileDeSerializer<IEnumerable<Row>>>.Class,
+                    GenericType<IFileDeSerializer<IEnumerable<Row>>>.Class,
                     GenericType<RowSerializer>.Class)
                 .Build();
             return (new AvroConfigurationSerializer()).ToString(serializerConf);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.Tests/TestLocalFileSystem.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.Tests/TestLocalFileSystem.cs b/lang/cs/Org.Apache.REEF.IO.Tests/TestLocalFileSystem.cs
index c8eb6fb..7dcbbe5 100644
--- a/lang/cs/Org.Apache.REEF.IO.Tests/TestLocalFileSystem.cs
+++ b/lang/cs/Org.Apache.REEF.IO.Tests/TestLocalFileSystem.cs
@@ -143,7 +143,7 @@ namespace Org.Apache.REEF.IO.Tests
         public void TestGetChildren()
         {
             var fs = GetFileSystem();
-            var directoryUri = new Uri(Path.Combine(Path.GetTempPath(), TempFileName)+"/");
+            var directoryUri = new Uri(Path.Combine(Path.GetTempPath(), TempFileName) + "/");
             fs.CreateDirectory(directoryUri);
             var fileUri = new Uri(directoryUri, "testfile");
             

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.Tests/TestRandomInputDataSet.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.Tests/TestRandomInputDataSet.cs b/lang/cs/Org.Apache.REEF.IO.Tests/TestRandomInputDataSet.cs
index 998b2ef..26f6483 100644
--- a/lang/cs/Org.Apache.REEF.IO.Tests/TestRandomInputDataSet.cs
+++ b/lang/cs/Org.Apache.REEF.IO.Tests/TestRandomInputDataSet.cs
@@ -50,7 +50,7 @@ namespace Org.Apache.REEF.IO.Tests
         /// <summary>
         /// The number of bytes we expect each partition's stream to return.
         /// </summary>
-        private const int ExpectedNumberOfBytesPerPartition = NumberOfDoublesPerPartition*BytesPerDouble;
+        private const int ExpectedNumberOfBytesPerPartition = NumberOfDoublesPerPartition * BytesPerDouble;
 
         /// <summary>
         /// Test for the driver side APIs of RandomDataSet.

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs
index 84845ce..20e75a8 100644
--- a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs
+++ b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs
@@ -124,7 +124,7 @@ namespace Org.Apache.REEF.IO.FileSystem.AzureBlob
         /// </summary>
         public void DeleteDirectory(Uri directoryUri)
         {
-            var uriSplit = directoryUri.AbsolutePath.Split(new[] {"/"}, StringSplitOptions.RemoveEmptyEntries);
+            var uriSplit = directoryUri.AbsolutePath.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
             if (!uriSplit.Any())
             {
                 throw new StorageException(string.Format("URI {0} must contain at least the container.", directoryUri));

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/RetryPolicy/DefaultAzureBlobRetryPolicy.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/RetryPolicy/DefaultAzureBlobRetryPolicy.cs b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/RetryPolicy/DefaultAzureBlobRetryPolicy.cs
index b6fa604..77943ef 100644
--- a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/RetryPolicy/DefaultAzureBlobRetryPolicy.cs
+++ b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/RetryPolicy/DefaultAzureBlobRetryPolicy.cs
@@ -40,7 +40,7 @@ namespace Org.Apache.REEF.IO.FileSystem.AzureBlob.RetryPolicy
         public bool ShouldRetry(int currentRetryCount, int statusCode, Exception lastException, out TimeSpan retryInterval,
             OperationContext operationContext)
         {
-            return _retryPolicy.ShouldRetry(currentRetryCount,statusCode, lastException, out retryInterval, operationContext);
+            return _retryPolicy.ShouldRetry(currentRetryCount, statusCode, lastException, out retryInterval, operationContext);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.csproj b/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.csproj
index 90f4f29..a67086c 100644
--- a/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.csproj
+++ b/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.csproj
@@ -31,6 +31,7 @@ under the License.
   <Import Project="$(SolutionDir)\build.props" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <ItemGroup>
     <Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <HintPath>$(PackagesDir)\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath>
@@ -140,4 +141,4 @@ under the License.
   <ItemGroup>
     <WCFMetadata Include="Service References\" />
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemInputPartition.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemInputPartition.cs b/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemInputPartition.cs
index d44968f..3061545 100644
--- a/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemInputPartition.cs
+++ b/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemInputPartition.cs
@@ -43,8 +43,8 @@ namespace Org.Apache.REEF.IO.PartitionedData.FileSystem
         private string _localFileFolder;
 
         [Inject]
-        private FileSystemInputPartition([Parameter(typeof (PartitionId))] string id,
-            [Parameter(typeof (FilePathsInInputPartition))] ISet<string> filePaths,
+        private FileSystemInputPartition([Parameter(typeof(PartitionId))] string id,
+            [Parameter(typeof(FilePathsInInputPartition))] ISet<string> filePaths,
             IFileSystem fileSystem,
             IFileDeSerializer<T> fileSerializer)
         {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemPartitionInputDataSet.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemPartitionInputDataSet.cs b/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemPartitionInputDataSet.cs
index 0abfb9a..1bfc4ac 100644
--- a/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemPartitionInputDataSet.cs
+++ b/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemPartitionInputDataSet.cs
@@ -44,7 +44,7 @@ namespace Org.Apache.REEF.IO.PartitionedData.FileSystem
     {
         private static readonly Logger Logger = Logger.GetLogger(typeof(FileSystemPartitionInputDataSet<T>));
         private readonly Dictionary<string, IPartitionDescriptor> _partitions;
-        private readonly int _count ;
+        private readonly int _count;
         private const string StringSeparators = ";";
         private const string IdPrefix = "FileSystemDataSet-";
         private readonly string _id;
@@ -54,8 +54,7 @@ namespace Org.Apache.REEF.IO.PartitionedData.FileSystem
             [Parameter(typeof(FilePathsForInputPartitions))] ISet<string> filePaths,
             IFileSystem fileSystem,
             [Parameter(typeof(FileDeSerializerConfigString))] string fileSerializerConfigString,
-            AvroConfigurationSerializer avroConfigurationSerializer
-            )
+            AvroConfigurationSerializer avroConfigurationSerializer)
         {
             _count = filePaths.Count;
             _id = FormId(filePaths);
@@ -133,7 +132,7 @@ namespace Org.Apache.REEF.IO.PartitionedData.FileSystem
                 if (filePaths != null && filePaths.Count > 0)
                 {
                     var path = filePaths.First();
-                    var paths = path.Split(new string[] {"/", "//", "\\"}, StringSplitOptions.None);
+                    var paths = path.Split(new string[] { "/", "//", "\\" }, StringSplitOptions.None);
                     if (paths.Length > 0)
                     {
                         id = paths[paths.Length - 1];

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO/PartitionedData/Random/RandomInputPartition.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO/PartitionedData/Random/RandomInputPartition.cs b/lang/cs/Org.Apache.REEF.IO/PartitionedData/Random/RandomInputPartition.cs
index 887ac3f..9583529 100644
--- a/lang/cs/Org.Apache.REEF.IO/PartitionedData/Random/RandomInputPartition.cs
+++ b/lang/cs/Org.Apache.REEF.IO/PartitionedData/Random/RandomInputPartition.cs
@@ -38,7 +38,7 @@ namespace Org.Apache.REEF.IO.PartitionedData.Random
             [Parameter(typeof(NumberOfDoublesPerPartition))] int numberOfDoubles)
         {
             _id = id;
-            _randomData = new byte[numberOfDoubles*8];
+            _randomData = new byte[numberOfDoubles * 8];
             var random = new System.Random();
 
             for (var i = 0; i < numberOfDoubles; ++i)
@@ -48,7 +48,7 @@ namespace Org.Apache.REEF.IO.PartitionedData.Random
                 Debug.Assert(randomDoubleAsBytes.Length == 8);
                 for (var j = 0; j < 8; ++j)
                 {
-                    var index = i*8 + j;
+                    var index = i * 8 + j;
                     Debug.Assert(index < _randomData.Length);
                     _randomData[index] = randomDoubleAsBytes[j];
                 }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj b/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj
index 1f118e2..e30f216 100644
--- a/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj
+++ b/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj
@@ -97,6 +97,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <!--begin jar reference-->
   <PropertyGroup>
     <AfterBuildDependsOn>
@@ -113,4 +114,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/BroadcastReduceDriverAndTasks/MasterTask.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/BroadcastReduceDriverAndTasks/MasterTask.cs b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/BroadcastReduceDriverAndTasks/MasterTask.cs
index 02fc403..3172265 100644
--- a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/BroadcastReduceDriverAndTasks/MasterTask.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/BroadcastReduceDriverAndTasks/MasterTask.cs
@@ -91,8 +91,8 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.BroadcastReduceDri
                 {
                     Logger.Log(Level.Info,
                         string.Format("Average time (milliseconds) taken for broadcast: {0} and reduce: {1}",
-                            broadcastTime.ElapsedMilliseconds/((double) (i - 1)),
-                            reduceTime.ElapsedMilliseconds/((double) (i - 1))));
+                            broadcastTime.ElapsedMilliseconds / ((double)(i - 1)),
+                            reduceTime.ElapsedMilliseconds / ((double)(i - 1))));
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedBroadcastReduceDriver.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedBroadcastReduceDriver.cs b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedBroadcastReduceDriver.cs
index 6e5ef7b..632425b 100644
--- a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedBroadcastReduceDriver.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedBroadcastReduceDriver.cs
@@ -269,20 +269,20 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
 
             public byte[] Encode(int[] obj)
             {
-                var result = new byte[sizeof (Int32)*obj.Length];
+                var result = new byte[sizeof(Int32) * obj.Length];
                 Buffer.BlockCopy(obj, 0, result, 0, result.Length);
                 return result;
             }
 
             public int[] Decode(byte[] data)
             {
-                if (data.Length%sizeof (Int32) != 0)
+                if (data.Length % sizeof(Int32) != 0)
                 {
                     throw new Exception(
                         "error inside integer array decoder, byte array length not a multiple of integer size");
                 }
 
-                var result = new int[data.Length/sizeof (Int32)];
+                var result = new int[data.Length / sizeof(Int32)];
                 Buffer.BlockCopy(data, 0, result, 0, data.Length);
                 return result;
             }
@@ -301,9 +301,9 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
             public List<PipelineMessage<int[]>> PipelineMessage(int[] message)
             {
                 var messageList = new List<PipelineMessage<int[]>>();
-                var totalChunks = message.Length/_chunkSize;
+                var totalChunks = message.Length / _chunkSize;
 
-                if (message.Length%_chunkSize != 0)
+                if (message.Length % _chunkSize != 0)
                 {
                     totalChunks++;
                 }
@@ -312,7 +312,7 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
                 for (var i = 0; i < message.Length; i += _chunkSize)
                 {
                     var data = new int[Math.Min(_chunkSize, message.Length - i)];
-                    Buffer.BlockCopy(message, i*sizeof (int), data, 0, data.Length*sizeof (int));
+                    Buffer.BlockCopy(message, i * sizeof(int), data, 0, data.Length * sizeof(int));
 
                     messageList.Add(counter == totalChunks - 1
                         ? new PipelineMessage<int[]>(data, true)
@@ -332,8 +332,8 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
 
                 foreach (var message in pipelineMessage)
                 {
-                    Buffer.BlockCopy(message.Data, 0, data, offset, message.Data.Length*sizeof (int));
-                    offset += message.Data.Length*sizeof (int);
+                    Buffer.BlockCopy(message.Data, 0, data, offset, message.Data.Length * sizeof(int));
+                    offset += message.Data.Length * sizeof(int);
                 }
 
                 return data;

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedMasterTask.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedMasterTask.cs b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedMasterTask.cs
index 2259cdb..a4a7780 100644
--- a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedMasterTask.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedMasterTask.cs
@@ -93,9 +93,9 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
                 Logger.Log(Level.Info, "Received sum: {0} on iteration: {1} with array length: {2}", sum[0], i,
                     sum.Length);
 
-                int expected = TriangleNumber(i)*_numReduceSenders;
+                int expected = TriangleNumber(i) * _numReduceSenders;
 
-                if (sum[0] != TriangleNumber(i)*_numReduceSenders)
+                if (sum[0] != TriangleNumber(i) * _numReduceSenders)
                 {
                     throw new Exception("Expected " + expected + " but got " + sum[0]);
                 }
@@ -104,8 +104,8 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
                 {
                     Logger.Log(Level.Info,
                         string.Format("Average time (milliseconds) taken for broadcast: {0} and reduce: {1}",
-                            broadcastTime.ElapsedMilliseconds/((double) (i - 1)),
-                            reduceTime.ElapsedMilliseconds/((double) (i - 1))));
+                            broadcastTime.ElapsedMilliseconds / ((double)(i - 1)),
+                            reduceTime.ElapsedMilliseconds / ((double)(i - 1))));
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedSlaveTask.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedSlaveTask.cs b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedSlaveTask.cs
index 5ec77bb..84cd3ec 100644
--- a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedSlaveTask.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedSlaveTask.cs
@@ -96,8 +96,8 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
                 {
                     Logger.Log(Level.Info,
                         string.Format("Average time (milliseconds) taken for broadcast: {0} and reduce: {1}",
-                            broadcastTime.ElapsedMilliseconds/((double) i),
-                            reduceTime.ElapsedMilliseconds/((double) i)));
+                            broadcastTime.ElapsedMilliseconds / ((double)i),
+                            reduceTime.ElapsedMilliseconds / ((double)i)));
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.csproj b/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.csproj
index 6914923..f783858 100644
--- a/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.csproj
+++ b/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.csproj
@@ -86,6 +86,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
@@ -93,4 +94,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs
index 3c145c7..2f8f352 100644
--- a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs
@@ -48,14 +48,14 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
                 groupName, fanOut,
                 numTasks);
 
-            //driver side to prepar for service config
+            // driver side to prepar for service config
             var codecConfig = CodecConfiguration<int>.Conf
                 .Set(CodecConfiguration<int>.Codec, GenericType<IntCodec>.Class)
                 .Build();
             var driverServiceConfig = groupCommunicationDriver.GetServiceConfiguration();
             var serviceConfig = Configurations.Merge(driverServiceConfig, codecConfig);
 
-            //wrap it before serializing
+            // wrap it before serializing
             var wrappedSeriveConfig = TangFactory.GetTang().NewConfigurationBuilder()
                 .BindNamedParameter<ServicesConfigurationOptions.ServiceConfigString, string>(
                     GenericType<ServicesConfigurationOptions.ServiceConfigString>.Class,
@@ -63,7 +63,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
                 .Build();
             var serviceConfigString = serializer.ToString(wrappedSeriveConfig);
 
-            //the configuration string is received at Evaluator side
+            // the configuration string is received at Evaluator side
             var serviceConfig2 = new ServiceConfiguration(serviceConfigString);
 
             Assert.AreEqual(serializer.ToString(serviceConfig), serializer.ToString(serviceConfig2.TangConfig));

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTests.cs b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTests.cs
index 653d14a..f726402 100644
--- a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTests.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTests.cs
@@ -79,10 +79,10 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
                 var networkServiceInjector1 = BuildNetworkServiceInjector(endpoint, handler1);
                 var networkServiceInjector2 = BuildNetworkServiceInjector(endpoint, handler2);
 
-                var networkService1 = networkServiceInjector1.GetInstance<
-                  StreamingNetworkService<GeneralGroupCommunicationMessage>>();
-                var networkService2 = networkServiceInjector2.GetInstance<
-                    StreamingNetworkService<GeneralGroupCommunicationMessage>>();
+                var networkService1 = 
+                    networkServiceInjector1.GetInstance<StreamingNetworkService<GeneralGroupCommunicationMessage>>();
+                var networkService2 = 
+                    networkServiceInjector2.GetInstance<StreamingNetworkService<GeneralGroupCommunicationMessage>>();
                 networkService1.Register(new StringIdentifier("id1"));
                 networkService2.Register(new StringIdentifier("id2"));
 
@@ -132,7 +132,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
 
             var commGroups = CommGroupClients(groupName, numTasks, groupCommunicationDriver, commGroup, GetDefaultCodecConfig());
 
-            //for master task
+            // for master task
             IBroadcastSender<int> broadcastSender = commGroups[0].GetBroadcastSender<int>(broadcastOperatorName);
             IReduceReceiver<int> sumReducer = commGroups[0].GetReduceReceiver<int>(reduceOperatorName);
 
@@ -211,7 +211,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
 
             var commGroups = CommGroupClients(groupName, numTasks, groupCommunicationDriver, commGroup, codecConfig);
 
-            //for master task
+            // for master task
             IBroadcastSender<int[]> broadcastSender = commGroups[0].GetBroadcastSender<int[]>(broadcastOperatorName);
             IReduceReceiver<int[]> sumReducer = commGroups[0].GetReduceReceiver<int[]>(reduceOperatorName);
 
@@ -280,7 +280,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
             Assert.IsNotNull(receiver4);
 
             List<int> data = Enumerable.Range(1, 100).ToList();
-            List<string> order = new List<string> {"task4", "task3", "task2", "task1"};
+            List<string> order = new List<string> { "task4", "task3", "task2", "task1" };
 
             sender.Send(data, order);
 
@@ -803,7 +803,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
 
             for (int i = 0; i < numTasks; i++)
             {
-                //get task configuration at driver side
+                // get task configuration at driver side
                 string taskId = "task" + i;
                 IConfiguration groupCommTaskConfig = groupCommDriver.GetGroupCommTaskConfiguration(taskId);
                 IConfiguration mergedConf = Configurations.Merge(groupCommTaskConfig, partialConfigs[i], serviceConfig);
@@ -814,7 +814,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
                     .Build();
                 IInjector injector = TangFactory.GetTang().NewInjector(conf);
 
-                //simulate injection at evaluator side
+                // simulate injection at evaluator side
                 IGroupCommClient groupCommClient = injector.GetInstance<IGroupCommClient>();
                 commGroups.Add(groupCommClient.GetCommunicationGroup(groupName));
             }
@@ -825,11 +825,11 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
             IPEndPoint nameServerEndpoint, IObserver<NsMessage<GeneralGroupCommunicationMessage>> handler)
         {
             var config = TangFactory.GetTang().NewConfigurationBuilder()
-                .BindNamedParameter(typeof (NamingConfigurationOptions.NameServerAddress),
+                .BindNamedParameter(typeof(NamingConfigurationOptions.NameServerAddress),
                     nameServerEndpoint.Address.ToString())
-                .BindNamedParameter(typeof (NamingConfigurationOptions.NameServerPort),
+                .BindNamedParameter(typeof(NamingConfigurationOptions.NameServerPort),
                     nameServerEndpoint.Port.ToString())
-                .BindNamedParameter(typeof (NetworkServiceOptions.NetworkServicePort),
+                .BindNamedParameter(typeof(NetworkServiceOptions.NetworkServicePort),
                     (0).ToString(CultureInfo.InvariantCulture))
                 .BindImplementation(GenericType<INameClient>.Class, GenericType<NameClient>.Class)
                 .Build();

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTreeTopologyTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTreeTopologyTests.cs b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTreeTopologyTests.cs
index c194bcb..29b1317 100644
--- a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTreeTopologyTests.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTreeTopologyTests.cs
@@ -212,7 +212,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
 
             var commGroups = GroupCommunicationTests.CommGroupClients(groupName, numTasks, groupCommDriver, commGroup, GetDefaultCodecConfig());
 
-            //for master task
+            // for master task
             IBroadcastSender<int> broadcastSender = commGroups[0].GetBroadcastSender<int>(broadcastOperatorName);
             IReduceReceiver<int> sumReducer = commGroups[0].GetReduceReceiver<int>(reduceOperatorName);
 
@@ -553,7 +553,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
             Assert.AreEqual(1, data3[0]);
             Assert.AreEqual(2, data3[1]);
             
-            var data4= receiver4.Receive().ToArray();
+            var data4 = receiver4.Receive().ToArray();
             Assert.AreEqual(3, data4[0]);
             Assert.AreEqual(4, data4[1]);
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/StreamingCodecTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/StreamingCodecTests.cs b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/StreamingCodecTests.cs
index 1757c6c..78a3efb 100644
--- a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/StreamingCodecTests.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/StreamingCodecTests.cs
@@ -55,7 +55,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
             CancellationToken token = new CancellationToken();
 
             int obj = 5;
-            int[] intArr = {1, 2};
+            int[] intArr = { 1, 2 };
             double[] doubleArr = { 1, 2 };
             float[] floatArr = { 1, 2 };
             string stringObj = "hello";

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Tests/NetworkService/StreamingNetworkServiceTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Tests/NetworkService/StreamingNetworkServiceTests.cs b/lang/cs/Org.Apache.REEF.Network.Tests/NetworkService/StreamingNetworkServiceTests.cs
index 1e0378e..1a27945 100644
--- a/lang/cs/Org.Apache.REEF.Network.Tests/NetworkService/StreamingNetworkServiceTests.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Tests/NetworkService/StreamingNetworkServiceTests.cs
@@ -190,7 +190,7 @@ namespace Org.Apache.REEF.Network.Tests.NetworkService
             StreamingCodecFunctionCache<A> cache = new StreamingCodecFunctionCache<A>(injector);
 
             var readFunc = cache.ReadFunction(typeof(B));
-            var writeFunc = cache.WriteFunction(typeof (B));
+            var writeFunc = cache.WriteFunction(typeof(B));
             var readAsyncFunc = cache.ReadAsyncFunction(typeof(B));
             var writeAsyncFunc = cache.WriteAsyncFunction(typeof(B));
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.csproj b/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.csproj
index 123a1bf..55ce0a0 100644
--- a/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.csproj
+++ b/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.csproj
@@ -109,6 +109,7 @@ under the License.
   <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -123,4 +124,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Config/GroupCommConfigurationOptions.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Config/GroupCommConfigurationOptions.cs b/lang/cs/Org.Apache.REEF.Network/Group/Config/GroupCommConfigurationOptions.cs
index 84c0e85..4fe37d1 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Config/GroupCommConfigurationOptions.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Config/GroupCommConfigurationOptions.cs
@@ -83,7 +83,7 @@ namespace Org.Apache.REEF.Network.Group.Config
         {
         }
 
-        [NamedParameter("with of the tree in topology", defaultValue:"2")]
+        [NamedParameter("with of the tree in topology", defaultValue: "2")]
         public class FanOut : Name<int>
         {
         }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/CommunicationGroupDriver.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/CommunicationGroupDriver.cs b/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/CommunicationGroupDriver.cs
index 001c110..9ebdf84 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/CommunicationGroupDriver.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/CommunicationGroupDriver.cs
@@ -40,7 +40,7 @@ namespace Org.Apache.REEF.Network.Group.Driver.Impl
     /// </summary>
     public sealed class CommunicationGroupDriver : ICommunicationGroupDriver
     {
-        private static readonly Logger LOGGER = Logger.GetLogger(typeof (CommunicationGroupDriver));
+        private static readonly Logger LOGGER = Logger.GetLogger(typeof(CommunicationGroupDriver));
 
         private readonly string _groupName;
         private readonly string _driverId;
@@ -137,7 +137,7 @@ namespace Org.Apache.REEF.Network.Group.Driver.Impl
         /// <returns>The same CommunicationGroupDriver with the added Broadcast operator info</returns>
         public ICommunicationGroupDriver AddBroadcast(string operatorName, string masterTaskId, TopologyTypes topologyType = TopologyTypes.Flat)
         {
-            return AddBroadcast<int>( operatorName, masterTaskId, topologyType, GetDefaultConfiguration());
+            return AddBroadcast<int>(operatorName, masterTaskId, topologyType, GetDefaultConfiguration());
         }
 
         /// <summary>
@@ -329,14 +329,14 @@ namespace Org.Apache.REEF.Network.Group.Driver.Impl
         {
             var topology = _topologies[operatorName];
             MethodInfo info = topology.GetType().GetMethod("AddTask");
-            info.Invoke(topology, new[] {(object) taskId});
+            info.Invoke(topology, new[] { (object)taskId });
         }
 
         private IConfiguration GetOperatorConfiguration(string operatorName, string taskId)
         {
             var topology = _topologies[operatorName];
             MethodInfo info = topology.GetType().GetMethod("GetTaskConfiguration");
-            return (IConfiguration) info.Invoke(topology, new[] {(object) taskId});
+            return (IConfiguration)info.Invoke(topology, new[] { (object)taskId });
         }
 
         private IConfiguration[] GetDefaultConfiguration()

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/GroupCommunicationMessageStreamingCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/GroupCommunicationMessageStreamingCodec.cs b/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/GroupCommunicationMessageStreamingCodec.cs
index d619e64..74405b5 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/GroupCommunicationMessageStreamingCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/GroupCommunicationMessageStreamingCodec.cs
@@ -186,9 +186,9 @@ namespace Org.Apache.REEF.Network.Group.Driver.Impl
         private static Tuple<string, string, string, string, int> GenerateMetaDataDecoding(byte[] obj)
         {
             int groupCount = BitConverter.ToInt32(obj, 0);
-            int operatorCount = BitConverter.ToInt32(obj, sizeof (int));
-            int srcCount = BitConverter.ToInt32(obj, 2*sizeof (int));
-            int dstCount = BitConverter.ToInt32(obj, 3*sizeof (int));
+            int operatorCount = BitConverter.ToInt32(obj, sizeof(int));
+            int srcCount = BitConverter.ToInt32(obj, 2 * sizeof(int));
+            int dstCount = BitConverter.ToInt32(obj, 3 * sizeof(int));
 
             int offset = 4 * sizeof(int);
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastSender.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastSender.cs b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastSender.cs
index 0e69808..0d379c9 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastSender.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastSender.cs
@@ -53,7 +53,7 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
         /// <param name="dataConverter">The converter used to convert original
         /// message to pipelined ones and vice versa.</param>
         [Inject]
-        private  BroadcastSender(
+        private BroadcastSender(
             [Parameter(typeof(GroupCommConfigurationOptions.OperatorName))] string operatorName,
             [Parameter(typeof(GroupCommConfigurationOptions.CommunicationGroupName))] string groupName,
             [Parameter(typeof(GroupCommConfigurationOptions.Initialize))] bool initialize,

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceSender.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceSender.cs b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceSender.cs
index bc161f1..16f52cc 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceSender.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceSender.cs
@@ -124,7 +124,7 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
                 {
                     var reducedValueOfChildren = _topology.ReceiveFromChildren(_pipelinedReduceFunc);
 
-                    var mergeddData = new List<PipelineMessage<T>> {message};
+                    var mergeddData = new List<PipelineMessage<T>> { message };
 
                     if (reducedValueOfChildren != null)
                     {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterSender.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterSender.cs b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterSender.cs
index 735d2a9..f88650f 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterSender.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterSender.cs
@@ -37,7 +37,7 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
     {
         private const int DefaultVersion = 1;
         private readonly IOperatorTopology<T> _topology;
-        private readonly bool _initialize ;
+        private readonly bool _initialize;
 
         /// <summary>
         /// Creates a new ScatterSender.

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/IPipelineDataConverter.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/IPipelineDataConverter.cs b/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/IPipelineDataConverter.cs
index f2dc551..46fc3f3 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/IPipelineDataConverter.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/IPipelineDataConverter.cs
@@ -30,7 +30,7 @@ namespace Org.Apache.REEF.Network.Group.Pipelining
     /// amenable data and vice-versa 
     /// </summary>
     /// <typeparam name="T">The message type</typeparam>
-    //[DefaultImplementation(typeof(DefaultPipelineDataConverter<>))]
+    // [DefaultImplementation(typeof(DefaultPipelineDataConverter<>))]
     public interface IPipelineDataConverter<T>
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/StreamingPipelineMessageCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/StreamingPipelineMessageCodec.cs b/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/StreamingPipelineMessageCodec.cs
index 9236e95..d1cd1d0 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/StreamingPipelineMessageCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/StreamingPipelineMessageCodec.cs
@@ -50,7 +50,7 @@ namespace Org.Apache.REEF.Network.Group.Pipelining
         /// Instantiate the class from the reader.
         /// </summary>
         /// <param name="reader">The reader from which to read</param>
-        ///<returns>The Pipeline Message read from the reader</returns>
+        /// <returns>The Pipeline Message read from the reader</returns>
         public PipelineMessage<T> Read(IDataReader reader)
         {
             var message = BaseCodec.Read(reader);
@@ -69,10 +69,10 @@ namespace Org.Apache.REEF.Network.Group.Pipelining
             writer.WriteBoolean(obj.IsLast);
         }
 
-        ///  <summary>
-        ///  Instantiate the class from the reader.
-        ///  </summary>
-        ///  <param name="reader">The reader from which to read</param>
+        /// <summary>
+        /// Instantiate the class from the reader.
+        /// </summary>
+        /// <param name="reader">The reader from which to read</param>
         /// <param name="token">Cancellation token</param>
         /// <returns>The Pipeline Message  read from the reader</returns>
         public async Task<PipelineMessage<T>> ReadAsync(IDataReader reader, CancellationToken token)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs
index a5fa1da..749bb6a 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs
@@ -174,7 +174,7 @@ namespace Org.Apache.REEF.Network.Group.Task.Impl
                 Exceptions.Throw(new ArgumentException("Operator is not added at Driver side:" + operatorName), LOGGER);
             }
 
-            return (T) op;
+            return (T)op;
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs
index 8fe19d6..4ac38c4 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs
@@ -363,7 +363,7 @@ namespace Org.Apache.REEF.Network.Group.Task.Impl
         /// <summary>
         /// Get a set of nodes containing an incoming message and belonging to candidate set of nodes.
         /// </summary>
-        ///<param name="nodeSetIdentifier">Candidate set of nodes from which data is to be received</param>
+        /// <param name="nodeSetIdentifier">Candidate set of nodes from which data is to be received</param>
         /// <returns>A Vector of NodeStruct with incoming data.</returns>
         private IEnumerable<NodeStruct<T>> GetNodeWithData(IEnumerable<string> nodeSetIdentifier)
         {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs b/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs
index 56ab033..3948dad 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs
@@ -103,13 +103,13 @@ namespace Org.Apache.REEF.Network.Group.Topology
                 parentId = parent.TaskId;
             }
 
-            //add parentid, if no parent, add itself
+            // add parentid, if no parent, add itself
             ICsConfigurationBuilder confBuilder = TangFactory.GetTang().NewConfigurationBuilder()
                 .BindNamedParameter<GroupCommConfigurationOptions.TopologyRootTaskId, string>(
                     GenericType<GroupCommConfigurationOptions.TopologyRootTaskId>.Class,
                     parentId);
 
-            //add all its children
+            // add all its children
             foreach (TaskNode childNode in selfTaskNode.GetChildren())
             {
                 confBuilder.BindSetEntry<GroupCommConfigurationOptions.TopologyChildTaskIds, string>(


[6/6] incubator-reef git commit: [REEF-979] Enable StyleCop.CSharp.SpacingRules and fix violations

Posted by ma...@apache.org.
[REEF-979] Enable StyleCop.CSharp.SpacingRules and fix violations

This also:
 * converts StyleCop violations to build breaks,
 * excludes .cs files generated from Avro and Proto schemes from check.

JIRA:
  [REEF-979](https://issues.apache.org/jira/browse/REEF-979)

Pull Request:
  This closes #660


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

Branch: refs/heads/master
Commit: dd07dc3ef92203ae66530082bfa6c67c0d397f80
Parents: e7a5606
Author: Dongjoon Hyun <do...@apache.org>
Authored: Fri Nov 20 03:07:29 2015 +0900
Committer: Mariia Mykhailova <ma...@apache.org>
Committed: Tue Nov 24 11:25:05 2015 -0800

----------------------------------------------------------------------
 .../Org.Apache.REEF.All.csproj                  |   3 +-
 .../Org.Apache.REEF.Client.Tests.csproj         |   3 +-
 .../WindowsHadoopEmulatorYarnClientTests.cs     |   2 +-
 .../Org.Apache.REEF.Client/Common/FileSets.cs   |   2 +-
 .../Common/JobSubmissionResult.cs               |   4 +-
 .../Common/ResourceArchiveFileGenerator.cs      |   2 +-
 .../Common/ResourceHelper.cs                    |   2 +-
 .../Org.Apache.REEF.Client/Local/LocalClient.cs |   2 +-
 .../Org.Apache.REEF.Client.csproj               |   3 +-
 .../YARN/Parameters/SecurityTokenParameters.cs  |   2 +-
 .../RESTClient/FileSystemJobResourceUploader.cs |   2 +-
 .../YARN/RESTClient/MultipleRMUrlProvider.cs    |   4 +-
 .../YARN/RESTClient/YarnClient.cs               |   3 +-
 .../YARN/YARNREEFClient.cs                      |   2 +-
 .../Org.Apache.REEF.Common.Tests.csproj         |   3 +-
 .../Avro/AvroHttpSerializer.cs                  |   2 +-
 lang/cs/Org.Apache.REEF.Common/Constants.cs     |   2 +-
 .../Org.Apache.REEF.Common.csproj               |  39 +++--
 .../Evaluator/Context/ContextLifeCycle.cs       |  22 +--
 .../Runtime/Evaluator/Context/ContextManager.cs |   4 +-
 .../Runtime/Evaluator/Context/ContextRuntime.cs |  98 ++++++------
 .../Evaluator/Context/RootContextLauncher.cs    |  36 ++---
 .../Runtime/Evaluator/Task/TaskStartImpl.cs     |   2 +-
 .../Runtime/Evaluator/Task/TaskStatus.cs        |   6 +-
 .../Runtime/Evaluator/Task/TaskStopImpl.cs      |   2 +-
 .../Tasks/IDriverMessageHandler.cs              |   2 +-
 .../Bridge/BridgeConfigurationProvider.cs       |   3 +-
 .../Bridge/ClrSystemHandlerWrapper.cs           |   9 +-
 .../Bridge/DriverBridgeConfigurationOptions.cs  |   4 +-
 .../Bridge/Events/AllocatedEvaluator.cs         |   2 +-
 .../Bridge/Events/FailedEvaluator.cs            |   6 +-
 lang/cs/Org.Apache.REEF.Driver/Constants.cs     |   2 +-
 .../Defaults/DefaultTaskFailureHandler.cs       |   2 +-
 .../DriverConfigGenerator.cs                    |   4 +-
 .../Evaluator/EvaluatorDescriptorImpl.cs        |   6 +-
 .../Evaluator/EvaluatorRequestBuilder.cs        |   2 +-
 .../Org.Apache.REEF.Driver.csproj               |   3 +-
 .../EvaluatorTests.cs                           |   4 +-
 .../Org.Apache.REEF.Evaluator.Tests.csproj      |   3 +-
 lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs  |   2 +-
 .../Org.Apache.REEF.Evaluator.csproj            |   3 +-
 .../HelloHttpHandler.cs                         |   7 +-
 .../HelloTraceListener.cs                       |   2 +-
 .../Org.Apache.REEF.Examples.AllHandlers.csproj |   3 +-
 ...rg.Apache.REEF.Examples.DriverRestart.csproj |   3 +-
 .../Org.Apache.REEF.Examples.HelloREEF.csproj   |   3 +-
 .../Org.Apache.REEF.Examples.csproj             |   3 +-
 .../Tasks/StreamingTasks/StreamTask1.cs         |   4 +-
 .../Tasks/StreamingTasks/StreamTask2.cs         |   4 +-
 .../Org.Apache.REEF.IMRU.Examples.csproj        |   3 +-
 .../BroadcastReceiverReduceSenderMapFunction.cs |   2 +-
 ...oadcastSenderReduceReceiverUpdateFunction.cs |  11 +-
 .../PipelinedBroadcastAndReduce.cs              |  10 +-
 .../MapInputWithControlMessageTests.cs          |   4 +-
 .../MapperCountTest.cs                          |   3 +-
 .../Org.Apache.REEF.IMRU.Tests.csproj           |   3 +-
 .../API/IMRUJobDefinitionBuilder.cs             |   2 +-
 .../InProcess/IMRURunner.cs                     |   4 +-
 .../InProcess/InProcessIMRUClient.cs            |   4 +-
 .../OnREEF/Client/REEFIMRUClient.cs             |   4 +-
 .../OnREEF/Driver/ConfigurationManager.cs       |   2 +-
 .../OnREEF/Driver/IMRUDriver.cs                 |  30 ++--
 .../ServiceAndContextConfigurationProvider.cs   |  16 +-
 .../OnREEF/IMRUTasks/MapTaskHost.cs             |   2 +-
 .../OnREEF/IMRUTasks/UpdateTaskHost.cs          |   2 +-
 .../MapControlMessage.cs                        |   4 +-
 .../MapInputWithControlMessageCodec.cs          |   8 +-
 .../OnREEF/ResultHandler/WriteResultHandler.cs  |   2 +-
 .../Org.Apache.REEF.IMRU.csproj                 |   3 +-
 .../HadoopFileInputPartitionTest.cs             |   2 +-
 .../Org.Apache.REEF.IO.TestClient.csproj        |   3 +-
 lang/cs/Org.Apache.REEF.IO.TestClient/Run.cs    |   4 +-
 .../Org.Apache.REEF.IO.Tests.csproj             |   3 +-
 .../TestAzureBlockBlobFileSystemE2E.cs          |   2 +-
 .../TestFilePartitionInputDataSet.cs            |   6 +-
 .../TestLocalFileSystem.cs                      |   2 +-
 .../TestRandomInputDataSet.cs                   |   2 +-
 .../AzureBlob/AzureBlockBlobFileSystem.cs       |   2 +-
 .../RetryPolicy/DefaultAzureBlobRetryPolicy.cs  |   2 +-
 .../Org.Apache.REEF.IO.csproj                   |   3 +-
 .../FileSystem/FileSystemInputPartition.cs      |   4 +-
 .../FileSystemPartitionInputDataSet.cs          |   7 +-
 .../Random/RandomInputPartition.cs              |   4 +-
 ...g.Apache.REEF.Network.Examples.Client.csproj |   3 +-
 .../BroadcastReduceDriverAndTasks/MasterTask.cs |   4 +-
 .../PipelinedBroadcastReduceDriver.cs           |  16 +-
 .../PipelinedMasterTask.cs                      |   8 +-
 .../PipelinedSlaveTask.cs                       |   4 +-
 .../Org.Apache.REEF.Network.Examples.csproj     |   3 +-
 .../GroupCommunication/GroupCommuDriverTests.cs |   6 +-
 .../GroupCommunicationTests.cs                  |  24 +--
 .../GroupCommunicationTreeTopologyTests.cs      |   4 +-
 .../GroupCommunication/StreamingCodecTests.cs   |   2 +-
 .../StreamingNetworkServiceTests.cs             |   2 +-
 .../Org.Apache.REEF.Network.Tests.csproj        |   3 +-
 .../Config/GroupCommConfigurationOptions.cs     |   2 +-
 .../Driver/Impl/CommunicationGroupDriver.cs     |   8 +-
 .../GroupCommunicationMessageStreamingCodec.cs  |   6 +-
 .../Group/Operators/Impl/BroadcastSender.cs     |   2 +-
 .../Group/Operators/Impl/ReduceSender.cs        |   2 +-
 .../Group/Operators/Impl/ScatterSender.cs       |   2 +-
 .../Group/Pipelining/IPipelineDataConverter.cs  |   2 +-
 .../Pipelining/StreamingPipelineMessageCodec.cs |  10 +-
 .../Group/Task/Impl/CommunicationGroupClient.cs |   2 +-
 .../Group/Task/Impl/OperatorTopology.cs         |   2 +-
 .../Group/Topology/TreeTopology.cs              |   4 +-
 .../Org.Apache.REEF.Network/Naming/NameCache.cs |  12 +-
 .../Naming/NameClient.cs                        |   6 +-
 .../NetworkService/Codec/ControlMessageCodec.cs |   4 +-
 .../Codec/NsMessageStreamingCodec.cs            |  18 +--
 .../Codec/StreamingCodecFunctionCache.cs        |  24 +--
 .../Org.Apache.REEF.Network.csproj              |   3 +-
 .../AnonymousType.cs                            |   4 +-
 .../Org.Apache.REEF.Tang.Examples/CheckChild.cs |   2 +-
 .../ForksInjectorInConstructor.cs               |   2 +-
 .../Org.Apache.REEF.Tang.Examples.csproj        |   3 +-
 .../ShortNameFooAB.cs                           |   2 +-
 .../TweetExample.cs                             |   2 +-
 .../ClassHierarchy/TestAvroSerialization.cs     |  12 +-
 .../ClassHierarchy/TestClassHierarchy.cs        |  16 +-
 .../ClassHierarchy/TestNamedParameter.cs        |   3 +-
 .../ClassHierarchy/TestParameterParser.cs       |  12 +-
 .../ClassHierarchy/TestSerilization.cs          |  16 +-
 .../Configuration/TestConfiguration.cs          |  82 +++++-----
 .../TestCsConfigurationBuilderExtension.cs      |   4 +-
 .../Format/TestConfigurationModule.cs           |   4 +-
 .../Format/TestConfigurationModuleForList.cs    |   6 +-
 .../Injection/TestAmbigousConstructors.cs       |  10 +-
 .../Injection/TestInjection.cs                  |   8 +-
 .../Injection/TestListInjection.cs              |  74 ++++-----
 .../Injection/TestMissingParameters.cs          |  30 ++--
 .../Injection/TestMissingParamtersInNested.cs   |  18 +--
 .../Injection/TestMultipleConstructors.cs       | 159 +++++++++----------
 .../Injection/TestSetInjection.cs               |   8 +-
 .../Org.Apache.REEF.Tang.Tests.csproj           |   3 +-
 .../ScenarioTest/JettyHandler.cs                |   2 +-
 .../ScenarioTest/TestHttpService.cs             |   2 +-
 .../SmokeTest/RootImplementation.cs             |  16 +-
 .../Tang/TestLegacyConstructors.cs              |   2 +-
 .../Org.Apache.REEF.Tang.Tests/Tang/TestTang.cs | 104 ++++++------
 .../Utilities/AssemblyLoaderTests.cs            |   4 +-
 .../Utilities/TestUtilities.cs                  |   2 +-
 .../Org.Apache.REEF.Tang.Tools.csproj           |   3 +-
 .../Exceptions/BindException.cs                 |   2 +-
 .../Exceptions/ClassHierarchyException.cs       |   2 +-
 .../Exceptions/NameResolutionException.cs       |   2 +-
 .../Formats/AvroConfigurationSerializer.cs      |   3 -
 .../Formats/ConfigurationFile.cs                |  10 +-
 .../Formats/ConfigurationModule.cs              |  12 +-
 .../Formats/ConfigurationModuleBuilder.cs       |  10 +-
 .../ClassHierarchy/AbstractNode.cs              |  12 +-
 .../AvroClassHierarchySerializer.cs             |   6 +-
 .../ClassHierarchy/ClassHierarchyImpl.cs        |  62 ++++----
 .../ClassHierarchy/ConstructorArgImpl.cs        |   8 +-
 .../ClassHierarchy/ConstructorDefImpl.cs        |   4 +-
 .../ClassHierarchy/NodeFactory.cs               |  44 ++---
 .../ClassHierarchy/ParameterParser.cs           |  24 +--
 .../Configuration/ConfigurationBuilderImpl.cs   |  12 +-
 .../Configuration/CsConfigurationBuilderImpl.cs |  25 +--
 .../InjectionPlan/Constructor.cs                |  30 ++--
 .../Implementations/InjectionPlan/CsInstance.cs |   8 +-
 .../InjectionPlan/InjectionFuture.cs            |  42 ++---
 .../InjectionPlan/InjectionFuturePlan.cs        |  12 +-
 .../InjectionPlan/InjectionPlan.cs              |  12 +-
 .../InjectionPlan/InjectorImpl.cs               |  85 +++++-----
 .../InjectionPlan/SetInjectionPlan.cs           |  12 +-
 .../Implementations/InjectionPlan/Subplan.cs    |  22 +--
 .../Implementations/Tang/TangImpl.cs            |  23 ++-
 .../Interface/IConfiguration.cs                 |   4 +-
 .../Interface/IConfigurationBuilder.cs          |   2 +-
 .../Interface/ICsConfigurationBuilder.cs        |   8 +-
 .../Org.Apache.REEF.Tang.csproj                 |  35 ++--
 .../Protobuf/ProtocolBufferClassHierarchy.cs    |   9 +-
 .../Protobuf/ProtocolBufferInjectionPlan.cs     |   8 +-
 .../Org.Apache.REEF.Tang/Util/MonotonicSet.cs   |  12 +-
 .../Util/MonotonicTreeMap.cs                    |   4 +-
 .../Util/ReflectionUtilities.cs                 |  44 ++---
 .../Bridge/HelloSimpleEventHandlers.cs          |   2 +-
 .../Functional/Bridge/TestBridgeClient.cs       |   4 +-
 .../Org.Apache.REEF.Tests.csproj                |   3 +-
 .../Org.Apache.REEF.Utilities/IIdentifiable.cs  |   2 +-
 .../Org.Apache.Reef.Utilities.csproj            |   3 +-
 lang/cs/Org.Apache.REEF.Wake.Tests/ClockTest.cs |   2 +-
 .../Org.Apache.REEF.Wake.Tests.csproj           |   3 +-
 lang/cs/Org.Apache.REEF.Wake/IStage.cs          |   2 +-
 lang/cs/Org.Apache.REEF.Wake/Impl/TimerStage.cs |   2 +-
 .../Org.Apache.REEF.Wake.csproj                 |   7 +-
 .../Org.Apache.REEF.Wake/RX/AbstractRxStage.cs  |   6 +-
 .../RX/IStaticObservable.cs                     |   2 +-
 .../RX/Impl/PubSubSubject.cs                    |   2 +-
 .../cs/Org.Apache.REEF.Wake/Remote/Impl/Link.cs |   4 +-
 .../Remote/Impl/MultiDecoder.cs                 |   2 +-
 .../Remote/Impl/MultiEncoder.cs                 |   2 +-
 .../Remote/Impl/RemoteEventStreamingCodec.cs    |   4 +-
 .../Remote/Impl/StreamDataReader.cs             |  10 +-
 .../Remote/Impl/StreamingLink.cs                |   6 +-
 .../Remote/Impl/StreamingTransportServer.cs     |   5 +-
 .../Remote/Impl/TransportServer.cs              |   3 +-
 .../Remote/Parameters/TcpPortRangeSeed.cs       |   2 +-
 .../Remote/TcpPortProvider.cs                   |   3 +-
 .../DoubleArrayStreamingCodec.cs                |  12 +-
 .../DoubleStreamingCodec.cs                     |  10 +-
 .../FloatArrayStreamingCodec.cs                 |  12 +-
 .../FloatStreamingCodec.cs                      |  10 +-
 .../IntArrayStreamingCodec.cs                   |  12 +-
 .../CommonStreamingCodecs/IntStreamingCodec.cs  |  10 +-
 .../StringStreamingCodec.cs                     |  10 +-
 .../StreamingCodec/IStreamingCodec.cs           |  10 +-
 .../Time/Runtime/RuntimeClock.cs                |   2 +-
 lang/cs/Settings.StyleCop                       |  58 +++----
 lang/cs/build.props                             |   2 +-
 211 files changed, 1098 insertions(+), 1047 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.All/Org.Apache.REEF.All.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.All/Org.Apache.REEF.All.csproj b/lang/cs/Org.Apache.REEF.All/Org.Apache.REEF.All.csproj
index 9feecdb..34e0a7c 100644
--- a/lang/cs/Org.Apache.REEF.All/Org.Apache.REEF.All.csproj
+++ b/lang/cs/Org.Apache.REEF.All/Org.Apache.REEF.All.csproj
@@ -79,6 +79,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
@@ -86,4 +87,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Client.Tests/Org.Apache.REEF.Client.Tests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client.Tests/Org.Apache.REEF.Client.Tests.csproj b/lang/cs/Org.Apache.REEF.Client.Tests/Org.Apache.REEF.Client.Tests.csproj
index 8c86d89..fd464d5 100644
--- a/lang/cs/Org.Apache.REEF.Client.Tests/Org.Apache.REEF.Client.Tests.csproj
+++ b/lang/cs/Org.Apache.REEF.Client.Tests/Org.Apache.REEF.Client.Tests.csproj
@@ -93,6 +93,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -108,4 +109,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Client.Tests/WindowsHadoopEmulatorYarnClientTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client.Tests/WindowsHadoopEmulatorYarnClientTests.cs b/lang/cs/Org.Apache.REEF.Client.Tests/WindowsHadoopEmulatorYarnClientTests.cs
index 31b7382..1e273f7 100644
--- a/lang/cs/Org.Apache.REEF.Client.Tests/WindowsHadoopEmulatorYarnClientTests.cs
+++ b/lang/cs/Org.Apache.REEF.Client.Tests/WindowsHadoopEmulatorYarnClientTests.cs
@@ -40,7 +40,7 @@ namespace Org.Apache.REEF.Client.Tests
             ServiceController[] serviceControllers = ServiceController.GetServices();
             IEnumerable<string> actualServices = serviceControllers.Select(x => x.ServiceName);
 
-            string[] expectedServices = {"datanode", "namenode", "nodemanager", "resourcemanager"};
+            string[] expectedServices = { "datanode", "namenode", "nodemanager", "resourcemanager" };
 
             bool allServicesExist = expectedServices.All(expectedService => actualServices.Contains(expectedService));
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Client/Common/FileSets.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/Common/FileSets.cs b/lang/cs/Org.Apache.REEF.Client/Common/FileSets.cs
index cb154b3..3a01aaa 100644
--- a/lang/cs/Org.Apache.REEF.Client/Common/FileSets.cs
+++ b/lang/cs/Org.Apache.REEF.Client/Common/FileSets.cs
@@ -31,7 +31,7 @@ namespace Org.Apache.REEF.Client.Common
     /// </summary>
     internal sealed class FileSets
     {
-        private static readonly Logger Logger = Logger.GetLogger(typeof (FileSets));
+        private static readonly Logger Logger = Logger.GetLogger(typeof(FileSets));
         private readonly REEFFileNames _fileNames;
 
         private readonly ISet<string> _globalFileSet =

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Client/Common/JobSubmissionResult.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/Common/JobSubmissionResult.cs b/lang/cs/Org.Apache.REEF.Client/Common/JobSubmissionResult.cs
index 80bad49..45ff252 100644
--- a/lang/cs/Org.Apache.REEF.Client/Common/JobSubmissionResult.cs
+++ b/lang/cs/Org.Apache.REEF.Client/Common/JobSubmissionResult.cs
@@ -34,7 +34,7 @@ namespace Org.Apache.REEF.Client.Common
 {
     internal abstract class JobSubmissionResult : IJobSubmissionResult
     {
-        private static readonly Logger LOGGER = Logger.GetLogger(typeof (JobSubmissionResult));
+        private static readonly Logger LOGGER = Logger.GetLogger(typeof(JobSubmissionResult));
         private const int MaxConnectAttemptCount = 20;
         private const int MilliSecondsToWaitBeforeNextConnectAttempt = 1000;
         private const int SecondsForHttpClientTimeout = 120;
@@ -124,7 +124,7 @@ namespace Org.Apache.REEF.Client.Common
             }
         }
 
-        internal async Task<string> CallUrl (string url)
+        internal async Task<string> CallUrl(string url)
         {
             var result = await TryGetUri(url);
             if (HasCommandFailed(result))

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Client/Common/ResourceArchiveFileGenerator.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/Common/ResourceArchiveFileGenerator.cs b/lang/cs/Org.Apache.REEF.Client/Common/ResourceArchiveFileGenerator.cs
index e343be3..97a47dc 100644
--- a/lang/cs/Org.Apache.REEF.Client/Common/ResourceArchiveFileGenerator.cs
+++ b/lang/cs/Org.Apache.REEF.Client/Common/ResourceArchiveFileGenerator.cs
@@ -34,7 +34,7 @@ namespace Org.Apache.REEF.Client.Common
         private readonly REEFFileNames _reefFileNames;
 
         [Inject]
-        private ResourceArchiveFileGenerator (REEFFileNames reefFileNames)
+        private ResourceArchiveFileGenerator(REEFFileNames reefFileNames)
         {
             _reefFileNames = reefFileNames;
         }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Client/Common/ResourceHelper.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/Common/ResourceHelper.cs b/lang/cs/Org.Apache.REEF.Client/Common/ResourceHelper.cs
index 008a236..e6eeefc 100644
--- a/lang/cs/Org.Apache.REEF.Client/Common/ResourceHelper.cs
+++ b/lang/cs/Org.Apache.REEF.Client/Common/ResourceHelper.cs
@@ -65,7 +65,7 @@ namespace Org.Apache.REEF.Client.Common
             {
                 throw new ApplicationException(string.Format(CouldNotRetrieveResource, resourceName));
             }
-            return (T) resource;
+            return (T)resource;
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Client/Local/LocalClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/Local/LocalClient.cs b/lang/cs/Org.Apache.REEF.Client/Local/LocalClient.cs
index b11bf87..2c54259 100644
--- a/lang/cs/Org.Apache.REEF.Client/Local/LocalClient.cs
+++ b/lang/cs/Org.Apache.REEF.Client/Local/LocalClient.cs
@@ -161,7 +161,7 @@ namespace Org.Apache.REEF.Client.Local
         /// Return current Job status
         /// </summary>
         /// <returns></returns>
-        /// //TODO: REEF-889
+        /// TODO: REEF-889
         [Unstable("0.14", "Working in progress for rest API status returned")]
         public async Task<FinalState> GetJobFinalStatus(string appId)
         {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj b/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj
index 622f8f1..e32d265 100644
--- a/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj
+++ b/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj
@@ -201,6 +201,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -302,4 +303,4 @@ under the License.
   </Target>
   <Target Name="BeforeBuild" DependsOnTargets="$(BeforeBuildDependsOn);RewriteClientResources">
   </Target>
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Client/YARN/Parameters/SecurityTokenParameters.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/YARN/Parameters/SecurityTokenParameters.cs b/lang/cs/Org.Apache.REEF.Client/YARN/Parameters/SecurityTokenParameters.cs
index 5d97088..a6a8092 100644
--- a/lang/cs/Org.Apache.REEF.Client/YARN/Parameters/SecurityTokenParameters.cs
+++ b/lang/cs/Org.Apache.REEF.Client/YARN/Parameters/SecurityTokenParameters.cs
@@ -19,7 +19,7 @@ using Org.Apache.REEF.Tang.Annotations;
 
 namespace Org.Apache.REEF.Client.YARN.Parameters
 {
-    [NamedParameter("Security token kind.", defaultValue:"NULL")]
+    [NamedParameter("Security token kind.", defaultValue: "NULL")]
     public sealed class SecurityTokenKindParameter : Name<string>
     {
     }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/FileSystemJobResourceUploader.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/FileSystemJobResourceUploader.cs b/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/FileSystemJobResourceUploader.cs
index cfa83b0..5e1b4c2 100644
--- a/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/FileSystemJobResourceUploader.cs
+++ b/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/FileSystemJobResourceUploader.cs
@@ -75,7 +75,7 @@ namespace Org.Apache.REEF.Client.YARN.RestClient
 
         private long DateTimeToUnixTimestamp(DateTime dateTime)
         {
-            return (long) (dateTime - Epoch).TotalSeconds;
+            return (long)(dateTime - Epoch).TotalSeconds;
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/MultipleRMUrlProvider.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/MultipleRMUrlProvider.cs b/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/MultipleRMUrlProvider.cs
index 5ce3bb8..4429279 100644
--- a/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/MultipleRMUrlProvider.cs
+++ b/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/MultipleRMUrlProvider.cs
@@ -61,8 +61,8 @@ namespace Org.Apache.REEF.Client.YARN.RestClient
             var configRoot = XElement.Load(yarnConfigurationFile);
             var address = configRoot.Elements("property")
                 .Where(x =>
-                    ((string) x.Element("name")).ToUpper().StartsWith(RmConfigKeyPrefix.ToUpper()))
-                .Select(x => (string) x.Element("value"));
+                    ((string)x.Element("name")).ToUpper().StartsWith(RmConfigKeyPrefix.ToUpper()))
+                .Select(x => (string)x.Element("value"));
             _yarnRmUri =
                 address.Select(x => x.TrimEnd('/') + @"/")
                     .Select(x => string.Format("http://{0}", x))

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/YarnClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/YarnClient.cs b/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/YarnClient.cs
index a649594..32930dc 100644
--- a/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/YarnClient.cs
+++ b/lang/cs/Org.Apache.REEF.Client/YARN/RESTClient/YarnClient.cs
@@ -55,8 +55,7 @@ namespace Org.Apache.REEF.Client.Yarn.RestClient
         {
             await new RemoveSynchronizationContextAwaiter();
 
-            IRestRequest request = CreateRestRequest( ClusterInfo.Resource, Method.GET, ClusterInfo.RootElement
-            );
+            IRestRequest request = CreateRestRequest(ClusterInfo.Resource, Method.GET, ClusterInfo.RootElement);
 
             return
                 await GenerateUrlAndExecuteRequestAsync<ClusterInfo>(request, cancellationToken);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Client/YARN/YARNREEFClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/YARN/YARNREEFClient.cs b/lang/cs/Org.Apache.REEF.Client/YARN/YARNREEFClient.cs
index ce242bc..760b303 100644
--- a/lang/cs/Org.Apache.REEF.Client/YARN/YARNREEFClient.cs
+++ b/lang/cs/Org.Apache.REEF.Client/YARN/YARNREEFClient.cs
@@ -122,7 +122,7 @@ namespace Org.Apache.REEF.Client.Yarn
         {
             _driverFolderPreparationHelper.PrepareDriverFolder(jobSubmission, driverFolderPath);
 
-            //TODO: Remove this when we have a generalized way to pass config to java
+            // TODO: Remove this when we have a generalized way to pass config to java
             var paramInjector = TangFactory.GetTang().NewInjector(jobSubmission.DriverConfigurations.ToArray());
                 
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Common.Tests/Org.Apache.REEF.Common.Tests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common.Tests/Org.Apache.REEF.Common.Tests.csproj b/lang/cs/Org.Apache.REEF.Common.Tests/Org.Apache.REEF.Common.Tests.csproj
index af3b1ca..9aa36ba 100644
--- a/lang/cs/Org.Apache.REEF.Common.Tests/Org.Apache.REEF.Common.Tests.csproj
+++ b/lang/cs/Org.Apache.REEF.Common.Tests/Org.Apache.REEF.Common.Tests.csproj
@@ -84,6 +84,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -98,4 +99,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Common/Avro/AvroHttpSerializer.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Avro/AvroHttpSerializer.cs b/lang/cs/Org.Apache.REEF.Common/Avro/AvroHttpSerializer.cs
index 24d9628..1812002 100644
--- a/lang/cs/Org.Apache.REEF.Common/Avro/AvroHttpSerializer.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Avro/AvroHttpSerializer.cs
@@ -119,7 +119,7 @@ namespace Org.Apache.REEF.Common.Avro
             var bytes = ToBytes(avroHttprequest);
             using (var file = File.OpenWrite(fileName))
             {
-                file.Write(bytes,0,bytes.Length);
+                file.Write(bytes, 0, bytes.Length);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Common/Constants.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Constants.cs b/lang/cs/Org.Apache.REEF.Common/Constants.cs
index 913d810..fae0b21 100644
--- a/lang/cs/Org.Apache.REEF.Common/Constants.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Constants.cs
@@ -23,7 +23,7 @@ namespace Org.Apache.REEF.Common
 {
     public class Constants
     {
-        [Obsolete(message:"Use REEFFileNames instead.")]
+        [Obsolete(message: "Use REEFFileNames instead.")]
         public const string ClrBridgeRuntimeConfiguration = "clrBridge.config";
 
         // if 8080 port is not used, then query would fail, 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj b/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj
index eb303ed..7f63053 100644
--- a/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj
+++ b/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj
@@ -55,12 +55,20 @@ under the License.
     <Compile Include="Api\IAbstractFailure.cs" />
     <Compile Include="Api\IFailure.cs" />
     <Compile Include="Attributes\UnstableAttribute.cs" />
-    <Compile Include="Avro\AvroDriverInfo.cs" />
-    <Compile Include="Avro\AvroHttpRequest.cs" />
+    <Compile Include="Avro\AvroDriverInfo.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="Avro\AvroHttpRequest.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
     <Compile Include="Avro\AvroHttpSerializer.cs" />
     <Compile Include="Avro\AvroJsonSerializer.cs" />
-    <Compile Include="Avro\AvroReefServiceInfo.cs" />
-    <Compile Include="Avro\HeaderEntry.cs" />
+    <Compile Include="Avro\AvroReefServiceInfo.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="Avro\HeaderEntry.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
     <Compile Include="Catalog\Capabilities\CPU.cs" />
     <Compile Include="Catalog\Capabilities\ICapability.cs" />
     <Compile Include="Catalog\Capabilities\RAM.cs" />
@@ -98,13 +106,23 @@ under the License.
     <Compile Include="ITaskSubmittable.cs" />
     <Compile Include="Client\Parameters\DriverConfigurationProviders.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Protobuf\ReefProtocol\ClientRuntime.pb.cs" />
-    <Compile Include="Protobuf\ReefProtocol\DriverRuntime.pb.cs" />
+    <Compile Include="Protobuf\ReefProtocol\ClientRuntime.pb.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="Protobuf\ReefProtocol\DriverRuntime.pb.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
     <Compile Include="Protobuf\ReefProtocol\EvaluatorHeartbeatProtoCodec.cs" />
-    <Compile Include="Protobuf\ReefProtocol\EvaluatorRunTime.pb.cs" />
+    <Compile Include="Protobuf\ReefProtocol\EvaluatorRunTime.pb.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
     <Compile Include="Protobuf\ReefProtocol\REEFMessageCodec.cs" />
-    <Compile Include="Protobuf\ReefProtocol\ReefProtocol.pb.cs" />
-    <Compile Include="Protobuf\ReefProtocol\ReefService.pb.cs" />
+    <Compile Include="Protobuf\ReefProtocol\ReefProtocol.pb.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="Protobuf\ReefProtocol\ReefService.pb.cs">
+        <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
+    </Compile>
     <Compile Include="Protobuf\ReefProtocol\Serializer.cs" />
     <Compile Include="Files\REEFFileNames.cs" />
     <Compile Include="Runtime\Evaluator\Constants.cs" />
@@ -180,6 +198,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
@@ -187,4 +206,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextLifeCycle.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextLifeCycle.cs b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextLifeCycle.cs
index 25ae343..210f452 100644
--- a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextLifeCycle.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextLifeCycle.cs
@@ -70,11 +70,11 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator.Context
         {
             IContextStart contextStart = new ContextStartImpl(Id);
             
-            // TODO: enable
-            //foreach (IObserver<IContextStart> startHandler in _contextStartHandlers)
-            //{
-            //    startHandler.OnNext(contextStart);
-            //}
+            ////TODO: enable
+            ////foreach (IObserver<IContextStart> startHandler in _contextStartHandlers)
+            ////{
+            ////   startHandler.OnNext(contextStart);
+            ////}
         }
 
         /// <summary>
@@ -82,16 +82,16 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator.Context
         /// </summary>
         public void Close()
         {
-            //IContextStop contextStop = new ContextStopImpl(Id);
-            //foreach (IObserver<IContextStop> startHandler in _contextStopHandlers)
-            //{
-            //    startHandler.OnNext(contextStop);
-            //}
+            ////IContextStop contextStop = new ContextStopImpl(Id);
+            ////foreach (IObserver<IContextStop> startHandler in _contextStopHandlers)
+            ////{
+            ////   startHandler.OnNext(contextStop);
+            ////}
         }
 
         public void HandleContextMessage(byte[] message)
         {
-            //contextMessageHandler.onNext(message);
+            // contextMessageHandler.onNext(message);
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextManager.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextManager.cs b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextManager.cs
index e3fbb08..47301aa 100644
--- a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextManager.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextManager.cs
@@ -195,7 +195,7 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator.Context
             {
                 return Optional<TaskStatusProto>.Empty();
 
-                //throw new InvalidOperationException("Asked for an Task status while there isn't even a context running.");
+                // throw new InvalidOperationException("Asked for an Task status while there isn't even a context running.");
             }
             return _contextStack.Peek().GetTaskStatus();
         }
@@ -300,7 +300,7 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator.Context
                 }
                 _contextStack.Pop();
             }
-            //  System.gc(); // TODO: garbage collect?
+            // System.gc(); // TODO: garbage collect?
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextRuntime.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextRuntime.cs b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextRuntime.cs
index 352a8be..1b8854c 100644
--- a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextRuntime.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/ContextRuntime.cs
@@ -34,7 +34,7 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator.Context
         private static readonly Logger LOGGER = Logger.GetLogger(typeof(ContextRuntime));
         // Context-local injector. This contains information that will not be available in child injectors.
         private readonly IInjector _contextInjector;
-        //// Service injector. State in this injector moves to child injectors.
+        // Service injector. State in this injector moves to child injectors.
         private readonly IInjector _serviceInjector;
 
         // Convenience class to hold all the event handlers for the context as well as the service instances.
@@ -444,52 +444,52 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator.Context
         }
     }
 }
-        ///// <summary>
-        ///// TODO: remove and use parameterless GetContextStatus above
-        ///// </summary>
-        ///// <returns>this context's status in protocol buffer form.</returns>
-        //public ContextStatusProto GetContextStatus(string contextId)
-        //{
-        //    ContextStatusProto contextStatusProto = new ContextStatusProto()
-        //    {
-        //        context_id = contextId,
-        //        context_state = _contextState,
-        //    };
-        //    return contextStatusProto;
-        //}
+        ////<summary>
+        ////TODO: remove and use parameterless GetContextStatus above
+        ////</summary>
+        ////<returns>this context's status in protocol buffer form.</returns>
+        ////public ContextStatusProto GetContextStatus(string contextId)
+        ////{
+        ////   ContextStatusProto contextStatusProto = new ContextStatusProto()
+        ////   {
+        ////       context_id = contextId,
+        ////       context_state = _contextState,
+        ////   };
+        ////   return contextStatusProto;
+        ////}
 
-        ////// TODO: remove and use injection
-        //public void StartTask(ITask task, HeartBeatManager heartBeatManager, string taskId, string contextId)
-        //{
-        //    lock (_contextLifeCycle)
-        //    {
-        //        if (_task.IsPresent() && _task.Value.HasEnded())
-        //        {
-        //            // clean up state
-        //            _task = Optional<TaskRuntime>.Empty();
-        //        }
-        //        if (_task.IsPresent())
-        //        {
-        //            throw new InvalidOperationException(
-        //                string.Format(CultureInfo.InvariantCulture, "Attempting to spawn a child context when an Task with id '{0}' is running", _task.Value.TaskId)); // note: java code is putting thread id here
-        //        }
-        //        if (_childContext.IsPresent())
-        //        {
-        //            throw new InvalidOperationException("Attempting to instantiate a child context on a context that is not the topmost active context.");
-        //        }
-        //        try
-        //        {
-        //            // final Injector taskInjector = contextInjector.forkInjector(taskConfiguration);
-        //            TaskRuntime taskRuntime  // taskInjector.getInstance(TaskRuntime.class);
-        //                = new TaskRuntime(task, heartBeatManager);
-        //            LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "Starting task '{0}'", taskId));
-        //            taskRuntime.Initialize(taskId, contextId);
-        //            taskRuntime.Start();
-        //            _task = Optional<TaskRuntime>.Of(taskRuntime);
-        //        }
-        //        catch (Exception e)
-        //        {
-        //            throw new InvalidOperationException("Unable to instantiate the new task");
-        //        }
-        //    }
-        //}
\ No newline at end of file
+        ////TODO: remove and use injection
+        ////public void StartTask(ITask task, HeartBeatManager heartBeatManager, string taskId, string contextId)
+        ////{
+        ////  lock (_contextLifeCycle)
+        ////  {
+        ////      if (_task.IsPresent() && _task.Value.HasEnded())
+        ////      {
+        ////          // clean up state
+        ////          _task = Optional<TaskRuntime>.Empty();
+        ////      }
+        ////      if (_task.IsPresent())
+        ////      {
+        ////          throw new InvalidOperationException(
+        ////              string.Format(CultureInfo.InvariantCulture, "Attempting to spawn a child context when an Task with id '{0}' is running", _task.Value.TaskId)); // note: java code is putting thread id here
+        ////      }
+        ////      if (_childContext.IsPresent())
+        ////      {
+        ////          throw new InvalidOperationException("Attempting to instantiate a child context on a context that is not the topmost active context.");
+        ////      }
+        ////      try
+        ////      {
+        ////          // final Injector taskInjector = contextInjector.forkInjector(taskConfiguration);
+        ////          TaskRuntime taskRuntime  // taskInjector.getInstance(TaskRuntime.class);
+        ////              = new TaskRuntime(task, heartBeatManager);
+        ////          LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "Starting task '{0}'", taskId));
+        ////          taskRuntime.Initialize(taskId, contextId);
+        ////          taskRuntime.Start();
+        ////          _task = Optional<TaskRuntime>.Of(taskRuntime);
+        ////      }
+        ////      catch (Exception e)
+        ////      {
+        ////          throw new InvalidOperationException("Unable to instantiate the new task");
+        ////      }
+        ////   }
+        ////}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/RootContextLauncher.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/RootContextLauncher.cs b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/RootContextLauncher.cs
index 2dd417a..151ce0e 100644
--- a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/RootContextLauncher.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Context/RootContextLauncher.cs
@@ -104,21 +104,21 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator.Context
         }
     }
 }
-//if (rootServiceInjector != null)
-//{
-//    try
-//    {
-//        rootServiceInjector = rootServiceInjector.ForkInjector(serviceConfigs);
-//    }
-//    catch (Exception e)
-//    {
-//        throw new ContextClientCodeException(ContextClientCodeException.GetId(rootContextConfiguration),
-//                                             Optional<String>.Empty(),
-//                                             "Unable to instatiate the root context", e);
-//    }
-//    result = new ContextRuntime(rootServiceInjector, rootContextConfiguration);
-//}
-//else
-//{
-//    result = new ContextRuntime(rootServiceInjector.ForkInjector(), rootContextConfiguration);
-//}
\ No newline at end of file
+////if (rootServiceInjector != null)
+////{
+////   try
+////   {
+////       rootServiceInjector = rootServiceInjector.ForkInjector(serviceConfigs);
+////   }
+////   catch (Exception e)
+////   {
+////       throw new ContextClientCodeException(ContextClientCodeException.GetId(rootContextConfiguration),
+////                                            Optional<String>.Empty(),
+////                                            "Unable to instatiate the root context", e);
+////   }
+////   result = new ContextRuntime(rootServiceInjector, rootContextConfiguration);
+////}
+////else
+////{
+////   result = new ContextRuntime(rootServiceInjector.ForkInjector(), rootContextConfiguration);
+////}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStartImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStartImpl.cs b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStartImpl.cs
index 1c3c734..ea1c4e3 100644
--- a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStartImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStartImpl.cs
@@ -23,7 +23,7 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator.Task
 {
     public class TaskStartImpl : ITaskStart
     {        
-        //INJECT
+        // INJECT
         public TaskStartImpl(string id)
         {
             Id = id;

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStatus.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStatus.cs b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStatus.cs
index 5b1c4dc..844e3ef 100644
--- a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStatus.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStatus.cs
@@ -179,8 +179,8 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator.Task
             }
             else if (_lastException.IsPresent())
             {
-                //final Encoder<Throwable> codec = new ObjectSerializableCodec<>();
-                //final byte[] error = codec.encode(_lastException.get());
+                // final Encoder<Throwable> codec = new ObjectSerializableCodec<>();
+                // final byte[] error = codec.encode(_lastException.get());
                 byte[] error = ByteUtilities.StringToByteArrays(_lastException.Value.ToString());
                 taskStatusProto.result = ByteUtilities.CopyBytesFrom(error);
             }
@@ -307,7 +307,7 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator.Task
                     Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new InvalidOperationException("Unknown state: " + _state), LOGGER);
                     break;
             }
-            return Protobuf.ReefProtocol.State.FAILED; //this line should not be reached as default case will throw exception
+            return Protobuf.ReefProtocol.State.FAILED; // this line should not be reached as default case will throw exception
         }
 
         private ICollection<TaskMessage> GetMessages()

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStopImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStopImpl.cs b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStopImpl.cs
index 8ad8a5b..f459324 100644
--- a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStopImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStopImpl.cs
@@ -23,7 +23,7 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator.Task
 {
     public class TaskStopImpl : ITaskStop
     {
-        //INJECT
+        // INJECT
         public TaskStopImpl(string id)
         {
             Id = id;

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Common/Tasks/IDriverMessageHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Tasks/IDriverMessageHandler.cs b/lang/cs/Org.Apache.REEF.Common/Tasks/IDriverMessageHandler.cs
index 0b8e7e7..6b905b3 100644
--- a/lang/cs/Org.Apache.REEF.Common/Tasks/IDriverMessageHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Tasks/IDriverMessageHandler.cs
@@ -21,7 +21,7 @@ using Org.Apache.REEF.Common.Tasks.Events;
 
 namespace Org.Apache.REEF.Common.Tasks
 {
-    //[DefaultImplementation(typeof(DefaultTaskMessageSource))]
+    // [DefaultImplementation(typeof(DefaultTaskMessageSource))]
     public interface IDriverMessageHandler
     {
         void Handle(IDriverMessage message);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Driver/Bridge/BridgeConfigurationProvider.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Bridge/BridgeConfigurationProvider.cs b/lang/cs/Org.Apache.REEF.Driver/Bridge/BridgeConfigurationProvider.cs
index c1eb9f5..d68d150 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Bridge/BridgeConfigurationProvider.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Bridge/BridgeConfigurationProvider.cs
@@ -77,8 +77,7 @@ namespace Org.Apache.REEF.Driver.Bridge
                 Logger.Log(Level.Warning, "Found configurations in both the legacy location (" +
                                           legacyBridgeConfigurationPath + ") and the new location (" +
                                           newBridgeConfigurationPath +
-                                          "). Loading only the one found in the new location."
-                    );
+                                          "). Loading only the one found in the new location.");
             }
             if (newExists)
             {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrSystemHandlerWrapper.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrSystemHandlerWrapper.cs b/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrSystemHandlerWrapper.cs
index d67d8f4..9e2078f 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrSystemHandlerWrapper.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrSystemHandlerWrapper.cs
@@ -164,20 +164,21 @@ namespace Org.Apache.REEF.Driver.Bridge
             {
                 try
                 {
-                    GCHandle gc = GCHandle.FromIntPtr((IntPtr) handle);
+                    GCHandle gc = GCHandle.FromIntPtr((IntPtr)handle);
                     if (!gc.IsAllocated)
                     {
                         LOGGER.Log(Level.Warning, "gc is not allocated.");
                     } 
-                    ClrSystemHandler<IHttpMessage> obj = (ClrSystemHandler<IHttpMessage>) gc.Target;
+                    ClrSystemHandler<IHttpMessage> obj = (ClrSystemHandler<IHttpMessage>)gc.Target;
                     obj.OnNext(new HttpMessage(clr2Java));
                 }
                 catch (Exception ex)
                 {
                   
-                    LOGGER.Log(Level.Info, "Caught exception: " + ex.Message + ex.StackTrace );
+                    LOGGER.Log(Level.Info, "Caught exception: " + ex.Message + ex.StackTrace);
                     Exceptions.CaughtAndThrow(ex, Level.Warning,  LOGGER);
-                }}
+                }
+            }
         }
 
         public static void Call_ClrSystemClosedContext_OnNext(ulong handle, IClosedContextClr2Java clr2Java)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs b/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs
index 16940d2..7ceb851 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs
@@ -40,7 +40,7 @@ namespace Org.Apache.REEF.Driver.Bridge
         // Level.Verbose (since enum is not suppoted for TANG, we use a string here)
         private const string _verboseLevel = "Verbose";
 
-        [NamedParameter(documentation:"The start point for application logic. Event fired after the Driver is done initializing.")]
+        [NamedParameter(documentation: "The start point for application logic. Event fired after the Driver is done initializing.")]
         public class DriverStartedHandlers : Name<ISet<IObserver<IDriverStarted>>>
         {
         }
@@ -50,7 +50,7 @@ namespace Org.Apache.REEF.Driver.Bridge
         {
         }
 
-        [NamedParameter(documentation: "Called when driver restart is completed.", defaultClasses: new[] { typeof (DefaultDriverRestartCompletedHandler) })]
+        [NamedParameter(documentation: "Called when driver restart is completed.", defaultClasses: new[] { typeof(DefaultDriverRestartCompletedHandler) })]
         public class DriverRestartCompletedHandlers : Name<ISet<IObserver<IDriverRestartCompleted>>>
         {
         }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Driver/Bridge/Events/AllocatedEvaluator.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Bridge/Events/AllocatedEvaluator.cs b/lang/cs/Org.Apache.REEF.Driver/Bridge/Events/AllocatedEvaluator.cs
index d64816e..5968734 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Bridge/Events/AllocatedEvaluator.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Bridge/Events/AllocatedEvaluator.cs
@@ -93,7 +93,7 @@ namespace Org.Apache.REEF.Driver.Bridge.Events
         {
             LOGGER.Log(Level.Info, "AllocatedEvaluator::SubmitContextAndTask");
 
-            //TODO: Change this to service configuration when REEF-289(https://issues.apache.org/jira/browse/REEF-289) is fixed.
+            // TODO: Change this to service configuration when REEF-289(https://issues.apache.org/jira/browse/REEF-289) is fixed.
             taskConfiguration = MergeWithConfigurationProviders(taskConfiguration);
             string context = _serializer.ToString(contextConfiguration);
             string task = _serializer.ToString(taskConfiguration);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Driver/Bridge/Events/FailedEvaluator.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Bridge/Events/FailedEvaluator.cs b/lang/cs/Org.Apache.REEF.Driver/Bridge/Events/FailedEvaluator.cs
index 9915a2f..2f4a7f2 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Bridge/Events/FailedEvaluator.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Bridge/Events/FailedEvaluator.cs
@@ -53,18 +53,18 @@ namespace Org.Apache.REEF.Driver.Bridge.Events
             get { return _id; }
         }
 
-        //TODO[REEF-769]: Implement
+        // TODO[REEF-769]: Implement
         public EvaluatorException EvaluatorException
         {
             get { return null; }
         }
 
-        //TODO[REEF-769]: Implement
+        // TODO[REEF-769]: Implement
         public IList<IFailedContext> FailedContexts
         {
             get { return new List<IFailedContext>(0); }
         }
-        //TODO[REEF-769]: Implement
+        // TODO[REEF-769]: Implement
         public Optional<IFailedTask> FailedTask
         {
             get { return Optional<IFailedTask>.Empty(); }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Driver/Constants.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Constants.cs b/lang/cs/Org.Apache.REEF.Driver/Constants.cs
index 79c3f96..bb0fac8 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Constants.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Constants.cs
@@ -50,7 +50,7 @@ namespace Org.Apache.REEF.Driver
         /// </summary>
         public const int DefaultMemoryGranularity = 1024;
 
-        [Obsolete(message:"Use REEFFileNames instead.")]
+        [Obsolete(message: "Use REEFFileNames instead.")]
         public const string DriverBridgeConfiguration = Common.Constants.ClrBridgeRuntimeConfiguration;
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultTaskFailureHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultTaskFailureHandler.cs b/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultTaskFailureHandler.cs
index e1249cf..a315e23 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultTaskFailureHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultTaskFailureHandler.cs
@@ -36,7 +36,7 @@ namespace Org.Apache.REEF.Driver.Defaults
 
         public void OnNext(IFailedTask value)
         {
-            throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Task {0} has failed, and no handler was bound for IFailedTask", value.Id) );
+            throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Task {0} has failed, and no handler was bound for IFailedTask", value.Id));
         }
 
         public void OnError(Exception error)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Driver/DriverConfigGenerator.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/DriverConfigGenerator.cs b/lang/cs/Org.Apache.REEF.Driver/DriverConfigGenerator.cs
index 89bb34f..c9ade09 100644
--- a/lang/cs/Org.Apache.REEF.Driver/DriverConfigGenerator.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/DriverConfigGenerator.cs
@@ -107,7 +107,7 @@ namespace Org.Apache.REEF.Driver
             b.Bind("org.apache.reef.driver.parameters.DriverMemory", driverConfigurationSettings.DriverMemory.ToString(CultureInfo.CurrentCulture));
             b.Bind("org.apache.reef.driver.parameters.DriverJobSubmissionDirectory", driverConfigurationSettings.SubmissionDirectory);
 
-            //add for all the globallibaries
+            // add for all the globallibaries
             if (File.Exists(UserSuppliedGlobalLibraries))
             {
                 var globalLibString = File.ReadAllText(UserSuppliedGlobalLibraries);
@@ -131,7 +131,7 @@ namespace Org.Apache.REEF.Driver
 
             Log.Log(Level.Info, string.Format(CultureInfo.CurrentCulture, "driver.config is written to: {0} {1}.", Directory.GetCurrentDirectory(), DriverConfigFile));
 
-            //additional file for easy to read
+            // additional file for easy to read
             using (StreamWriter outfile = new StreamWriter(DriverConfigFile + ".txt"))
             {
                 outfile.Write(serializer.ToString(c));

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Driver/Evaluator/EvaluatorDescriptorImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Evaluator/EvaluatorDescriptorImpl.cs b/lang/cs/Org.Apache.REEF.Driver/Evaluator/EvaluatorDescriptorImpl.cs
index 319ba08..0ddee20 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Evaluator/EvaluatorDescriptorImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Evaluator/EvaluatorDescriptorImpl.cs
@@ -104,7 +104,7 @@ namespace Org.Apache.REEF.Driver.Evaluator
 
             var ipEndPoint = new IPEndPoint(IPAddress.Parse(ipAddress), portNumber);
 
-            _nodeDescriptor = new NodeDescriptorImpl {InetSocketAddress = ipEndPoint, HostName = hostName};
+            _nodeDescriptor = new NodeDescriptorImpl { InetSocketAddress = ipEndPoint, HostName = hostName };
             _evaluatorType = EvaluatorType.CLR;
             _megaBytes = memoryInMegaBytes;
             _core = vCore;
@@ -158,8 +158,8 @@ namespace Org.Apache.REEF.Driver.Evaluator
             var granularity = ClrHandlerHelper.MemoryGranularity == 0
                 ? Constants.DefaultMemoryGranularity
                 : ClrHandlerHelper.MemoryGranularity;
-            var m1 = (Memory - 1)/granularity;
-            var m2 = (other.Memory - 1)/granularity;
+            var m1 = (Memory - 1) / granularity;
+            var m2 = (other.Memory - 1) / granularity;
             return (m1 == m2);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Driver/Evaluator/EvaluatorRequestBuilder.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Evaluator/EvaluatorRequestBuilder.cs b/lang/cs/Org.Apache.REEF.Driver/Evaluator/EvaluatorRequestBuilder.cs
index 897adb1..0f4c97c 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Evaluator/EvaluatorRequestBuilder.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Evaluator/EvaluatorRequestBuilder.cs
@@ -111,7 +111,7 @@ namespace Org.Apache.REEF.Driver.Evaluator
         public IEvaluatorRequest Build()
         {
 #pragma warning disable 618
-            return new EvaluatorRequest(Number, MegaBytes, VirtualCore, rack:_rackName, evaluatorBatchId:_evaluatorBatchId);
+            return new EvaluatorRequest(Number, MegaBytes, VirtualCore, rack: _rackName, evaluatorBatchId: _evaluatorBatchId);
 #pragma warning restore 618
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj b/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj
index 0c0a47e..ef4bca8 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj
+++ b/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj
@@ -177,6 +177,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
@@ -184,4 +185,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorTests.cs b/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorTests.cs
index a6c55fb..9a8afcc 100644
--- a/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorTests.cs
+++ b/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorTests.cs
@@ -39,7 +39,7 @@ namespace Org.Apache.REEF.Evaluator.Tests
         [Description("Parse Evaluator configuration from Java, inject and execute Shell task with DIR command based on the configuration")]
         public void CanInjectAndExecuteTask()
         {
-            //To enforce that shell task dll be copied to output directory.
+            // to enforce that shell task dll be copied to output directory.
             ShellTask tmpTask = new ShellTask("invalid");
             Assert.IsNotNull(tmpTask);
 
@@ -77,7 +77,7 @@ namespace Org.Apache.REEF.Evaluator.Tests
             byte[] bytes = task.Call(null);
             string result = System.Text.Encoding.Default.GetString(bytes);
 
-            //a dir command is executed in the container directory, which includes the file "evaluator.conf"
+            // a dir command is executed in the container directory, which includes the file "evaluator.conf"
             Assert.IsTrue(result.Contains("evaluator.conf"));
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Evaluator.Tests/Org.Apache.REEF.Evaluator.Tests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Evaluator.Tests/Org.Apache.REEF.Evaluator.Tests.csproj b/lang/cs/Org.Apache.REEF.Evaluator.Tests/Org.Apache.REEF.Evaluator.Tests.csproj
index 118d26a..ee5cc85 100644
--- a/lang/cs/Org.Apache.REEF.Evaluator.Tests/Org.Apache.REEF.Evaluator.Tests.csproj
+++ b/lang/cs/Org.Apache.REEF.Evaluator.Tests/Org.Apache.REEF.Evaluator.Tests.csproj
@@ -110,6 +110,7 @@ under the License.
   <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -118,4 +119,4 @@ under the License.
     <Error Condition="!Exists('$(PackagesDir)\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesDir)\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props'))" />
     <Error Condition="!Exists('$(PackagesDir)\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesDir)\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props'))" />
   </Target>
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs b/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs
index 721d85d..0ffce12 100644
--- a/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs
+++ b/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs
@@ -326,7 +326,7 @@ namespace Org.Apache.REEF.Evaluator
         // we only need runtimestart and runtimestop handlers now
         private static void SetRuntimeHandlers(EvaluatorRuntime evaluatorRuntime, RuntimeClock clock)
         {
-            ISet<IObserver<RuntimeStart>> runtimeStarts = new HashSet<IObserver<RuntimeStart>> {evaluatorRuntime};
+            ISet<IObserver<RuntimeStart>> runtimeStarts = new HashSet<IObserver<RuntimeStart>> { evaluatorRuntime };
             InjectionFutureImpl<ISet<IObserver<RuntimeStart>>> injectRuntimeStart = new InjectionFutureImpl<ISet<IObserver<RuntimeStart>>>(runtimeStarts);
             clock.InjectedRuntimeStartHandler = injectRuntimeStart;
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.csproj b/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.csproj
index 672b612..6cfdc20 100644
--- a/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.csproj
+++ b/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.csproj
@@ -89,6 +89,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
@@ -96,4 +97,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloHttpHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloHttpHandler.cs b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloHttpHandler.cs
index afb5101..5f4992f 100644
--- a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloHttpHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloHttpHandler.cs
@@ -40,7 +40,7 @@ namespace Org.Apache.REEF.Examples.AllHandlers
 
         public string GetSpecification()
         {
-            return "NRT"; //Client Example 
+            return "NRT"; // Client Example 
         }
 
         /// <summary>
@@ -50,7 +50,10 @@ namespace Org.Apache.REEF.Examples.AllHandlers
         /// <param name="response"></param>
         public void OnHttpRequest(ReefHttpRequest request, ReefHttpResponse response)  
         {
-            Logger.Log(Level.Info, string.Format(CultureInfo.CurrentCulture, "HelloHttpHandler OnHttpRequest: URL: {0}, QueryString: {1}, inputStream: {2}.", request.Url, request.Querystring, ByteUtilities.ByteArraysToString(request.InputStream)));response.Status = HttpStatusCode.OK;
+            Logger.Log(Level.Info, string.Format(CultureInfo.CurrentCulture, 
+                "HelloHttpHandler OnHttpRequest: URL: {0}, QueryString: {1}, inputStream: {2}.", 
+                request.Url, request.Querystring, ByteUtilities.ByteArraysToString(request.InputStream)));
+            response.Status = HttpStatusCode.OK;
             response.OutputStream =
                 ByteUtilities.StringToByteArrays("Byte array returned from HelloHttpHandler in CLR!!!");
         }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloTraceListener.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloTraceListener.cs b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloTraceListener.cs
index bd97549..e198dab 100644
--- a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloTraceListener.cs
+++ b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloTraceListener.cs
@@ -37,7 +37,7 @@ namespace Org.Apache.REEF.Examples.AllHandlers
 
         public override void Write(string message)
         {
-            _listener.Write("[helloTrace]" + message );
+            _listener.Write("[helloTrace]" + message);
         }
 
         public override void WriteLine(string message)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Examples.AllHandlers/Org.Apache.REEF.Examples.AllHandlers.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/Org.Apache.REEF.Examples.AllHandlers.csproj b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/Org.Apache.REEF.Examples.AllHandlers.csproj
index 541ac19..9503a7a 100644
--- a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/Org.Apache.REEF.Examples.AllHandlers.csproj
+++ b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/Org.Apache.REEF.Examples.AllHandlers.csproj
@@ -122,6 +122,7 @@ under the License.
   </PropertyGroup>
   <Target Name="AfterBuild" DependsOnTargets="$(AfterBuildDependsOn);" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -129,4 +130,4 @@ under the License.
     <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
   </Target>
   <!--end jar reference-->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Examples.DriverRestart/Org.Apache.REEF.Examples.DriverRestart.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples.DriverRestart/Org.Apache.REEF.Examples.DriverRestart.csproj b/lang/cs/Org.Apache.REEF.Examples.DriverRestart/Org.Apache.REEF.Examples.DriverRestart.csproj
index 3200eb9..4425c49 100644
--- a/lang/cs/Org.Apache.REEF.Examples.DriverRestart/Org.Apache.REEF.Examples.DriverRestart.csproj
+++ b/lang/cs/Org.Apache.REEF.Examples.DriverRestart/Org.Apache.REEF.Examples.DriverRestart.csproj
@@ -74,10 +74,11 @@
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
     </PropertyGroup>
     <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
   </Target>
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Examples.HelloREEF/Org.Apache.REEF.Examples.HelloREEF.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples.HelloREEF/Org.Apache.REEF.Examples.HelloREEF.csproj b/lang/cs/Org.Apache.REEF.Examples.HelloREEF/Org.Apache.REEF.Examples.HelloREEF.csproj
index aee23e2..825170f 100644
--- a/lang/cs/Org.Apache.REEF.Examples.HelloREEF/Org.Apache.REEF.Examples.HelloREEF.csproj
+++ b/lang/cs/Org.Apache.REEF.Examples.HelloREEF/Org.Apache.REEF.Examples.HelloREEF.csproj
@@ -69,10 +69,11 @@
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
     </PropertyGroup>
     <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
   </Target>
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Examples/Org.Apache.REEF.Examples.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples/Org.Apache.REEF.Examples.csproj b/lang/cs/Org.Apache.REEF.Examples/Org.Apache.REEF.Examples.csproj
index 32d8fe3..17d36e3 100644
--- a/lang/cs/Org.Apache.REEF.Examples/Org.Apache.REEF.Examples.csproj
+++ b/lang/cs/Org.Apache.REEF.Examples/Org.Apache.REEF.Examples.csproj
@@ -100,6 +100,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
@@ -107,4 +108,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask1.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask1.cs b/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask1.cs
index a594f24..ae25d21 100644
--- a/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask1.cs
+++ b/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask1.cs
@@ -55,8 +55,8 @@ namespace Org.Apache.REEF.Examples.Tasks.StreamingTasks
 
         public void SIFirstNode()
         {
-            //var a = new SIFirstNodeXAM();
-            //a.Process(1111, 2222, ipAddress);
+            // var a = new SIFirstNodeXAM();
+            // a.Process(1111, 2222, ipAddress);
         }
 
         [NamedParameter("Ip Address", "IP", "10.121.32.158")]

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask2.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask2.cs b/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask2.cs
index db043d4..1284948 100644
--- a/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask2.cs
+++ b/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask2.cs
@@ -44,8 +44,8 @@ namespace Org.Apache.REEF.Examples.Tasks.StreamingTasks
 
         public void SISecondNode()
         {
-            //var a = new SISecondNodeXAM();
-            //a.Process(2222, 1111);
+            // var a = new SISecondNodeXAM();
+            // a.Process(2222, 1111);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU.Examples/Org.Apache.REEF.IMRU.Examples.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU.Examples/Org.Apache.REEF.IMRU.Examples.csproj b/lang/cs/Org.Apache.REEF.IMRU.Examples/Org.Apache.REEF.IMRU.Examples.csproj
index 54fea9f..b4762b3 100644
--- a/lang/cs/Org.Apache.REEF.IMRU.Examples/Org.Apache.REEF.IMRU.Examples.csproj
+++ b/lang/cs/Org.Apache.REEF.IMRU.Examples/Org.Apache.REEF.IMRU.Examples.csproj
@@ -104,10 +104,11 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
     </PropertyGroup>
     <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
   </Target>
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/BroadcastReceiverReduceSenderMapFunction.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/BroadcastReceiverReduceSenderMapFunction.cs b/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/BroadcastReceiverReduceSenderMapFunction.cs
index 30b67b5..5d2c4d5 100644
--- a/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/BroadcastReceiverReduceSenderMapFunction.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/BroadcastReceiverReduceSenderMapFunction.cs
@@ -30,7 +30,7 @@ namespace Org.Apache.REEF.IMRU.Examples.PipelinedBroadcastReduce
     /// </summary>
     internal sealed class BroadcastReceiverReduceSenderMapFunction : IMapFunction<int[], int[]>
     {
-        private static readonly Logger Logger = Logger.GetLogger(typeof (BroadcastReceiverReduceSenderMapFunction));
+        private static readonly Logger Logger = Logger.GetLogger(typeof(BroadcastReceiverReduceSenderMapFunction));
 
         private int _iterations;
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/BroadcastSenderReduceReceiverUpdateFunction.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/BroadcastSenderReduceReceiverUpdateFunction.cs b/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/BroadcastSenderReduceReceiverUpdateFunction.cs
index 868a914..3efccd8 100644
--- a/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/BroadcastSenderReduceReceiverUpdateFunction.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/BroadcastSenderReduceReceiverUpdateFunction.cs
@@ -30,7 +30,7 @@ namespace Org.Apache.REEF.IMRU.Examples.PipelinedBroadcastReduce
     /// </summary>
     internal sealed class BroadcastSenderReduceReceiverUpdateFunction : IUpdateFunction<int[], int[], int[]>
     {
-        private static readonly Logger Logger = Logger.GetLogger(typeof (BroadcastSenderReduceReceiverUpdateFunction));
+        private static readonly Logger Logger = Logger.GetLogger(typeof(BroadcastSenderReduceReceiverUpdateFunction));
 
         private int _iterations;
         private readonly int _maxIters;
@@ -40,10 +40,9 @@ namespace Org.Apache.REEF.IMRU.Examples.PipelinedBroadcastReduce
 
         [Inject]
         private BroadcastSenderReduceReceiverUpdateFunction(
-            [Parameter(typeof (BroadcastReduceConfiguration.NumberOfIterations))] int maxIters,
-            [Parameter(typeof (BroadcastReduceConfiguration.Dimensions))] int dim,
-            [Parameter(typeof (BroadcastReduceConfiguration.NumWorkers))] int numWorkers
-            )
+            [Parameter(typeof(BroadcastReduceConfiguration.NumberOfIterations))] int maxIters,
+            [Parameter(typeof(BroadcastReduceConfiguration.Dimensions))] int dim,
+            [Parameter(typeof(BroadcastReduceConfiguration.NumWorkers))] int numWorkers)
         {
             _maxIters = maxIters;
             _iterations = 0;
@@ -61,7 +60,7 @@ namespace Org.Apache.REEF.IMRU.Examples.PipelinedBroadcastReduce
         {
             Logger.Log(Level.Info, string.Format("Received value {0}", input[0]));
 
-            if (input[0] != (_iterations + 1)*_workers)
+            if (input[0] != (_iterations + 1) * _workers)
             {
                 Exceptions.Throw(new Exception("Expected input to update functon not same as actual input"), Logger);
             }


[3/6] incubator-reef git commit: [REEF-979] Enable StyleCop.CSharp.SpacingRules and fix violations

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMultipleConstructors.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMultipleConstructors.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMultipleConstructors.cs
index 4b32d0a..3f1b093 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMultipleConstructors.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestMultipleConstructors.cs
@@ -37,26 +37,25 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
         [TestMethod]
         public void TestMissingAllParameters()
         {
-            //Multiple infeasible plans: Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //, Org.Apache.REEF.Tang.Test
-            //, Version=1.0.0.0
-            //, Culture=neutral
-            //, PublicKeyToken=null:
-
-            //  [ Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest = new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //    ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool = 
-            //    , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 
-            //    ) 
-            //    | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //    ( System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString = 
-            //    , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 
-            //    ) 
-            //    | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //    ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool = 
-            //    , System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString = 
-            //    , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 
-            //    )
-            //  ]
+            // Multiple infeasible plans: Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            // , Org.Apache.REEF.Tang.Test
+            // , Version=1.0.0.0
+            // , Culture=neutral
+            // , PublicKeyToken=null:
+            // [ Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest = new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            //   ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool = 
+            //   , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 
+            //   ) 
+            //   | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            //   ( System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString = 
+            //   , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 
+            //   ) 
+            //   | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            //   ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool = 
+            //   , System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString = 
+            //   , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 
+            //   )
+            // ]
             MultiConstructorTest obj = null;
             try
             {
@@ -73,25 +72,25 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
         [TestMethod]
         public void TestMissingIntParameter()
         {
-            //Multiple infeasible plans: Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //, Org.Apache.REEF.Tang.Test
-            //, Version=1.0.0.0
-            //, Culture=neutral
-            //, PublicKeyToken=null:
-            //  [ Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest = new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //    ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool = False
-            //    , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 
-            //    ) 
-            //    | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //    ( System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString = foo
-            //    , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 
-            //    ) 
-            //    | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //    ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool = False
-            //    , System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString = foo
-            //    , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 
-            //    )
-            //  ]
+            // Multiple infeasible plans: Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            // , Org.Apache.REEF.Tang.Test
+            // , Version=1.0.0.0
+            // , Culture=neutral
+            // , PublicKeyToken=null:
+            // [ Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest = new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            //   ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool = False
+            //   , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt =
+            //   )
+            //   | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            //   ( System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString = foo
+            //   , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt =
+            //   )
+            //   | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            //   ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool = False
+            //   , System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString = foo
+            //   , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt =
+            //   )
+            // ]
             MultiConstructorTest obj = null;
             try
             {
@@ -110,25 +109,25 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
         [TestMethod]
         public void TestOnlyBoolParameter()
         {
-            //Multiple infeasible plans: Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //, Org.Apache.REEF.Tang.Test
-            //, Version=1.0.0.0
-            //, Culture=neutral
-            //, PublicKeyToken=null:
-            //  [ Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest = new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //    ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool = False
-            //    , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 
-            //    ) 
-            //    | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //    ( System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString = 
-            //    , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 
-            //    ) 
-            //    | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //    ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool = False
-            //    , System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString = 
-            //    , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 
-            //    )
-            //  ]
+            // Multiple infeasible plans: Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            // , Org.Apache.REEF.Tang.Test
+            // , Version=1.0.0.0
+            // , Culture=neutral
+            // , PublicKeyToken=null:
+            // [ Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest = new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            //   ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool = False
+            //   , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt =
+            //   )
+            //   | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            //   ( System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString =
+            //   , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt =
+            //   )
+            //   | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            //   ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool = False
+            //   , System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString =
+            //   , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt =
+            //   )
+            // ]
             MultiConstructorTest obj = null;
             try
             {
@@ -146,25 +145,25 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
         [TestMethod]
         public void TestOnlyIntParameter()
         {
-            //Multiple infeasible plans: Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //, Org.Apache.REEF.Tang.Test
-            //, Version=1.0.0.0
-            //, Culture=neutral
-            //, PublicKeyToken=null:
+            // Multiple infeasible plans: Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            // , Org.Apache.REEF.Tang.Test
+            // , Version=1.0.0.0
+            // , Culture=neutral
+            // , PublicKeyToken=null:
             //  [ Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest = new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //    ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool = 
-            //    , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 8
-            //    ) 
-            //    | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //    ( System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString = 
-            //    , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 8
-            //    ) 
-            //    | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
-            //    ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool = 
-            //    , System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString = 
-            //    , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 8
-            //    )
-            //  ]
+            //   ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool =
+            //   , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 8
+            //   )
+            //   | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            //   ( System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString =
+            //   , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 8
+            //   )
+            //   | new Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest
+            //   ( System.Boolean Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedBool =
+            //   , System.String Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedString =
+            //   , System.Int32 Org.Apache.REEF.Tang.Tests.Injection.MultiConstructorTest+NamedInt = 8
+            //   )
+            // ]
             MultiConstructorTest obj = null;
             try
             {
@@ -238,7 +237,7 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
 
             ICsConfigurationBuilder cb2 = TangFactory.GetTang().NewConfigurationBuilder();
             cb2.BindImplementation(typeof(IH), typeof(M));
-            cb2.BindImplementation(typeof(M), typeof(L)); //construcotr of L is explicitly bound
+            cb2.BindImplementation(typeof(M), typeof(L)); // constructor of L is explicitly bound
             IInjector i2 = TangFactory.GetTang().NewInjector(cb2.Build());
             var o2 = i2.GetInstance<IH>();
             Assert.IsTrue(o2 is L);
@@ -256,7 +255,7 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
             Assert.IsNotNull(o);
 
             ICsConfigurationBuilder cb2 = TangFactory.GetTang().NewConfigurationBuilder();
-            cb2.BindImplementation(typeof(IH), typeof(M1));  //M1 doesn't have injectable default constructor, no implementation L1 is bound to M1
+            cb2.BindImplementation(typeof(IH), typeof(M1));  // M1 doesn't have injectable default constructor, no implementation L1 is bound to M1
             IInjector i2 = TangFactory.GetTang().NewInjector(cb2.Build());
             string msg = null;
             try
@@ -266,8 +265,8 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
             }
             catch (Exception e)
             {
-                //Cannot inject Org.Apache.REEF.Tang.Tests.Injection.IH, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 
-                //No known implementations / injectable constructors for Org.Apache.REEF.Tang.Tests.Injection.M1, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+                // Cannot inject Org.Apache.REEF.Tang.Tests.Injection.IH, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 
+                // No known implementations / injectable constructors for Org.Apache.REEF.Tang.Tests.Injection.M1, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
                 msg = e.Message;
             }
             Assert.IsNotNull(msg);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestSetInjection.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestSetInjection.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestSetInjection.cs
index 7101bf9..633e20f 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestSetInjection.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestSetInjection.cs
@@ -172,8 +172,8 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
         public void TestSetOfClassBound()
         {
             ICsConfigurationBuilder cb = TangFactory.GetTang().NewConfigurationBuilder();
-            cb.BindSetEntry<SetOfClasses, Integer1, INumber>(GenericType<SetOfClasses>.Class, GenericType<Integer1>.Class)  //bind an impl to the interface of the set
-              .BindNamedParameter<Integer1.NamedInt, int>(GenericType<Integer1.NamedInt>.Class, "4"); //bind parameter for the impl
+            cb.BindSetEntry<SetOfClasses, Integer1, INumber>(GenericType<SetOfClasses>.Class, GenericType<Integer1>.Class)  // bind an impl to the interface of the set
+              .BindNamedParameter<Integer1.NamedInt, int>(GenericType<Integer1.NamedInt>.Class, "4"); // bind parameter for the impl
 
             IInjector i = TangFactory.GetTang().NewInjector(cb.Build());
 
@@ -214,7 +214,7 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
         {
             ICsConfigurationBuilder cb = TangFactory.GetTang().NewConfigurationBuilder();
 
-            //when adding another Timeshift into the set for named parameter SetOfTimeshifts, it ends up the same entry. 
+            // when adding another Timeshift into the set for named parameter SetOfTimeshifts, it ends up the same entry. 
             cb.BindSetEntry<SetOfTimeshifts, Timeshift, ITimeshift>(GenericType<SetOfTimeshifts>.Class, GenericType<Timeshift>.Class);
             cb.BindSetEntry<SetOfTimeshifts, Timeshift, ITimeshift>(GenericType<SetOfTimeshifts>.Class, GenericType<Timeshift>.Class);
             cb.BindNamedParameter<Timeshift.TimeshiftLinkId, string>(GenericType<Timeshift.TimeshiftLinkId>.Class, "123")
@@ -231,7 +231,7 @@ namespace Org.Apache.REEF.Tang.Tests.Injection
         {
             ICsConfigurationBuilder cb = TangFactory.GetTang().NewConfigurationBuilder();
 
-            //Adding implementations from different subclasses
+            // Adding implementations from different subclasses
             cb.BindSetEntry<SetOfTimeshifts, Timeshift, ITimeshift>(GenericType<SetOfTimeshifts>.Class, GenericType<Timeshift>.Class);
             cb.BindSetEntry<SetOfTimeshifts, Timeshift1, ITimeshift>(GenericType<SetOfTimeshifts>.Class, GenericType<Timeshift1>.Class);
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Org.Apache.REEF.Tang.Tests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Org.Apache.REEF.Tang.Tests.csproj b/lang/cs/Org.Apache.REEF.Tang.Tests/Org.Apache.REEF.Tang.Tests.csproj
index d9ad057..25135d4 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Org.Apache.REEF.Tang.Tests.csproj
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Org.Apache.REEF.Tang.Tests.csproj
@@ -168,6 +168,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -182,4 +183,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/JettyHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/JettyHandler.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/JettyHandler.cs
index d70f289..ca663c6 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/JettyHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/JettyHandler.cs
@@ -27,7 +27,7 @@ namespace Org.Apache.REEF.Tang.Tests.ScenarioTest
     {
     }
 
-    public class JettyHandler //: AbstractHandler
+    public class JettyHandler // : AbstractHandler
     {
         [Inject]
         public JettyHandler([Parameter(typeof(HttpEventHandlers))] ISet<IHttpHandler> httpEventHandlers)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestHttpService.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestHttpService.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestHttpService.cs
index 94a78c7..9674b77 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestHttpService.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestHttpService.cs
@@ -148,7 +148,7 @@ namespace Org.Apache.REEF.Tang.Tests.ScenarioTest
 
         public void OnHttpRequest(HttpRequest request, Httpresponse response)
         {
-            //handle the event
+            // handle the event
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/RootImplementation.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/RootImplementation.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/RootImplementation.cs
index 5153eb2..90cf89b 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/RootImplementation.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/RootImplementation.cs
@@ -31,7 +31,7 @@ namespace Org.Apache.REEF.Tang.Tests.SmokeTest
         private readonly InjectableClass injectableClass;
         private readonly SetOfImplementations setOfImplementations;
         private readonly SetOfBaseTypes setOfBaseTypes;
-        //private readonly ListOfBaseTypes listOfBaseTypes;  //TODO: to recover once Avro NuGet support it
+        // private readonly ListOfBaseTypes listOfBaseTypes;  // TODO: to recover once Avro NuGet support it
         private readonly CyclicDependency cyclicDependency;
 
         [Inject]
@@ -43,7 +43,7 @@ namespace Org.Apache.REEF.Tang.Tests.SmokeTest
                                   InjectableClass injectableClass,
                                   SetOfImplementations setOfImplementations,
                                   SetOfBaseTypes setOfBaseTypes,
-                                  //ListOfBaseTypes listOfBaseTypes, //TODO: to recover once Avro NuGet support it
+                                  // ListOfBaseTypes listOfBaseTypes, // TODO: to recover once Avro NuGet support it
                                   CyclicDependency cyclicDependency) 
         {
                                 this.requiredString = requiredString;
@@ -54,7 +54,7 @@ namespace Org.Apache.REEF.Tang.Tests.SmokeTest
                                 this.injectableClass = injectableClass;
                                 this.setOfImplementations = setOfImplementations;
                                 this.setOfBaseTypes = setOfBaseTypes;
-                                //this.listOfBaseTypes = listOfBaseTypes;  //TODO: to recover once Avro NuGet support it
+                                // this.listOfBaseTypes = listOfBaseTypes;  // TODO: to recover once Avro NuGet support it
                                 this.cyclicDependency = cyclicDependency;
         }
 
@@ -149,11 +149,11 @@ namespace Org.Apache.REEF.Tang.Tests.SmokeTest
                 return false;
             }
 
-            //TODO: to recover once Avro NuGet support it
-            //if (listOfBaseTypes != null ? !listOfBaseTypes.Equals(that.listOfBaseTypes) : that.listOfBaseTypes != null)
-            //{
-            //    return false;
-            //}
+            ////TODO: to recover once Avro NuGet support it
+            ////if (listOfBaseTypes != null ? !listOfBaseTypes.Equals(that.listOfBaseTypes) : that.listOfBaseTypes != null)
+            ////{
+            ////   return false;
+            ////}
             if (cyclicDependency != null
                     ? !cyclicDependency.Equals(that.cyclicDependency)
                     : that.cyclicDependency != null)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestLegacyConstructors.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestLegacyConstructors.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestLegacyConstructors.cs
index e7ddcd7..bbadb8a 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestLegacyConstructors.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestLegacyConstructors.cs
@@ -45,7 +45,7 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
             constructorArg.Add(ReflectionUtilities.GetAssemblyQualifiedName(typeof(int)));
             constructorArg.Add(ReflectionUtilities.GetAssemblyQualifiedName(typeof(string)));
             cb.RegisterLegacyConstructor(ReflectionUtilities.GetAssemblyQualifiedName(typeof(LegacyConstructor)), constructorArg);
-            //cb.Bind(typeof(LegacyConstructor), typeof(LegacyConstructor));
+            // cb.Bind(typeof(LegacyConstructor), typeof(LegacyConstructor));
             cb.BindImplementation(GenericType<LegacyConstructor>.Class, GenericType<LegacyConstructor>.Class);
 
             IInjector i = tang.NewInjector(cb.Build());

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestTang.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestTang.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestTang.cs
index 202b911..c0b7a39 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestTang.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestTang.cs
@@ -66,18 +66,18 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
         public void TestSingleton()
         {
             IInjector injector = tang.NewInjector();
-            Assert.IsNotNull(injector.GetInstance(typeof (TwoSingletons)));
-            Assert.IsNotNull(injector.GetInstance(typeof (TwoSingletons)));
+            Assert.IsNotNull(injector.GetInstance(typeof(TwoSingletons)));
+            Assert.IsNotNull(injector.GetInstance(typeof(TwoSingletons)));
         }
 
         [TestMethod]
         public void TestNotSingleton()
         {
             TwoSingletons obj = null;
-            Assert.IsNotNull(tang.NewInjector().GetInstance(typeof (TwoSingletons)));
+            Assert.IsNotNull(tang.NewInjector().GetInstance(typeof(TwoSingletons)));
             try
             {
-                obj = (TwoSingletons) tang.NewInjector().GetInstance(typeof (TwoSingletons));
+                obj = (TwoSingletons)tang.NewInjector().GetInstance(typeof(TwoSingletons));
             }
             catch (InjectionException)
             {
@@ -95,7 +95,7 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
                 ICsConfigurationBuilder t = tang.NewConfigurationBuilder();
                 node =
                     t.GetClassHierarchy()
-                     .GetNode(ReflectionUtilities.GetAssemblyQualifiedName(typeof (RepeatedAmbiguousArgs)));
+                     .GetNode(ReflectionUtilities.GetAssemblyQualifiedName(typeof(RepeatedAmbiguousArgs)));
             }
             catch (ClassHierarchyException)
             {
@@ -111,7 +111,7 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
             cb.BindNamedParameter<RepeatedNamedArgs.B, Int32>(GenericType<RepeatedNamedArgs.B>.Class, "2");
 
             IInjector injector = tang.NewInjector(cb.Build());
-            injector.GetInstance(typeof (RepeatedNamedArgs));
+            injector.GetInstance(typeof(RepeatedNamedArgs));
         }
 
         // NamedParameter A has no default_value, so this should throw.
@@ -147,10 +147,10 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
         {
             IInjector i = tang.NewInjector();
             i.BindVolatileParameter(GenericType<RepeatedNamedSingletonArgs.A>.Class,
-                                    (MustBeSingleton) i.GetInstance(typeof (MustBeSingleton)));
+                                    (MustBeSingleton)i.GetInstance(typeof(MustBeSingleton)));
             i.BindVolatileParameter(GenericType<RepeatedNamedSingletonArgs.B>.Class,
-                                    (MustBeSingleton) i.GetInstance(typeof (MustBeSingleton)));
-            i.GetInstance(typeof (RepeatedNamedSingletonArgs));
+                                    (MustBeSingleton)i.GetInstance(typeof(MustBeSingleton)));
+            i.GetInstance(typeof(RepeatedNamedSingletonArgs));
         }
 
         [TestMethod]
@@ -158,7 +158,7 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
         {
             ICsConfigurationBuilder cb = tang.NewConfigurationBuilder();
             cb.BindImplementation(GenericType<Interf>.Class, GenericType<Impl>.Class);
-            tang.NewInjector(cb.Build()).GetInstance(typeof (Interf));
+            tang.NewInjector(cb.Build()).GetInstance(typeof(Interf));
         }
 
         [TestMethod]
@@ -166,11 +166,11 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
         {
             ICsConfigurationBuilder cb = tang.NewConfigurationBuilder();
             OneNamedStringArg a =
-                (OneNamedStringArg) tang.NewInjector(cb.Build()).GetInstance(typeof (OneNamedStringArg));
+                (OneNamedStringArg)tang.NewInjector(cb.Build()).GetInstance(typeof(OneNamedStringArg));
             Assert.AreEqual("default", a.s);
             cb.BindNamedParameter<OneNamedStringArg.A, string>(GenericType<OneNamedStringArg.A>.Class, "not default");
             IInjector i = tang.NewInjector(cb.Build());
-            Assert.AreEqual("not default", ((OneNamedStringArg) i.GetInstance(typeof (OneNamedStringArg))).s);
+            Assert.AreEqual("not default", ((OneNamedStringArg)i.GetInstance(typeof(OneNamedStringArg))).s);
             string msg = null;
             try
             {
@@ -278,10 +278,10 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
             cb.BindNamedParameter<BImplName, Bimpl, INamedImplA>(GenericType<BImplName>.Class, GenericType<Bimpl>.Class);
 
             IInjector i = TangFactory.GetTang().NewInjector(cb.Build());
-            Aimpl a1 = (Aimpl) i.GetNamedInstance<AImplName, INamedImplA>(GenericType<AImplName>.Class);
-            Aimpl a2 = (Aimpl) i.GetNamedInstance<AImplName, INamedImplA>(GenericType<AImplName>.Class);
-            Bimpl b1 = (Bimpl) i.GetNamedInstance<BImplName, INamedImplA>(GenericType<BImplName>.Class);
-            Bimpl b2 = (Bimpl) i.GetNamedInstance<BImplName, INamedImplA>(GenericType<BImplName>.Class);
+            Aimpl a1 = (Aimpl)i.GetNamedInstance<AImplName, INamedImplA>(GenericType<AImplName>.Class);
+            Aimpl a2 = (Aimpl)i.GetNamedInstance<AImplName, INamedImplA>(GenericType<AImplName>.Class);
+            Bimpl b1 = (Bimpl)i.GetNamedInstance<BImplName, INamedImplA>(GenericType<BImplName>.Class);
+            Bimpl b2 = (Bimpl)i.GetNamedInstance<BImplName, INamedImplA>(GenericType<BImplName>.Class);
             Assert.AreSame(a1, a2);
             Assert.AreSame(b1, b2);
         }
@@ -352,7 +352,7 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
                 cb.BindNamedParameter<TwoConstructors.TCInt, Int32>(GenericType<TwoConstructors.TCInt>.Class, "1");
                 cb.BindNamedParameter<ThreeConstructors.TCString, string>(GenericType<ThreeConstructors.TCString>.Class, "s");
                 tang.NewInjector(cb.Build()).GetInstance<TwoConstructors>();
-                msg = @"Cannot inject Org.Apache.REEF.Tang.Tests.Tang.TwoConstructors, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null "+
+                msg = @"Cannot inject Org.Apache.REEF.Tang.Tests.Tang.TwoConstructors, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null " +
                 "Ambiguous subplan Org.Apache.REEF.Tang.Tests.Tang.TwoConstructors, Org.Apache.REEF.Tang.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" +
                 "new Org.Apache.REEF.Tang.Tests.Tang.TwoConstructors(System.Int32 Org.Apache.REEF.Tang.Tests.Tang.TwoConstructors+TCInt = 1, System.String Org.Apache.REEF.Tang.Tests.Tang.TwoConstructors+TCString = s)" +
                 "new Org.Apache.REEF.Tang.Tests.Tang.TwoConstructors(System.String Org.Apache.REEF.Tang.Tests.Tang.TwoConstructors+TCString = s, System.Int32 Org.Apache.REEF.Tang.Tests.Tang.TwoConstructors+TCInt = 1)";
@@ -391,8 +391,8 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
         public void TestInjectInjector()
         {
             IInjector i = TangFactory.GetTang().NewInjector();
-            var ii = (InjectInjector) i.GetInstance(typeof(InjectInjector));
-            //Assert.IsTrue(ii.i is IInjector);
+            var ii = (InjectInjector)i.GetInstance(typeof(InjectInjector));
+            // Assert.IsTrue(ii.i is IInjector);
             Assert.AreNotSame(i, ii.i);
         }
 
@@ -621,7 +621,7 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
         }
 
         [Inject]
-        public RepeatedNamedArgs([Parameter(typeof (A))] int x, [Parameter(Value = typeof (B))] int y)
+        public RepeatedNamedArgs([Parameter(typeof(A))] int x, [Parameter(Value = typeof(B))] int y)
         {
         }
     }
@@ -639,8 +639,8 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
         }
 
         [Inject]
-        public RepeatedNamedSingletonArgs([Parameter(typeof (A))] MustBeSingleton a,
-                                          [Parameter(typeof (B))] MustBeSingleton b)
+        public RepeatedNamedSingletonArgs([Parameter(typeof(A))] MustBeSingleton a,
+                                          [Parameter(typeof(B))] MustBeSingleton b)
         {
         }
     }
@@ -658,7 +658,7 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
         }
 
         [Inject]
-        public OneNamedSingletonArgs([Parameter(typeof (A))] MustBeSingleton a)
+        public OneNamedSingletonArgs([Parameter(typeof(A))] MustBeSingleton a)
         {
         }
     }
@@ -675,7 +675,7 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
     internal class Impl : Interf
     {
         [Inject]
-        private Impl([Parameter(Value = typeof (Param))] int p)
+        private Impl([Parameter(Value = typeof(Param))] int p)
         {
         }
     }
@@ -690,7 +690,7 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
         public string s;
 
         [Inject]
-        private OneNamedStringArg([Parameter(typeof (A))] string s)
+        private OneNamedStringArg([Parameter(typeof(A))] string s)
         {
             this.s = s;
         }
@@ -712,7 +712,7 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
         public string b;
 
         [Inject]
-        private TwoNamedStringArgs([Parameter(typeof (A))] string a, [Parameter(typeof (B))] String b)
+        private TwoNamedStringArgs([Parameter(typeof(A))] string a, [Parameter(typeof(B))] String b)
         {
             this.a = a;
             this.b = b;
@@ -833,10 +833,10 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
         public class ABtaker
         {
             [Inject]
-            private ABtaker([Parameter(typeof (AImplName))] INamedImplA a, [Parameter(typeof (BImplName))] INamedImplA b)
+            private ABtaker([Parameter(typeof(AImplName))] INamedImplA a, [Parameter(typeof(BImplName))] INamedImplA b)
             {
-                //Assert.IsTrue(a is Aimpl, "AImplName must be instance of Aimpl");
-                //Assert.IsTrue(b is Bimpl, "BImplName must be instance of Bimpl");
+                // Assert.IsTrue(a is Aimpl, "AImplName must be instance of Aimpl");
+                // Assert.IsTrue(b is Bimpl, "BImplName must be instance of Bimpl");
             }
         }
     }
@@ -876,13 +876,13 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
         public float f;
 
         [NamedParameter]
-        public class TCInt : Name<Int32> {}
+        public class TCInt : Name<Int32> { }
 
         [NamedParameter]
         public class TCString : Name<string> { }
 
         [NamedParameter]
-        public class TCFloat : Name<float> {}
+        public class TCFloat : Name<float> { }
 
         [Inject]
         public ThreeConstructors([Parameter(typeof(TCInt))] int i, [Parameter(typeof(TCString))] string s) 
@@ -966,25 +966,25 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
         {
         }
 
-        //[NamedParameter(DefaultClass = typeof(XAA))]
-        //public class XNameDA : Name<X<BB>>
-        //{
-        //}
+        // [NamedParameter(DefaultClass = typeof(XAA))]
+        // public class XNameDA : Name<X<BB>>
+        // {
+        // }
 
         [NamedParameter(DefaultClass = typeof(XBB))]
         public class XNameDB : Name<X<BB>>
         {
         }
 
-        //[NamedParameter(DefaultClass = typeof(XCC))]
-        //public class XNameDC : Name<X<BB>>
-        //{
-        //}
+        // [NamedParameter(DefaultClass = typeof(XCC))]
+        // public class XNameDC : Name<X<BB>>
+        // {
+        // }
 
-        //[NamedParameter(DefaultClass = typeof(XCC))]
-        //public class XNameDAA : Name<XBB>
-        //{
-        //}
+        // [NamedParameter(DefaultClass = typeof(XCC))]
+        // public class XNameDAA : Name<XBB>
+        // {
+        // }
 
         [NamedParameter(DefaultClass = typeof(XXBB))]
         public class XNameDDAA : Name<XBB>
@@ -1062,17 +1062,17 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
     class GasCan : Bottle<Gas> 
     {  
     }
-    class Water {}
-    class Gas {}
+    class Water { }
+    class Gas { }
 
-    [NamedParameter(DefaultClass=typeof(GasCan))]
+    [NamedParameter(DefaultClass = typeof(GasCan))]
     class WaterBottleName : Name<Bottle<Water>> { }
 
-    interface IEventHandler <T> { }
+    interface IEventHandler<T> { }
     class MyEventHandler<T> : IEventHandler<T> 
     { 
         [Inject]
-        MyEventHandler () { }
+        MyEventHandler() { }
     }
 
     [DefaultImplementation(typeof(MyEventHandler<Foo>))]
@@ -1092,12 +1092,12 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
     class AH
     {
         [Inject]
-        AH() {}
+        AH() { }
     }
     class BH
     {
         [Inject]
-        BH() {}
+        BH() { }
     }
 
     [DefaultImplementation(typeof(AHandlerImpl))]
@@ -1138,8 +1138,8 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
     {
         [Inject]
         WantSomeFutureHandlersName(
-            [Parameter(typeof (AHandlerName))] IInjectionFuture<IEventHandler<AH>> a,
-            [Parameter(typeof (BHandlerName))] IInjectionFuture<IEventHandler<BH>> b)
+            [Parameter(typeof(AHandlerName))] IInjectionFuture<IEventHandler<AH>> a,
+            [Parameter(typeof(BHandlerName))] IInjectionFuture<IEventHandler<BH>> b)
         {            
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Utilities/AssemblyLoaderTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Utilities/AssemblyLoaderTests.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Utilities/AssemblyLoaderTests.cs
index 50278dd..0ce2057 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Utilities/AssemblyLoaderTests.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Utilities/AssemblyLoaderTests.cs
@@ -28,13 +28,13 @@ namespace Org.Apache.REEF.Tang.Tests.Utilities
         [TestMethod]
         public void AssemblyLoadingFailsNoException()
         {
-            var notUsed = new AssemblyLoader(new []{"DoesNotExist.dll"});
+            var notUsed = new AssemblyLoader(new[] { "DoesNotExist.dll" });
         }
 
         [TestMethod]
         public void AssemblyLoadingSomeSucceedFailuresAreIgnored()
         {
-            var loader = new AssemblyLoader(new []{"DoesNotExist.dll", FileNames.Examples});
+            var loader = new AssemblyLoader(new[] { "DoesNotExist.dll", FileNames.Examples });
             Assert.AreEqual(1, loader.Assemblies.Count);
             Assert.IsTrue(loader.Assemblies.First().GetName().Name == FileNames.Examples);
         }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tests/Utilities/TestUtilities.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Utilities/TestUtilities.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Utilities/TestUtilities.cs
index c284c38..41102ec 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Utilities/TestUtilities.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Utilities/TestUtilities.cs
@@ -177,7 +177,7 @@ namespace Org.Apache.REEF.Tang.Tests.Utilities
             Type iface = typeof(ISet<>);
             Type type = typeof(MySet<string>);
             Type p = ReflectionUtilities.GetInterfaceTarget(iface, type);
-            Assert.IsTrue(p.Equals(typeof (string)));
+            Assert.IsTrue(p.Equals(typeof(string)));
         }
 
         [TestMethod]

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.csproj b/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.csproj
index d9a998d..8d92a33 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.csproj
+++ b/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.csproj
@@ -56,6 +56,7 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -69,4 +70,4 @@ under the License.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Exceptions/BindException.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Exceptions/BindException.cs b/lang/cs/Org.Apache.REEF.Tang/Exceptions/BindException.cs
index 22ee144..70f1742 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Exceptions/BindException.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Exceptions/BindException.cs
@@ -23,7 +23,7 @@ namespace Org.Apache.REEF.Tang.Exceptions
 {
     public class BindException : SystemException
     {
-        //private static readonly long serialVersionUID = 1L;
+        // private static readonly long serialVersionUID = 1L;
         public BindException(String message)
             : base(message)
         {           

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Exceptions/ClassHierarchyException.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Exceptions/ClassHierarchyException.cs b/lang/cs/Org.Apache.REEF.Tang/Exceptions/ClassHierarchyException.cs
index 496aea6..091e326 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Exceptions/ClassHierarchyException.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Exceptions/ClassHierarchyException.cs
@@ -23,7 +23,7 @@ namespace Org.Apache.REEF.Tang.Exceptions
 {
     public class ClassHierarchyException : SystemException
     {
-        public ClassHierarchyException(String msg) :  base(msg)
+        public ClassHierarchyException(String msg) : base(msg)
         {           
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Exceptions/NameResolutionException.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Exceptions/NameResolutionException.cs b/lang/cs/Org.Apache.REEF.Tang/Exceptions/NameResolutionException.cs
index e023f68..2bdbedc 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Exceptions/NameResolutionException.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Exceptions/NameResolutionException.cs
@@ -23,7 +23,7 @@ namespace Org.Apache.REEF.Tang.Exceptions
 {
     public class NameResolutionException : BindException
     {
-        //private static readonly long serialVersionUID = 1L;
+        // private static readonly long serialVersionUID = 1L;
         public NameResolutionException(String name, String longestPrefix) :
             base(string.Format("Could not resolve {0}.  Search ended at prefix {1}. This can happen due to typos in class names that are passed as strings, or because Tang uses Assembly loader other than the one that generated the class reference ((make sure you use the full name of a class)",
                 name, longestPrefix))

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs b/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs
index fe1d7e6..e43d751 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs
@@ -180,9 +180,6 @@ namespace Org.Apache.REEF.Tang.Formats
                     }
 
                     buffer.Seek(0, SeekOrigin.Begin);
-                    //AvroSerializerSettings settings = new AvroSerializerSettings();
-                    //settings.Resolver = new AvroConfigurationResolver();
-                    //using (var reader = new SequentialReader<AvroConfiguration>(AvroContainer.CreateReader<AvroConfiguration>(buffer, true, settings, new CodecFactory())))
                     using (var reader = new SequentialReader<AvroConfiguration>(AvroContainer.CreateReader<AvroConfiguration>(buffer, true))) 
                     {
                         var results = reader.Objects;

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationFile.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationFile.cs b/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationFile.cs
index f0c0157..ae8f66e 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationFile.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationFile.cs
@@ -78,7 +78,7 @@ namespace Org.Apache.REEF.Tang.Formats
             catch (ApplicationException e)
             {
                 Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Caught(e, Level.Warning, LOGGER);
-                return name;//if name is not a type, return as it was
+                return name; // if name is not a type, return as it was
                 
             }
         }
@@ -93,13 +93,13 @@ namespace Org.Apache.REEF.Tang.Formats
             catch (ApplicationException e)
             {
                 Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Caught(e, Level.Warning, LOGGER);
-                return s;//if name is not a type, return as it was
+                return s; // if name is not a type, return as it was
             }
         }
 
         public static HashSet<String> ToConfigurationStringList(IConfiguration c) 
         {
-            ConfigurationImpl conf = (ConfigurationImpl) c;
+            ConfigurationImpl conf = (ConfigurationImpl)c;
             HashSet<string> l = new HashSet<string>();
             foreach (IClassNode opt in conf.GetBoundImplementations()) 
             {
@@ -289,7 +289,7 @@ namespace Org.Apache.REEF.Tang.Formats
         */
         private static string Escape(string str) 
         {
-            return str;  //TODO
+            return str;  // TODO
             // After regexp escaping \\\\ = 1 slash, \\\\\\\\ = 2 slashes.
 
             // Also, the second args of replaceAll are neither strings nor regexps, and
@@ -297,7 +297,7 @@ namespace Org.Apache.REEF.Tang.Formats
             // escape slashes (4 slashes) and quotes (3 slashes + ") in those strings.
             // Since we need to write \\ and \", we end up with 8 and 7 slashes,
             // respectively.
-            //return in.ReplaceAll("\\\\", "\\\\\\\\").replaceAll("\"", "\\\\\\\"");
+            // return in.ReplaceAll("\\\\", "\\\\\\\\").replaceAll("\"", "\\\\\\\"");
         }
 
         public static StringBuilder Join(StringBuilder sb, String sep, IConstructorArg[] types) 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationModule.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationModule.cs b/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationModule.cs
index 5fda89d..346112a 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationModule.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationModule.cs
@@ -57,7 +57,6 @@ namespace Org.Apache.REEF.Tang.Formats
             this.Builder = builder.DeepCopy();
         }
 
-         //public final <T> ConfigurationModule set(Impl<T> opt, Class<? extends T> impl)
         public ConfigurationModule Set<T, U>(IImpl<T> opt, GenericType<U> impl) 
             where U : T 
         {
@@ -107,12 +106,11 @@ namespace Org.Apache.REEF.Tang.Formats
         ////TODO
         ////public readonly ConfigurationModule set(Param<? extends Number> opt, Number val) 
         ////{
-        ////    return set(opt, val);
+        ////   return set(opt, val);
         ////}
 
         public ConfigurationModule Set<T>(IParam<T> opt, string val) 
         {
-            //var o = (IParam<object>)opt;
             ConfigurationModule c = DeepCopy();
             c.ProcessSet(opt);
             if (c.Builder.SetOpts.Contains(opt)) 
@@ -186,18 +184,18 @@ namespace Org.Apache.REEF.Tang.Formats
                 {
                     foreach (Type clz in c.setImplSets.GetValuesForKey(i))
                     {
-                        ICsInternalConfigurationBuilder b = (ICsInternalConfigurationBuilder) c.Builder.B;
+                        ICsInternalConfigurationBuilder b = (ICsInternalConfigurationBuilder)c.Builder.B;
                         b.BindSetEntry(clazz, clz);
                     }
                     foreach (string s in c.setLateImplSets.GetValuesForKey(i))
                     {
-                        ICsInternalConfigurationBuilder b = (ICsInternalConfigurationBuilder) c.Builder.B;
+                        ICsInternalConfigurationBuilder b = (ICsInternalConfigurationBuilder)c.Builder.B;
                         b.BindSetEntry(clazz, s);
                     }
                 } 
                 else if (c.setImplLists.ContainsKey(i))
                 {
-                    ICsConfigurationBuilder b = (ICsConfigurationBuilder) c.Builder.B;
+                    ICsConfigurationBuilder b = (ICsConfigurationBuilder)c.Builder.B;
                     b.BindList(clazz, setImplLists.Get(i));
                 }
                 else if (c.setLateImplLists.ContainsKey(i))
@@ -207,7 +205,6 @@ namespace Org.Apache.REEF.Tang.Formats
                 }
             }
             
-            //for (Class<? extends Name<?>> clazz : c.builder.freeParams.Keys) {
             foreach (Type clazz in c.Builder.FreeParams.Keys) 
             {
                 object p = c.Builder.FreeParams.Get(clazz);
@@ -237,7 +234,6 @@ namespace Org.Apache.REEF.Tang.Formats
 
                 if (!foundOne) 
                 {
-                    //if (!(p is OptionalParameter<object>)) //p: OptionalParameter<int>, "is" doesn't work here for generic type object
                     if (!ReflectionUtilities.IsInstanceOfGeneric(p, typeof(OptionalParameter<>)))
                     {
                         Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new IllegalStateException(), LOGGER);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationModuleBuilder.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationModuleBuilder.cs b/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationModuleBuilder.cs
index 03571ea..47e1179 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationModuleBuilder.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationModuleBuilder.cs
@@ -38,7 +38,7 @@ namespace Org.Apache.REEF.Tang.Formats
         public readonly MonotonicHashSet<object> SetOpts = new MonotonicHashSet<object>();
         public readonly MonotonicHashMap<object, FieldInfo> Map = new MonotonicHashMap<object, FieldInfo>();
         public readonly MonotonicHashMap<Type, object> FreeImpls = new MonotonicHashMap<Type, object>();
-        public readonly MonotonicHashMap<Type, object> FreeParams = new MonotonicHashMap<Type, object>(); //Type must extends from Name<>
+        public readonly MonotonicHashMap<Type, object> FreeParams = new MonotonicHashMap<Type, object>(); // Type must extends from Name<>
 
         private static readonly Logger LOGGER = Logger.GetLogger(typeof(ConfigurationModuleBuilder));
         private static readonly ISet<Type> ParamBlacklist = new MonotonicHashSet<Type>(new Type[] { typeof(IParam<>), typeof(IImpl<>) });
@@ -172,7 +172,7 @@ namespace Org.Apache.REEF.Tang.Formats
             c.reqUsed.AddAll(d.Builder.reqUsed);
             c.optUsed.AddAll(d.Builder.optUsed);
             c.SetOpts.AddAll(d.Builder.SetOpts);
-            //c.ListOpts.AddAll(d.Builder.ListOpts);
+            // c.ListOpts.AddAll(d.Builder.ListOpts);
             c.Map.AddAll(d.Builder.Map);
             c.FreeImpls.AddAll(d.Builder.FreeImpls);
             c.FreeParams.AddAll(d.Builder.FreeParams);
@@ -346,8 +346,8 @@ namespace Org.Apache.REEF.Tang.Formats
             return c;
         }
 
-        //public final <T> ConfigurationModuleBuilder bindNamedParameter(Class<? extends Name<T>> iface, Class<? extends T> impl)  
-        //if V is T, you'd better to use public ConfigurationModuleBuilder BindNamedParameter<U, T>(GenericType<U> iface, GenericType<T> impl) defined below
+        // public final <T> ConfigurationModuleBuilder bindNamedParameter(Class<? extends Name<T>> iface, Class<? extends T> impl)  
+        // if V is T, you'd better to use public ConfigurationModuleBuilder BindNamedParameter<U, T>(GenericType<U> iface, GenericType<T> impl) defined below
         public ConfigurationModuleBuilder BindNamedParameter<U, V, T>(GenericType<U> iface, GenericType<V> impl)
             where U : Name<T>
             where V : T
@@ -382,7 +382,7 @@ namespace Org.Apache.REEF.Tang.Formats
         }
 
         // public final <T> ConfigurationModuleBuilder bindNamedParameter(Class<? extends Name<T>> iface, Impl<? extends T> opt)
-        //if ValueType is T, you would better to use public ConfigurationModuleBuilder BindNamedParameter<U, T>(GenericType<U> iface, IImpl<T> opt)
+        // if ValueType is T, you would better to use public ConfigurationModuleBuilder BindNamedParameter<U, T>(GenericType<U> iface, IImpl<T> opt)
         public ConfigurationModuleBuilder BindNamedParameter<U, V, T>(GenericType<U> iface, IImpl<V> opt)
             where U : Name<T>
             where V : T

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AbstractNode.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AbstractNode.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AbstractNode.cs
index 5eedaea..f6b9c06 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AbstractNode.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AbstractNode.cs
@@ -33,12 +33,12 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
 
         /// It is from Type.AssemblyQualifiedName. THis name is used as full name in a Node
         /// It is unique for a generic type with different type of arguments.
-        private readonly String fullName; //it comes from 
+        private readonly String fullName;
 
-        //parent node in the class hierarchy
+        // parent node in the class hierarchy
         private readonly INode parent; 
         
-        //children in the class hierarchy
+        // children in the class hierarchy
         protected IDictionary<String, INode> children = new MonotonicTreeMap<string, INode>();
 
         public AbstractNode(INode parent, String name, String fullName)
@@ -94,10 +94,10 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
 
         public override bool Equals(Object o) 
         {
-            if(o == null) return false;
-            if(o == this) return true;
+            if (o == null) return false;
+            if (o == this) return true;
     
-            AbstractNode n = (AbstractNode) o;
+            AbstractNode n = (AbstractNode)o;
             bool parentsEqual;
             if (n.parent == this.parent) {
                 parentsEqual = true;

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AvroClassHierarchySerializer.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AvroClassHierarchySerializer.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AvroClassHierarchySerializer.cs
index bb16e1c..f5409f2 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AvroClassHierarchySerializer.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AvroClassHierarchySerializer.cs
@@ -205,7 +205,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
 
             if (n is IClassNode)
             {
-                IClassNode cn = (IClassNode) n;
+                IClassNode cn = (IClassNode)n;
                 IList<IConstructorDef> injectable = cn.GetInjectableConstructors();
                 IList<IConstructorDef> all = cn.GetAllConstructors();
                 IList<IConstructorDef> others = new List<IConstructorDef>(all);
@@ -230,7 +230,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                 List<string> implFullNames = new List<string>();
                 foreach (IClassNode impl in cn.GetKnownImplementations())
                 {
-                    implFullNames.Add(impl.GetFullName()); //we use class fully qualified name 
+                    implFullNames.Add(impl.GetFullName()); // we use class fully qualified name 
                 }
 
                 return NewClassNode(cn.GetName(), cn.GetFullName(),
@@ -240,7 +240,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
 
             if (n is INamedParameterNode)
             {
-                INamedParameterNode np = (INamedParameterNode) n;
+                INamedParameterNode np = (INamedParameterNode)n;
                 return NewNamedParameterNode(np.GetName(), np.GetFullName(),
                     np.GetSimpleArgName(), np.GetFullArgName(), np.IsSet(), np.IsList(), np.GetDocumentation(),
                     np.GetShortName(), np.GetDefaultInstanceAsStrings(), children);

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ClassHierarchyImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ClassHierarchyImpl.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ClassHierarchyImpl.cs
index ae2ac31..8e2ff59 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ClassHierarchyImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ClassHierarchyImpl.cs
@@ -35,7 +35,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
 {
     public class ClassHierarchyImpl : ICsClassHierarchy
     {
-        private static readonly Logger LOGGER = Logger.GetLogger(typeof (ClassHierarchyImpl));
+        private static readonly Logger LOGGER = Logger.GetLogger(typeof(ClassHierarchyImpl));
         private readonly INode rootNode;
         private readonly MonotonicTreeMap<string, INamedParameterNode> shortNames = new MonotonicTreeMap<string, INamedParameterNode>();
         private readonly IList<string> assemblies;
@@ -44,7 +44,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
         private object _mergeLock = new object();
         private object _implLock = new object();
 
-        //alias is indexed by language, for each language, a mapping between alias and corresponding name kept in a Dictionary
+        // alias is indexed by language, for each language, a mapping between alias and corresponding name kept in a Dictionary
         private readonly IDictionary<string, IDictionary<string, string>> _aliasLookupTable = new Dictionary<string, IDictionary<string, string>>();
 
 
@@ -58,14 +58,14 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
         {
         }
 
-        //parameterParsers are classes that extends from IExternalConstructor
+        // parameterParsers are classes that extends from IExternalConstructor
         public ClassHierarchyImpl(string[] assemblies, Type[] parameterParsers)  
         {
             this.assemblies = assemblies;
             rootNode = NodeFactory.CreateRootPackageNode();
             loader = new AssemblyLoader(assemblies);
            
-            foreach (Type p in parameterParsers) //p must be extend from IExternalConstructor
+            foreach (Type p in parameterParsers) // p must be extend from IExternalConstructor
             {
                 try 
                 {
@@ -166,7 +166,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                         {
                             Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new ArgumentException("not type in arg"), LOGGER);
                         }
-                        RegisterType(constructorArg.Gettype());  //Gettype returns param's Type.fullname
+                        RegisterType(constructorArg.Gettype());  // Gettype returns param's Type.fullname
                         if (constructorArg.GetNamedParameterName() != null)
                         {
                             INamedParameterNode np = (INamedParameterNode)RegisterType(constructorArg.GetNamedParameterName());
@@ -174,7 +174,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                             {
                                 if (np.IsSet() || np.IsList())
                                 {
-                                    //throw new NotImplementedException();
+                                    // throw new NotImplementedException();
                                 }
                                 else
                                 {
@@ -226,7 +226,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                 Type baseType = type.BaseType;
                 if (baseType != null)
                 {
-                    IClassNode n = (IClassNode) GetAlreadyBoundNode(baseType);
+                    IClassNode n = (IClassNode)GetAlreadyBoundNode(baseType);
                     if (n != null)
                     {
                         n.PutImpl(classNode);
@@ -265,8 +265,8 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
             }
             INamedParameterNode np = NodeFactory.CreateNamedParameterNode(parent, type, argType);
 
-            if(Parameterparser.CanParse(ReflectionUtilities.GetAssemblyQualifiedName(argType))) {
-                if(type.GetCustomAttribute<NamedParameterAttribute>().DefaultClass != null) 
+            if (Parameterparser.CanParse(ReflectionUtilities.GetAssemblyQualifiedName(argType))) {
+                if (type.GetCustomAttribute<NamedParameterAttribute>().DefaultClass != null) 
                 {
                     var e = new ClassHierarchyException("Named parameter " + ReflectionUtilities.GetAssemblyQualifiedName(type) + " defines default implementation for parsable type " + ReflectionUtilities.GetAssemblyQualifiedName(argType));
                     Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(e, LOGGER);
@@ -279,7 +279,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                 _aliasLookupTable.TryGetValue(np.GetAliasLanguage().ToString(), out mapping);
                 if (null == mapping)
                 {
-                    mapping= new Dictionary<string, string>();
+                    mapping = new Dictionary<string, string>();
                     _aliasLookupTable.Add(np.GetAliasLanguage().ToString(), mapping);
                 }
                 try
@@ -317,12 +317,12 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
             return np;            
         }
 
-        //return Type T if type implements Name<T>, null otherwise
-        //e.g. [NamedParameter(typeof(System.String), "Number of seconds to sleep", "10", "sec")]
-        //class Seconds : Name<Int32> { }
-        //return Int32
+        // return Type T if type implements Name<T>, null otherwise
+        // e.g. [NamedParameter(typeof(System.String), "Number of seconds to sleep", "10", "sec")]
+        // class Seconds : Name<Int32> { }
+        // return Int32
 
-        //TODO add error handlings
+        // TODO add error handlings
         public Type GetNamedParameterTargetOrNull(Type type)
         {
             var npAnnotation = type.GetCustomAttribute<NamedParameterAttribute>();
@@ -347,7 +347,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
 
         private INode GetAlreadyBoundNode(Type t)
         {
-            //get outclass names including itsself
+            // get outclass names including itsself
             string[] outerClassNames = ReflectionUtilities.GetEnclosingClassNames(t);
 
             INode current = rootNode;
@@ -366,21 +366,21 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                         }
                     }
                     return null;
-                    //throw new NameResolutionException(t.FullName, sb.ToString());
+                    // throw new NameResolutionException(t.FullName, sb.ToString());
                 }
 
             }
             return current; 
         }
 
-        //starting from the root, get child for each eclosing class excluding the type itsself
-        //all enclosing classes should be already in the hierarchy
-        //Type B2 = asm.GetType(@"Org.Apache.REEF.Tang.Examples.B+B1+B2");
-        //string[] pathB2 = ClassNameParser.GetEnclosingClassShortNames(B2);
-        //Assert.AreEqual(pathB2[0], "B");
-        //Assert.AreEqual(pathB2[1], "B1");
-        //Assert.AreEqual(pathB2[2], "B2");
-        //return INode for B1
+        // starting from the root, get child for each eclosing class excluding the type itsself
+        // all enclosing classes should be already in the hierarchy
+        // Type B2 = asm.GetType(@"Org.Apache.REEF.Tang.Examples.B+B1+B2");
+        // string[] pathB2 = ClassNameParser.GetEnclosingClassShortNames(B2);
+        // Assert.AreEqual(pathB2[0], "B");
+        // Assert.AreEqual(pathB2[1], "B1");
+        // Assert.AreEqual(pathB2[2], "B2");
+        // return INode for B1
         private INode GetParentNode(Type type)
         {
             INode current = rootNode;
@@ -487,14 +487,14 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                 Utilities.Diagnostics.Exceptions.Throw(new NotSupportedException("Can't merge java and non-java class hierarchies yet!"), LOGGER);
             }
 
-            if(this.assemblies.Count == 0) 
+            if (this.assemblies.Count == 0) 
             {
                 return ch;
             }
 
             lock (_mergeLock)
             {
-                ClassHierarchyImpl chi = (ClassHierarchyImpl) ch;
+                ClassHierarchyImpl chi = (ClassHierarchyImpl)ch;
                 MonotonicHashSet<string> otherJars = new MonotonicHashSet<string>();
                 otherJars.AddAll(chi.assemblies);
                 MonotonicHashSet<string> myJars = new MonotonicHashSet<string>();
@@ -519,7 +519,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
             {
                 iface = (IClassNode)GetNode(np.GetFullArgName());
             } 
-            catch(NameResolutionException e) 
+            catch (NameResolutionException e)
             {
                 Utilities.Diagnostics.Exceptions.Caught(e, Level.Error, LOGGER);
                 var ex = new IllegalStateException("Could not parse validated named parameter argument type.  NamedParameter is " + np.GetFullName() + " argument type is " + np.GetFullArgName(), e);
@@ -532,7 +532,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                 clazz = (Type)ClassForName(iface.GetFullName());
                 fullName = null;
             } 
-            catch(TypeLoadException e) 
+            catch (TypeLoadException e)
             {
                 Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Caught(e, Level.Warning, LOGGER);
                 clazz = null;
@@ -556,7 +556,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                     INode impl = GetNode(value);
                     if (impl is IClassNode)
                     {
-                        if (IsImplementation(iface, (IClassNode) impl))
+                        if (IsImplementation(iface, (IClassNode)impl))
                         {
                             return impl;
                         }
@@ -616,7 +616,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
             }
             var ec = new IllegalStateException("Multiple defaults for non-set named parameter! " + name.GetFullName());
             Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(ec, LOGGER);
-            return null; //this line would be never reached as Throw will throw an exception
+            return null; // this line would be never reached as Throw will throw an exception
         }
 
         public Type ClassForName(string name)

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ConstructorArgImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ConstructorArgImpl.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ConstructorArgImpl.cs
index a8a41b5..052f0e1 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ConstructorArgImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ConstructorArgImpl.cs
@@ -30,15 +30,11 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
 
         public ConstructorArgImpl(String type, String namedParameterName, bool isInjectionFuture)
         {
-            if (type == null)
-            {
-                ;
-            }
             this.type = type;
             this.name = namedParameterName;
 
-            //if (name != null && name.Contains(','))
-            //    throw new ApplicationException("Name contains comma : " + name);
+            ////if (name != null && name.Contains(','))
+            ////   throw new ApplicationException("Name contains comma : " + name);
             this.isInjectionFuture = isInjectionFuture;
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ConstructorDefImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ConstructorDefImpl.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ConstructorDefImpl.cs
index 8d8c77a..61d17df 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ConstructorDefImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ConstructorDefImpl.cs
@@ -157,7 +157,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
             return 0;
         }
 
-        //A(int i, string j) vs. A(string i, int j) is Ambiguous in injection
+        // A(int i, string j) vs. A(string i, int j) is Ambiguous in injection
         private bool EqualsIgnoreOrder(IConstructorDef def)
         {
             if (GetArgs().Count != def.GetArgs().Count)
@@ -188,7 +188,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
             return ToString().CompareTo(o.ToString());
         }
 
-        public bool IsInList(IList<IConstructorDef> list )
+        public bool IsInList(IList<IConstructorDef> list)
         {
             foreach (IConstructorDef def in list)
             {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/NodeFactory.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/NodeFactory.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/NodeFactory.cs
index 725babd..b3810b3 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/NodeFactory.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/NodeFactory.cs
@@ -41,24 +41,24 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
 
         public static INode CreateClassNode(INode parent, Type clazz)
         {
-            //var namedParameter = clazz.GetCustomAttribute<NamedParameterAttribute>();
+            // var namedParameter = clazz.GetCustomAttribute<NamedParameterAttribute>();
             var unit = null != clazz.GetCustomAttribute<UnitAttribute>();
             string simpleName = ReflectionUtilities.GetName(clazz);
             string fullName = ReflectionUtilities.GetAssemblyQualifiedName(clazz);
-            //bool isStatic = true; // clazz.IsSealed && clazz.IsAbstract; always true in C# for Java static class
-            //bool injectable = true; // always true in C#
+            // bool isStatic = true; // clazz.IsSealed && clazz.IsAbstract; always true in C# for Java static class
+            // bool injectable = true; // always true in C#
 
             bool isAssignableFromExternalConstructor = ReflectionUtilities.IsAssignableFromIgnoreGeneric(typeof(IExternalConstructor<>), clazz); 
 
-            //bool parentIsUnit = false; 
+            // bool parentIsUnit = false; 
 
-            //No such thing in C#, should be false
-            //bool foundNonStaticInnerClass = false;
-            //foreach (Type c in clazz.getNestedTypes()) {
-            //  if (!Modifier.isStatic(c.getModifiers())) {
-            //    foundNonStaticInnerClass = true;
-            //  }
-            //}
+            ////No such thing in C#, should be false
+            ////bool foundNonStaticInnerClass = false;
+            ////foreach (Type c in clazz.getNestedTypes()) {
+            ////  if (!Modifier.isStatic(c.getModifiers())) {
+            ////    foundNonStaticInnerClass = true;
+            ////  }
+            ////}
 
             var injectableConstructors = new List<IConstructorDef>();
             var allConstructors = new List<IConstructorDef>();
@@ -73,7 +73,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
 
                 if (constructorInjectable)
                 {
-//                    if (injectableConstructors.Contains(constructorDef))
+                    // if (injectableConstructors.Contains(constructorDef))
                     if (constructorDef.IsInList(injectableConstructors))
                     {
                         var e = new ClassHierarchyException(
@@ -122,7 +122,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                 injectableConstructors, allConstructors, defaultImplementation);
         }
 
-        //TODO
+        // TODO
         private static ConstructorDefImpl CreateConstructorDef(ConstructorInfo constructor, bool injectable)
         {
             var parameters = constructor.GetParameters();
@@ -131,16 +131,16 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
 
             for (int i = 0; i < parameters.Length; i++)
             {
-                //TODO for getInterfaceTarget() call
+                // TODO for getInterfaceTarget() call
                 Type type = parameters[i].ParameterType;
                 type = ReflectionUtilities.EnsureInterfaceType(type);
-                //if (type.IsGenericType && type.FullName == null)
-                //{
-                //    type = type.GetGenericTypeDefinition();
-                //}
+                ////if (type.IsGenericType && type.FullName == null)
+                ////{
+                ////   type = type.GetGenericTypeDefinition();
+                ////}
                 bool isFuture;
 
-                if(ReflectionUtilities.IsAssignableFromIgnoreGeneric(typeof(IInjectionFuture<>), type)) 
+                if (ReflectionUtilities.IsAssignableFromIgnoreGeneric(typeof(IInjectionFuture<>), type)) 
                 {
                     type = ReflectionUtilities.GetInterfaceTarget(typeof(IInjectionFuture<>), type);
                     isFuture = true;
@@ -175,11 +175,11 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
         {
             Type setRawArgType = ReflectionUtilities.GetInterfaceTarget(typeof(ISet<>), argClass);
             bool isSet = setRawArgType != null;
-            if(isSet) {
+            if (isSet) {
                 argClass = setRawArgType;
             }
 
-            Type listRawArgType = ReflectionUtilities.GetInterfaceTargetForType(typeof (IList<>), argClass);
+            Type listRawArgType = ReflectionUtilities.GetInterfaceTargetForType(typeof(IList<>), argClass);
             bool isList = listRawArgType != null;
             if (isList)
             {
@@ -246,7 +246,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                 Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(e, LOGGER);
             }
 
-            string[] defaultInstanceAsStrings = new string[]{};
+            string[] defaultInstanceAsStrings = new string[] { };
 
             if (default_count == 0)
             {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ParameterParser.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ParameterParser.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ParameterParser.cs
index 5d6569f..4e750dc 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ParameterParser.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ParameterParser.cs
@@ -33,21 +33,21 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
 
         readonly MonotonicTreeMap<String, ConstructorInfo> parsers = new MonotonicTreeMap<String, ConstructorInfo>();
 
-        //ec: ACons, tc: A
+        // ec: ACons, tc: A
         public void AddParser(Type ec)
         {
             Type tc = (Type)ReflectionUtilities.GetInterfaceTarget(typeof(IExternalConstructor<>), ec);
             AddParser(tc, ec);
         }
 
-        //TODO
-        //public  <T, U extends T> void AddParser(Class<U> clazz, Class<? extends ExternalConstructor<T>> ec) throws BindException {
-        //public void AddParser<T, U, V>(GenericType<U> clazz, GenericType<V> ec) 
+        // TODO
+        // public  <T, U extends T> void AddParser(Class<U> clazz, Class<? extends ExternalConstructor<T>> ec) throws BindException {
+        // public void AddParser<T, U, V>(GenericType<U> clazz, GenericType<V> ec) 
         //    where U : T
         //    where V:  IExternalConstructor<T>
-        //{
+        // {
 
-        //clazz: A, ec: ACons
+        // clazz: A, ec: ACons
         private void AddParser(Type clazz, Type ec)
         {
             ConstructorInfo c = ec.GetConstructor(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, null, new Type[] { typeof(string) }, null);
@@ -58,7 +58,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                 Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(e, LOGGER);
             }
 
-            //c.setAccessible(true); //set as public 
+            // c.setAccessible(true); // set as public 
             parsers.Add(ReflectionUtilities.GetAssemblyQualifiedName(clazz), c);
         }
 
@@ -91,7 +91,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
             }
         }
 
-        //(Integer, "3") return object of new Integer(3)
+        // (Integer, "3") return object of new Integer(3)
         public object Parse(Type c, String s)
         {
             Type d = ReflectionUtilities.BoxClass(c);
@@ -101,7 +101,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                 if (parsers.ContainsKey(name))
                 {
                     object ret = Parse(name, s);
-                    if (c.IsAssignableFrom(ret.GetType())) //check if ret can be cast as c
+                    if (c.IsAssignableFrom(ret.GetType())) // check if ret can be cast as c
                     {
                         return ret;
                     }
@@ -115,7 +115,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
             return Parse(d.Name, s);
         }
 
-        //name: "Integer", value: "12"
+        // name: "Integer", value: "12"
         public object Parse(string name, string value)
         {
             if (parsers.ContainsKey(name))
@@ -126,7 +126,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                     parsers.TryGetValue(name, out c);
                     var o = c.Invoke(new object[] { value });
                     var m = o.GetType().GetMethod("NewInstance", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
-                    return m.Invoke(o, new object[] {});
+                    return m.Invoke(o, new object[] { });
                 }
                 catch (TargetInvocationException e)
                 {
@@ -190,7 +190,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
                 typeof(float).AssemblyQualifiedName,
                 typeof(double).AssemblyQualifiedName,
                 typeof(bool).AssemblyQualifiedName
-            } ); 
+            }); 
         
         public bool CanParse(string name)
         {

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/ConfigurationBuilderImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/ConfigurationBuilderImpl.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/ConfigurationBuilderImpl.cs
index 7b148cd..8bb1a02 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/ConfigurationBuilderImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/ConfigurationBuilderImpl.cs
@@ -61,7 +61,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
             this.ClassHierarchy = TangFactory.GetTang().GetDefaultClassHierarchy(assemblies, parsers);
             foreach (IConfiguration tc in confs) 
             {
-                AddConfiguration(((ConfigurationImpl) tc));
+                AddConfiguration(((ConfigurationImpl)tc));
             }
         }
 
@@ -95,11 +95,11 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
         {
             this.ClassHierarchy = this.ClassHierarchy.Merge(ns);
             
-            if((ClassHierarchy is ClassHierarchyImpl || builder.ClassHierarchy is ClassHierarchyImpl)) 
+            if ((ClassHierarchy is ClassHierarchyImpl || builder.ClassHierarchy is ClassHierarchyImpl)) 
             {
-                if((ClassHierarchy is ClassHierarchyImpl && builder.ClassHierarchy is ClassHierarchyImpl)) 
+                if ((ClassHierarchy is ClassHierarchyImpl && builder.ClassHierarchy is ClassHierarchyImpl)) 
                 {
-                    ((ClassHierarchyImpl) ClassHierarchy).Parameterparser.MergeIn(((ClassHierarchyImpl) builder.ClassHierarchy).Parameterparser);
+                    ((ClassHierarchyImpl)ClassHierarchy).Parameterparser.MergeIn(((ClassHierarchyImpl)builder.ClassHierarchy).Parameterparser);
                 } 
                 else 
                 {
@@ -147,7 +147,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
             foreach (KeyValuePair<INamedParameterNode, object> e in builder.BoundSetEntries) 
             {
               String name = ((INamedParameterNode)e.Key).GetFullName();
-              if(e.Value is INode) 
+              if (e.Value is INode) 
               {
                     BindSetEntry(name, (INode)e.Value);
               } 
@@ -265,7 +265,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
                 ((ICsClassHierarchy)ClassHierarchy).Parse(name, value);
             }
 
-            if(name.IsSet()) 
+            if (name.IsSet()) 
             {
                 BindSetEntry((INamedParameterNode)name, value);
             }