Repository: reef Updated Branches: refs/heads/master 52518d137 -> b73c22295
http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 5c0506e..fd01d9c 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ConstructorDefImpl.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ConstructorDefImpl.cs @@ -32,9 +32,9 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy private static readonly Logger LOGGER = Logger.GetLogger(typeof(ConstructorDefImpl)); private readonly IList<IConstructorArg> args = new List<IConstructorArg>(); - private readonly String className; + private readonly string className; - public ConstructorDefImpl(String className, IConstructorArg[] args, bool injectable) + public ConstructorDefImpl(string className, IConstructorArg[] args, bool injectable) { this.args = args; this.className = className; @@ -60,12 +60,12 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy return args; } - public String GetClassName() + public string GetClassName() { return className; } - private String Join(String sep, Object[] vals) + private string Join(string sep, object[] vals) { if (vals.Length != 0) { @@ -78,11 +78,11 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy } else { - return ""; + return string.Empty; } } - public override String ToString() + public override string ToString() { StringBuilder sb = new StringBuilder(className); sb.Append("("); @@ -150,7 +150,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy return true; } - public override bool Equals(Object o) + public override bool Equals(object o) { return EqualsIgnoreOrder((IConstructorDef)o); } http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/NamedParameterNodeImpl.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/NamedParameterNodeImpl.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/NamedParameterNodeImpl.cs index fe42a44..948e100 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/NamedParameterNodeImpl.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/NamedParameterNodeImpl.cs @@ -26,19 +26,19 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy { public class NamedParameterNodeImpl : AbstractNode, INamedParameterNode { - private readonly String fullArgName; - private readonly String simpleArgName; - private readonly String documentation; - private readonly String shortName; - private readonly String[] defaultInstanceAsStrings; + private readonly string fullArgName; + private readonly string simpleArgName; + private readonly string documentation; + private readonly string shortName; + private readonly string[] defaultInstanceAsStrings; private readonly bool isSet; private readonly bool isList; private readonly string alias; private readonly Language aliasLanguage; - public NamedParameterNodeImpl(INode parent, String simpleName, - String fullName, String fullArgName, String simpleArgName, bool isSet, bool isList, - String documentation, String shortName, String[] defaultInstanceAsStrings, string alias = null, Language aliasLanguage = Language.Cs) + public NamedParameterNodeImpl(INode parent, string simpleName, + string fullName, string fullArgName, string simpleArgName, bool isSet, bool isList, + string documentation, string shortName, string[] defaultInstanceAsStrings, string alias = null, Language aliasLanguage = Language.Cs) : base(parent, simpleName, fullName) { this.fullArgName = fullArgName; @@ -52,32 +52,32 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy this.aliasLanguage = aliasLanguage; } - public override String ToString() + public override string ToString() { return GetSimpleArgName() + " " + GetName(); } - public String GetSimpleArgName() + public string GetSimpleArgName() { return simpleArgName; } - public String GetFullArgName() + public string GetFullArgName() { return fullArgName; } - public String GetDocumentation() + public string GetDocumentation() { return documentation; } - public String GetShortName() + public string GetShortName() { return shortName; } - public String[] GetDefaultInstanceAsStrings() + public string[] GetDefaultInstanceAsStrings() { return defaultInstanceAsStrings; } http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 525e4f0..d491e94 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/NodeFactory.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/NodeFactory.cs @@ -251,23 +251,23 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy if (default_count == 0) { - defaultInstanceAsStrings = new String[] { }; + defaultInstanceAsStrings = new string[] { }; } else if (hasClassDefault) { Type default_class = namedParameter.DefaultClass; AssertIsSubclassOf(clazz, default_class, argClass); - defaultInstanceAsStrings = new String[] { ReflectionUtilities.GetAssemblyQualifiedName(default_class) }; + defaultInstanceAsStrings = new string[] { ReflectionUtilities.GetAssemblyQualifiedName(default_class) }; } else if (hasStringDefault) { // Don't know if the string is a class or literal here, so don't bother validating. - defaultInstanceAsStrings = new String[] { namedParameter.DefaultValue }; + defaultInstanceAsStrings = new string[] { namedParameter.DefaultValue }; } else if (hasClassSetDefault) { Type[] clzs = namedParameter.DefaultClasses; - defaultInstanceAsStrings = new String[clzs.Length]; + defaultInstanceAsStrings = new string[clzs.Length]; for (int i = 0; i < clzs.Length; i++) { AssertIsSubclassOf(clazz, clzs[i], argClass); http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/PackageNodeImpl.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/PackageNodeImpl.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/PackageNodeImpl.cs index 90578e5..e8b8f53 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/PackageNodeImpl.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/PackageNodeImpl.cs @@ -24,13 +24,13 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy { public class PackageNodeImpl : AbstractNode, IPackageNode { - public PackageNodeImpl(INode parent, String name, String fullName) : + public PackageNodeImpl(INode parent, string name, string fullName) : base(parent, name, fullName) { } public PackageNodeImpl() - : base(null, "", "[root node]") + : base(null, string.Empty, "[root node]") { } http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 35531b6..2562575 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ParameterParser.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ParameterParser.cs @@ -31,7 +31,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy { private static readonly Logger LOGGER = Logger.GetLogger(typeof(ParameterParser)); - readonly MonotonicTreeMap<String, ConstructorInfo> parsers = new MonotonicTreeMap<String, ConstructorInfo>(); + readonly MonotonicTreeMap<string, ConstructorInfo> parsers = new MonotonicTreeMap<string, ConstructorInfo>(); // ec: ACons, tc: A public void AddParser(Type ec) @@ -91,16 +91,19 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy } // (Integer, "3") return object of new Integer(3) - public object Parse(Type c, String s) + public object Parse(Type c, string s) { Type d = ReflectionUtilities.BoxClass(c); - foreach (Type e in ReflectionUtilities.ClassAndAncestors(d)) // get all the super classes of Integer for example + foreach (Type e in ReflectionUtilities.ClassAndAncestors(d)) { + // get all the super classes of Integer for example string name = ReflectionUtilities.GetAssemblyQualifiedName(e); if (parsers.ContainsKey(name)) { object ret = Parse(name, s); - if (c.IsAssignableFrom(ret.GetType())) // check if ret can be cast as c + + // check if ret can be cast as c + if (c.IsAssignableFrom(ret.GetType())) { return ret; } @@ -137,37 +140,37 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy { return (object)value; } - if (name.Equals(typeof(Byte).Name)) + if (name.Equals(typeof(byte).Name)) { - return (object)(Byte)Byte.Parse(value); + return (object)(byte)byte.Parse(value); } - if (name.Equals(typeof(Char).Name)) + if (name.Equals(typeof(char).Name)) { - return (object)(Char)value[0]; + return (object)(char)value[0]; } if (name.Equals(typeof(short).Name)) { - return (System.Int16)System.Int16.Parse(value); + return (short)short.Parse(value); } if (name.Equals(typeof(int).Name)) { - return (object)(Int32)Int32.Parse(value); + return (object)(int)int.Parse(value); } if (name.Equals(typeof(long).Name)) { - return (object)(Int64)Int64.Parse(value); + return (object)(long)long.Parse(value); } if (name.Equals(typeof(float).Name)) { - return (object)(Single)Single.Parse(value); + return (object)(float)float.Parse(value); } - if (name.Equals(typeof(Double).Name)) + if (name.Equals(typeof(double).Name)) { - return (object)(Double)Double.Parse(value); + return (object)(double)double.Parse(value); } - if (name.Equals(typeof(Boolean).Name)) + if (name.Equals(typeof(bool).Name)) { - return (object)(Boolean)Boolean.Parse(value); + return (object)(bool)bool.Parse(value); } if (name.Equals(typeof(byte[]).Name)) { @@ -181,10 +184,10 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy private static readonly ISet<string> BUILTIN_NAMES = new HashSet<string>(new string[] { typeof(string).AssemblyQualifiedName, - typeof(Byte).AssemblyQualifiedName, + typeof(byte).AssemblyQualifiedName, typeof(char).AssemblyQualifiedName, typeof(short).AssemblyQualifiedName, - typeof(Int32).AssemblyQualifiedName, + typeof(int).AssemblyQualifiedName, typeof(long).AssemblyQualifiedName, typeof(float).AssemblyQualifiedName, typeof(double).AssemblyQualifiedName, http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 27c3a24..e86ed63 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/ConfigurationBuilderImpl.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/ConfigurationBuilderImpl.cs @@ -37,7 +37,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration public readonly IDictionary<IClassNode, IClassNode> BoundImpls = new MonotonicTreeMap<IClassNode, IClassNode>(); public readonly IDictionary<IClassNode, IClassNode> BoundConstructors = new MonotonicTreeMap<IClassNode, IClassNode>(); - public readonly IDictionary<INamedParameterNode, String> NamedParameters = new MonotonicTreeMap<INamedParameterNode, String>(); + public readonly IDictionary<INamedParameterNode, string> NamedParameters = new MonotonicTreeMap<INamedParameterNode, string>(); public readonly IDictionary<IClassNode, IConstructorDef> LegacyConstructors = new MonotonicTreeMap<IClassNode, IConstructorDef>(); public readonly MonotonicMultiMap<INamedParameterNode, object> BoundSetEntries = new MonotonicMultiMap<INamedParameterNode, object>(); public readonly IDictionary<INamedParameterNode, IList<object>> BoundLists = new MonotonicTreeMap<INamedParameterNode, IList<object>>(); @@ -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(); + string name = ((INamedParameterNode)e.Key).GetFullName(); if (e.Value is INode) { BindSetEntry(name, (INode)e.Value); @@ -260,7 +260,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration } } - public void BindParameter(INamedParameterNode name, String value) + public void BindParameter(INamedParameterNode name, string value) { /* Parse and discard value; this is just for type checking, skip for now*/ if (this.ClassHierarchy is ICsClassHierarchy) @@ -291,17 +291,17 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration } } - public void BindSetEntry(String iface, String impl) + public void BindSetEntry(string iface, string impl) { BoundSetEntries.Add((INamedParameterNode)this.ClassHierarchy.GetNode(iface), impl); } - public void BindSetEntry(String iface, INode impl) + public void BindSetEntry(string iface, INode impl) { BoundSetEntries.Add((INamedParameterNode)ClassHierarchy.GetNode(iface), impl); } - public void BindSetEntry(INamedParameterNode iface, String impl) + public void BindSetEntry(INamedParameterNode iface, string impl) { BoundSetEntries.Add(iface, impl); } @@ -352,7 +352,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration return param.GetSimpleArgName() + "=" + Join(",", param.GetDefaultInstanceAsStrings()); } - private String Join(string sep, string[] s) + private string Join(string sep, string[] s) { if (s.Length == 0) { http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/ConfigurationImpl.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/ConfigurationImpl.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/ConfigurationImpl.cs index 2fbc37e..922c593 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/ConfigurationImpl.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/ConfigurationImpl.cs @@ -98,7 +98,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration return Builder.LegacyConstructors.Keys; } - public ISet<Object> GetBoundSet(INamedParameterNode np) + public ISet<object> GetBoundSet(INamedParameterNode np) { return Builder.BoundSetEntries.GetValuesForKey(np); } http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 ae2bf17..7aae3e7 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/CsConfigurationBuilderImpl.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/CsConfigurationBuilderImpl.cs @@ -373,8 +373,8 @@ 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 (!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); http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 a1f1704..06a1233 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Constructor.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Constructor.cs @@ -107,7 +107,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan return sb.ToString(); } - private String ShallowArgString(InjectionPlan arg) + private string ShallowArgString(InjectionPlan arg) { if (arg is Constructor || arg is Subplan) { http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 8c97739..3b6c4d4 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionPlan.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectionPlan.cs @@ -81,9 +81,9 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan } } - public String ToPrettyString() + public string ToPrettyString() { - String ugly = node.GetFullName() + ":\n" + ToString(); + string ugly = node.GetFullName() + ":\n" + ToString(); StringBuilder pretty = new StringBuilder(); int currentIndent = 1; for (int i = 0; i < ugly.Length; i++) http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 ab18fec..7f14825 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectorImpl.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectorImpl.cs @@ -40,7 +40,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan readonly IDictionary<INamedParameterNode, object> namedParameterInstances = new MonotonicTreeMap<INamedParameterNode, object>(); private readonly ICsClassHierarchy classHierarchy; private readonly IConfiguration configuration; - readonly IDictionary<IClassNode, Object> instances = new MonotonicTreeMap<IClassNode, Object>(); + readonly IDictionary<IClassNode, object> instances = new MonotonicTreeMap<IClassNode, object>(); private Aspect aspect; private readonly ISet<IInjectionFuture<object>> pendingFutures = new HashSet<IInjectionFuture<object>>(); @@ -170,7 +170,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan { Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Caught(e, Level.Error, LOGGER); StringBuilder sb = new StringBuilder("Internal Tang error? Could not call constructor " + constructor.GetConstructorDef() + " with arguments ["); - foreach (Object o in args) + foreach (object o in args) { sb.Append("\n\t" + o); } @@ -277,8 +277,8 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan private object GetCachedInstance(IClassNode cn) { + //// if (cn.GetFullName().Equals(ReflectionUtilities.NonGenericFullName(typeof(IInjector)))) if (cn.GetFullName().Equals(ReflectionUtilities.GetAssemblyQualifiedName(typeof(IInjector)))) - //// if (cn.GetFullName().Equals(ReflectionUtilities.NonGenericFullName(typeof(IInjector)))) { return this.ForkInjector(); // TODO: We should be insisting on injection futures here! .forkInjector(); } @@ -509,7 +509,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan { List<InjectionPlan> sub_ips = new List<InjectionPlan>(); - #region each implementation + // each implementation foreach (IClassNode thisCN in candidateImplementations) { List<InjectionPlan> constructors = new List<InjectionPlan>(); @@ -524,13 +524,13 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan constructorList.Add(c); } - #region each constructor + // each constructor foreach (IConstructorDef def in constructorList) { List<InjectionPlan> args = new List<InjectionPlan>(); IConstructorArg[] defArgs = def.GetArgs().ToArray<IConstructorArg>(); - #region each argument + // each argument foreach (IConstructorArg arg in defArgs) { if (!arg.IsInjectionFuture()) @@ -569,18 +569,16 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan } } } - #endregion each argument Constructor constructor = new Constructor(thisCN, def, args.ToArray()); constructors.Add(constructor); } - #endregion each constructor // The constructors are embedded in a lattice defined by // isMoreSpecificThan(). We want to see if, amongst the injectable // plans, there is a unique dominant plan, and select it. // First, compute the set of injectable plans. - List<Int32> liveIndices = new List<Int32>(); + List<int> liveIndices = new List<int>(); for (int i = 0; i < constructors.Count; i++) { if (constructors[i].GetNumAlternatives() > 0) @@ -599,8 +597,9 @@ 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; } else if (cj.IsMoreSpecificThan(ci)) @@ -618,7 +617,6 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan sub_ips.Add(WrapInjectionPlans(thisCN, constructors, false, k != -1 ? liveIndices[k] : -1)); } } - #endregion each implementation return sub_ips; } @@ -935,7 +933,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan || cn.GetFullName().Equals(ReflectionUtilities.GetAssemblyQualifiedName(typeof(InjectorImpl)))) { // This would imply that we're treating injector as a singleton somewhere. It should be copied fresh each time. - Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new IllegalStateException(""), LOGGER); + Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new IllegalStateException(string.Empty), LOGGER); } try { @@ -959,7 +957,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan foreach (INamedParameterNode np in old.namedParameterInstances.Keys) { // if (!builder.namedParameters.containsKey(np)) { - Object o = null; + object o = null; old.namedParameterInstances.TryGetValue(np, out o); INamedParameterNode new_np = (INamedParameterNode)injector.classHierarchy.GetNode(np.GetFullName()); injector.namedParameterInstances.Add(new_np, o); @@ -1003,7 +1001,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan if (n is INamedParameterNode) { INamedParameterNode np = (INamedParameterNode)n; - Object old = this.configuration.GetNamedParameter(np); + object old = this.configuration.GetNamedParameter(np); if (old != null) { // XXX need to get the binding site here! http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 5cb41c9..d7994ad 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Subplan.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Subplan.cs @@ -45,12 +45,14 @@ 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(); } - else // no one was bound, but anyone could be used + else { + // no one was bound, but anyone could be used int numAlternatives = 0; foreach (InjectionPlan a in alternatives) { http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 8405557..03566a7 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/reef/blob/b73c2229/lang/cs/Org.Apache.REEF.Tang/Interface/IInjector.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang/Interface/IInjector.cs b/lang/cs/Org.Apache.REEF.Tang/Interface/IInjector.cs index cca1538..cae940e 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Interface/IInjector.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Interface/IInjector.cs @@ -75,7 +75,7 @@ namespace Org.Apache.REEF.Tang.Interface /// </summary> /// <param name="name">The name.</param> /// <returns></returns> - InjectionPlan GetInjectionPlan(String name); + InjectionPlan GetInjectionPlan(string name); /// <summary> /// Binds the aspect. @@ -105,7 +105,7 @@ namespace Org.Apache.REEF.Tang.Interface /// <returns> /// <c>true</c> if [is parameter set] [the specified name]; otherwise, <c>false</c>. /// </returns> - bool IsParameterSet(String name); + bool IsParameterSet(string name); /// <summary> /// Determines whether the specified clazz is injectable. http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 31cfd34..2442e49 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferClassHierarchy.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferClassHierarchy.cs @@ -134,7 +134,7 @@ namespace Org.Apache.REEF.Tang.Protobuf } private static Org.Apache.REEF.Tang.Protobuf.ConstructorDef newConstructorDef( - String fullClassName, IList<Org.Apache.REEF.Tang.Protobuf.ConstructorArg> args) + string fullClassName, IList<Org.Apache.REEF.Tang.Protobuf.ConstructorArg> args) { Org.Apache.REEF.Tang.Protobuf.ConstructorDef constDef = new Org.Apache.REEF.Tang.Protobuf.ConstructorDef(); constDef.full_class_name = fullClassName; @@ -146,12 +146,12 @@ namespace Org.Apache.REEF.Tang.Protobuf return constDef; } - private static Org.Apache.REEF.Tang.Protobuf.Node NewClassNode(String name, - String fullName, bool isInjectionCandidate, + private static Org.Apache.REEF.Tang.Protobuf.Node NewClassNode(string name, + string fullName, bool isInjectionCandidate, bool isExternalConstructor, bool isUnit, IList<Org.Apache.REEF.Tang.Protobuf.ConstructorDef> injectableConstructors, IList<Org.Apache.REEF.Tang.Protobuf.ConstructorDef> otherConstructors, - IList<String> implFullNames, IList<Org.Apache.REEF.Tang.Protobuf.Node> children) + IList<string> implFullNames, IList<Org.Apache.REEF.Tang.Protobuf.Node> children) { Org.Apache.REEF.Tang.Protobuf.ClassNode classNode = new Org.Apache.REEF.Tang.Protobuf.ClassNode(); classNode.is_injection_candidate = isInjectionCandidate; @@ -423,7 +423,7 @@ namespace Org.Apache.REEF.Tang.Protobuf + n.full_name + " does not exist. Full record is " + n, e); Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(ex, LOGGER); } - foreach (String impl in cn.impl_full_names) + foreach (string impl in cn.impl_full_names) { try { @@ -459,7 +459,7 @@ namespace Org.Apache.REEF.Tang.Protobuf } } - public INode GetNode(String fullName) + public INode GetNode(string fullName) { INode ret; lookupTable.TryGetValue(fullName, out ret); http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 7652e4b..ca723ed 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferInjectionPlan.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferInjectionPlan.cs @@ -190,7 +190,7 @@ namespace Org.Apache.REEF.Tang.Protobuf return null; } - private static object Parse(String type, String value) + private static object Parse(string type, string value) { // XXX this is a placeholder for now. We need a parser API that will // either produce a live java object or (partially) validate stuff to http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/lang/cs/Org.Apache.REEF.Tang/Util/AssemblyLoader.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang/Util/AssemblyLoader.cs b/lang/cs/Org.Apache.REEF.Tang/Util/AssemblyLoader.cs index c0faf59..a89b27a 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Util/AssemblyLoader.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Util/AssemblyLoader.cs @@ -82,7 +82,7 @@ namespace Org.Apache.REEF.Tang.Util /// </summary> /// <param name="path"></param> /// <returns>True, if the path given is an assembly</returns> - public static Boolean IsAssembly(string path) + public static bool IsAssembly(string path) { if (string.IsNullOrWhiteSpace(path) || Path.GetExtension(path).ToLower() != ".dll") { http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 8713a99..96abc0a 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Util/MonotonicSet.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Util/MonotonicSet.cs @@ -97,7 +97,7 @@ namespace Org.Apache.REEF.Tang.Util Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new NotSupportedException("Attempt to clear MonotonicSet!"), LOGGER); } - public bool Remove(Object o) + public bool Remove(object o) { Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new NotSupportedException("Attempt to remove " + o + " from MonotonicSet!"), LOGGER); http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 e83444d..0d5a499 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Util/MonotonicTreeMap.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Util/MonotonicTreeMap.cs @@ -36,7 +36,7 @@ namespace Org.Apache.REEF.Tang.Util try { TVal val; - if (base.TryGetValue(key, out val)) + if (TryGetValue(key, out val)) { var ex = new ArgumentException("Attempt to re-add: [" + key + "]\n old value: " + val + " new value " + value); http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 b70f48f..2cde2f3 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Util/ReflectionUtilities.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Util/ReflectionUtilities.cs @@ -214,35 +214,35 @@ namespace Org.Apache.REEF.Tang.Util { if (c == typeof(bool)) { - return typeof(Boolean); + return typeof(bool); } else if (c == typeof(byte)) { - return typeof(Byte); + return typeof(byte); } else if (c == typeof(char)) { - return typeof(Char); + return typeof(char); } else if (c == typeof(short)) { - return typeof(Int16); + return typeof(short); } else if (c == typeof(int)) { - return typeof(Int32); + return typeof(int); } else if (c == typeof(long)) { - return typeof(Int64); + return typeof(long); } else if (c == typeof(float)) { - return typeof(Single); + return typeof(float); } else if (c == typeof(double)) { - return typeof(Double); + return typeof(double); } else { @@ -486,8 +486,9 @@ 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."); Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(ex, LOGGER); http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/lang/cs/Org.Apache.REEF.Tang/Util/SetValuedKey.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang/Util/SetValuedKey.cs b/lang/cs/Org.Apache.REEF.Tang/Util/SetValuedKey.cs index c9ff5f9..508617a 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Util/SetValuedKey.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Util/SetValuedKey.cs @@ -46,7 +46,7 @@ namespace Org.Apache.REEF.Tang.Util return i; } - public override bool Equals(Object o) + public override bool Equals(object o) { SetValuedKey other = (SetValuedKey)o; if (other.key.Count != this.key.Count) http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 e51eae4..40c64b8 100644 --- a/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/HelloSimpleEventHandlers.cs +++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/HelloSimpleEventHandlers.cs @@ -422,7 +422,7 @@ namespace Org.Apache.REEF.Tests.Functional.Bridge } [NamedParameter(Documentation = "NumberOfTasks", ShortName = "NumberOfTasks", DefaultValue = "2")] - class NumberOfEvaluators : Name<Int32> + class NumberOfEvaluators : Name<int> { } http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestSimpleEventHandlers.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestSimpleEventHandlers.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestSimpleEventHandlers.cs index ec7c0b2..d40e79b 100644 --- a/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestSimpleEventHandlers.cs +++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestSimpleEventHandlers.cs @@ -78,7 +78,7 @@ namespace Org.Apache.REEF.Tests.Functional.Bridge .BindSetEntry<DriverBridgeConfigurationOptions.SetOfAssemblies, string>(typeof(HelloTask).Assembly.GetName().Name) .BindSetEntry<DriverBridgeConfigurationOptions.SetOfAssemblies, string>(typeof(NameClient).Assembly.GetName().Name) .BindNamedParameter<IsRetain, bool>(GenericType<IsRetain>.Class, "false") - .BindNamedParameter<NumberOfEvaluators, Int32>(GenericType<NumberOfEvaluators>.Class, "1") + .BindNamedParameter<NumberOfEvaluators, int>(GenericType<NumberOfEvaluators>.Class, "1") .Build(); } } http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs index a2db605..ee49049 100644 --- a/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs +++ b/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs @@ -256,12 +256,10 @@ namespace Org.Apache.REEF.Tests.Functional private static string GetStorageConnectionString() { var accountName = GetEnvironmentVariable(StorageAccountNameEnvironmentVariable, - "Please set " + StorageAccountNameEnvironmentVariable + - " to the storage account name to be used for the tests"); + "Please set " + StorageAccountNameEnvironmentVariable + " to the storage account name to be used for the tests"); var accountKey = GetEnvironmentVariable(StorageAccountKeyEnvironmentVariable, - "Please set " + StorageAccountKeyEnvironmentVariable + - " to the key of the storage account to be used for the tests"); + "Please set " + StorageAccountKeyEnvironmentVariable + " to the key of the storage account to be used for the tests"); var result = @"DefaultEndpointsProtocol=https;AccountName=" + accountName + ";AccountKey=" + accountKey; return result; http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/DefaultRemoteManager.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/DefaultRemoteManager.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/DefaultRemoteManager.cs index 105a11e..c58c2cf 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/DefaultRemoteManager.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/DefaultRemoteManager.cs @@ -148,10 +148,10 @@ namespace Org.Apache.REEF.Wake.Remote.Impl { TransportClient<IRemoteEvent<T>> client = new TransportClient<IRemoteEvent<T>>(remoteEndpoint, _codec, _observerContainer); - LOGGER.Log(Level.Info, - String.Format("NewClientConnection: Local {0} connected to Remote {1}", + var msg = string.Format("NewClientConnection: Local {0} connected to Remote {1}", client.Link.LocalEndpoint.ToString(), - client.Link.RemoteEndpoint.ToString())); + client.Link.RemoteEndpoint.ToString()); + LOGGER.Log(Level.Info, msg); remoteObserver = new ProxyObserver(client); _cachedClients[remoteEndpoint] = remoteObserver; http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 8fb2b46..26ff848 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataReader.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataReader.cs @@ -139,8 +139,8 @@ namespace Org.Apache.REEF.Wake.Remote.Impl /// <returns>read short</returns> public short ReadInt16() { - byte[] intBytes = new byte[sizeof(Int16)]; - int readBytes = Read(ref intBytes, 0, sizeof(Int16)); + byte[] intBytes = new byte[sizeof(short)]; + int readBytes = Read(ref intBytes, 0, sizeof(short)); if (readBytes == -1) { @@ -293,8 +293,8 @@ namespace Org.Apache.REEF.Wake.Remote.Impl /// <returns>Task handler that reads short</returns> public async Task<short> ReadInt16Async(CancellationToken token) { - byte[] intBytes = new byte[sizeof(Int16)]; - int readBytes = await ReadAsync(intBytes, 0, sizeof(Int16), token); + byte[] intBytes = new byte[sizeof(short)]; + int readBytes = await ReadAsync(intBytes, 0, sizeof(short), token); if (readBytes == -1) { http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 8f1e5e3..18136d7 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingTransportServer.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingTransportServer.cs @@ -110,7 +110,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl Exceptions.Throw(exception, "Could not find a port to listen on", LOGGER); } LOGGER.Log(Level.Info, - String.Format("Listening on {0}", _listener.LocalEndpoint.ToString())); + string.Format("Listening on {0}", _listener.LocalEndpoint.ToString())); } /// <summary> http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/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 7d5f47e..bddedea 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/TransportServer.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/TransportServer.cs @@ -115,7 +115,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl Exceptions.Throw(exception, "Could not find a port to listen on", LOGGER); } LOGGER.Log(Level.Info, - String.Format("Listening on {0}", _listener.LocalEndpoint.ToString())); + string.Format("Listening on {0}", _listener.LocalEndpoint.ToString())); } /// <summary> http://git-wip-us.apache.org/repos/asf/reef/blob/b73c2229/lang/cs/Settings.StyleCop ---------------------------------------------------------------------- diff --git a/lang/cs/Settings.StyleCop b/lang/cs/Settings.StyleCop index 1c50578..aec28fd 100644 --- a/lang/cs/Settings.StyleCop +++ b/lang/cs/Settings.StyleCop @@ -552,12 +552,12 @@ under the License. <Rules> <Rule Name="CommentsMustContainText"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="DoNotPrefixCallsWithBaseUnlessLocalImplementationExists"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="PrefixLocalCallsWithThis"> @@ -572,27 +572,27 @@ under the License. </Rule> <Rule Name="OpeningParenthesisMustBeOnDeclarationLine"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="ClosingParenthesisMustBeOnLineOfLastParameter"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="ClosingParenthesisMustBeOnLineOfOpeningParenthesis"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="CommaMustBeOnSameLineAsPreviousParameter"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="ParameterListMustFollowDeclaration"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="ParameterMustFollowComma"> @@ -612,67 +612,67 @@ under the License. </Rule> <Rule Name="ParameterMustNotSpanMultipleLines"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="QueryClauseMustFollowPreviousClause"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="QueryClausesMustBeOnSeparateLinesOrAllOnOneLine"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="QueryClausesSpanningMultipleLinesMustBeginOnOwnLine"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="DoNotPlaceRegionsWithinElements"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="CodeMustNotContainEmptyStatements"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="CodeMustNotContainMultipleStatementsOnOneLine"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="BlockStatementsMustNotContainEmbeddedComments"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="BlockStatementsMustNotContainEmbeddedRegions"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="UseStringEmptyForEmptyStrings"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="UseBuiltInTypeAlias"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> <Rule Name="UseShorthandForNullableTypes"> <RuleSettings> - <BooleanProperty Name="Enabled">False</BooleanProperty> + <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> </Rules>
