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:34 UTC

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

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)