 |
 |
DefaultSerialiserFactory - #Create(Exortech.NetReflector.Util.ReflectorMember,Exortech.NetReflector.ReflectorPropertyAttribute) |
Breaking |
95 %
|
Parameter names should match base declaration |
|
| Rule: |
Parameter names should match base declaration |
| Check Id: |
CA1725 |
| Category: |
Microsoft.Naming |
| Description: |
For usability reasons, parameter names in overridden methods should match those of the base declaration. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\DefaultSerialiserFactory.cs at line 9 |
| Resolution: |
In member 'DefaultSerialiserFactory.Create(ReflectorMember, ReflectorPropertyAttribute)', change parameter name 'member' to 'memberInfo' in order to match the identifier as it has been declared in 'ISerialiserFactory.Create(ReflectorMember, ReflectorPropertyAttribute)'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182251(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
InvalidNodeEventArgs - #.ctor(System.Xml.XmlNode,System.String) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\InvalidNodeEvent.cs at line 13 |
| Resolution: |
Modify member 'InvalidNodeEventArgs.InvalidNodeEventArgs(XmlNode, string)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
InvalidNodeEventArgs - #Message |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'InvalidNodeEventArgs.Message' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
InvalidNodeEventArgs - #Node |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'InvalidNodeEventArgs.Node' or change the field to one that is an immutable reference type. If the reference type 'XmlNode' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
InvalidNodeEventArgs - #Node |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'InvalidNodeEventArgs.Node' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
InvalidNodeEventArgs - #Node |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
|
| Resolution: |
Modify member 'InvalidNodeEventArgs.Node' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
InvalidNodeEventArgs - #ToString() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\InvalidNodeEvent.cs at line 21 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'InvalidNodeEventArgs.ToString()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
IXmlSerialiser - #Read(System.Xml.XmlNode,Exortech.NetReflector.NetReflectorTypeTable) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
|
| Resolution: |
Modify member 'IXmlSerialiser.Read(XmlNode, NetReflectorTypeTable)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Exortech.NetReflector - NetReflector |
Breaking |
90 %
|
Static holder types should not have constructors |
|
| Rule: |
Static holder types should not have constructors |
| Check Id: |
CA1053 |
| Category: |
Microsoft.Design |
| Description: |
Instances of types that define only static members do not need to be created. Many compilers will automatically add a public default constructor if no constructor is specified. To prevent this, adding an empty private constructor may be required. |
| Found at: |
|
| Resolution: |
Remove the public constructors from 'NetReflector'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182169(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Exortech.NetReflector - NetReflector |
Breaking |
95 %
|
Type names should not match namespaces |
|
| Rule: |
Type names should not match namespaces |
| Check Id: |
CA1724 |
| Category: |
Microsoft.Naming |
| Description: |
Identifiers which conflict in whole or in part with namespace names should be avoided. Names that describe the purpose or contents of a type are preferred. |
| Found at: |
|
| Resolution: |
The type name 'NetReflector' conflicts in whole or in part with the namespace name 'Exortech.NetReflector'. Change either name to eliminate the conflict. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182257(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflector - #CheckNull(System.Object,System.String,System.Type) |
Breaking |
50 %
|
Consider passing base types as parameters |
|
| Rule: |
Consider passing base types as parameters |
| Check Id: |
CA1011 |
| Category: |
Microsoft.Design |
| Description: |
Using base types as parameters to methods improves re-use of these methods if you only use methods & properties from the parameter's base class. E.g. use Stream instead of FileStream as a parameter when only calling Stream.Read(), this makes the method work on all kind of streams instead of just File streams. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs at line 194 |
| Resolution: |
Consider changing the type of parameter 'expected' in 'NetReflector.CheckNull(object, string, Type)' from 'Type' to its base type 'MemberInfo'. This method appears to only require base class members in its implementation. Suppress this violation if there is a compelling reason to require the more derived type in the method signature. |
| Help Link: |
http://msdn2.microsoft.com/library/3hk32yyz(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflector - #CheckNull(System.Object,System.String,System.Type) |
Breaking |
75 %
|
Identifiers should not contain type names |
|
| Rule: |
Identifiers should not contain type names |
| Check Id: |
CA1720 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid using language-specific types name in parameters and members and data type identifiers in parameters. Types names might not be intuitive for all developers. It is recommended that you select a generic name, such as 'value', instead. If this is not sufficient, be sure to use the type name as it is defined in the .NET Framework Library and avoid language-specific type names completely. Some examples of C#-specific type names are 'float' (use 'Single' if a generic name is not sufficient), and 'ulong' (use 'UInt64' if a generic name is not sufficient). |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs at line 194 |
| Resolution: |
In member 'NetReflector.CheckNull(object, string, Type)', consider replacing the data type identifier 'obj' in parameter name 'obj' with a more generic term, such as 'value'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182234(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflector - #CheckNull(System.Object,System.String,System.Type) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs at line 197 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'NetReflector.CheckNull(object, string, Type)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflector - #Read(System.Xml.XmlNode) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs at line 154 |
| Resolution: |
Modify member 'NetReflector.Read(XmlNode)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflector - #Read(System.Xml.XmlNode,Exortech.NetReflector.NetReflectorTypeTable) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs at line 159 |
| Resolution: |
Modify member 'NetReflector.Read(XmlNode, NetReflectorTypeTable)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflector - #Read(System.Xml.XmlNode,System.Object) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs at line 184 |
| Resolution: |
Modify member 'NetReflector.Read(XmlNode, object)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflector - #Read(System.Xml.XmlNode,System.Object,Exortech.NetReflector.NetReflectorTypeTable) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs at line 189 |
| Resolution: |
Modify member 'NetReflector.Read(XmlNode, object, NetReflectorTypeTable)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflector - #Write(System.Object) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs at line 108 |
| Resolution: |
Because the behavior of 'StringWriter.StringWriter()' could vary based on the current user's locale settings, replace this call in 'NetReflector.Write(object)' with a call to 'StringWriter.StringWriter(IFormatProvider)'. If the result of 'StringWriter.StringWriter(IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Exortech.NetReflector - NetReflectorException |
Breaking |
75 %
|
Types should not extend certain base types |
|
| Rule: |
Types should not extend certain base types |
| Check Id: |
CA1058 |
| Category: |
Microsoft.Design |
| Description: |
It is best not to extend some base types or to prefer extending better alternatives to those base types. |
| Found at: |
|
| Resolution: |
Change the base type of 'NetReflectorException' so that it no longer extends 'ApplicationException'. This base exception type does not provide any additional value for framework classes. Extend 'System.Exception' or an existing unsealed exception type instead. Do not create a new exception base type unless there is specific value in enabling the creation of a catch handler for an entire class of exceptions. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182171(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflectorReader - #Read(System.Xml.XmlNode) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs at line 67 |
| Resolution: |
Modify member 'NetReflectorReader.Read(XmlNode)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflectorReader - #Read(System.Xml.XmlNode) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs at line 72 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'NetReflectorReader.Read(XmlNode)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflectorReader - #Read(System.Xml.XmlNode,System.Object) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs at line 96 |
| Resolution: |
Modify member 'NetReflectorReader.Read(XmlNode, object)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Exortech.NetReflector - NetReflectorTypeTable |
NonBreaking |
60 %
|
Collections should implement generic interface |
|
| Rule: |
Collections should implement generic interface |
| Check Id: |
CA1010 |
| Category: |
Microsoft.Design |
| Description: |
Non-generic strongly typed collections should implement one of the generic collection interfaces. This will allow better integration of the collection with generic API. |
| Found at: |
|
| Resolution: |
'NetReflectorTypeTable' appears to be a non-generic, strongly typed collection. Add an implementation to the instance of IEnumerable<T> where T is the underlying element type of 'NetReflectorTypeTable'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182132(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflectorTypeTable - #Add(System.String) |
Breaking |
80 %
|
Compound words should be cased correctly |
|
| Rule: |
Compound words should be cased correctly |
| Check Id: |
CA1702 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflectorTypeTable.cs at line 85 |
| Resolution: |
In member 'NetReflectorTypeTable.Add(string)', the discrete term 'Filename' in parameter name 'assemblyFilename' should be expressed as a compound word, 'FileName'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264474(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflectorTypeTable - #Add(System.Type) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflectorTypeTable.cs at line 51 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object, object)' could vary based on the current user's locale settings, replace this call in 'NetReflectorTypeTable.Add(Type)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflectorTypeTable - #GetTypes(System.Reflection.Assembly) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflectorTypeTable.cs at line 65 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'NetReflectorTypeTable.GetTypes(Assembly)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflectorTypeTable - #InvalidNode |
Breaking |
95 %
|
Declare event handlers correctly |
|
| Rule: |
Declare event handlers correctly |
| Check Id: |
CA1009 |
| Category: |
Microsoft.Design |
| Description: |
By convention, .NET events have two parameters that specify the event sender and event data. Event handler signatures should follow this form: void MyEventHandler(object sender, EventArgs e). The 'sender' parameter is always of type System.Object, even if it is possible to employ a more specific type. The 'e' parameter is always of type System.EventArgs. Events that do not provide event data should use the System.EventHandler delegate type. Event handlers return void so that they can send each event to multiple target methods. Any value returned by a target would be lost after the first call. |
| Found at: |
|
| Resolution: |
Declare the first parameter of 'InvalidNodeEventHandler' as an object named 'sender'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182133(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Exortech.NetReflector - NetReflectorWriter |
DependsOnFix |
95 %
|
Types that own disposable fields should be disposable |
|
| Rule: |
Types that own disposable fields should be disposable |
| Check Id: |
CA1001 |
| Category: |
Microsoft.Design |
| Description: |
Types that declare disposable members should also implement IDisposable. If the type does not own any unmanaged resources, do not implement a finalizer on it. |
| Found at: |
|
| Resolution: |
Implement IDisposable on 'NetReflectorWriter' because it creates members of the following IDisposable types: 'XmlTextWriter'. If 'NetReflectorWriter' has previously shipped, adding new members that implement IDisposable to this type is considered a breaking change to existing consumers. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182172(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflectorWriter - #Write(System.Object) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs at line 31 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'NetReflectorWriter.Write(object)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Exortech.NetReflector - ReflectionPreprocessorAttribute |
Breaking |
75 %
|
Avoid unsealed attributes |
|
| Rule: |
Avoid unsealed attributes |
| Check Id: |
CA1813 |
| Category: |
Microsoft.Performance |
| Description: |
Seal attribute types for improved performance. Sealing attribute types speeds up performance during reflection on custom attributes. |
| Found at: |
|
| Resolution: |
Seal 'ReflectionPreprocessorAttribute', if possible. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182267(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ReflectionPreprocessorAttribute - #Invoke(System.Object,Exortech.NetReflector.NetReflectorTypeTable,System.Xml.XmlNode) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectionPreprocessorAttribute.cs at line 24 |
| Resolution: |
Modify member 'ReflectionPreprocessorAttribute.Invoke(object, NetReflectorTypeTable, XmlNode)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Exortech.NetReflector - ReflectorHashAttribute |
Breaking |
95 %
|
Define accessors for attribute arguments |
|
| Rule: |
Define accessors for attribute arguments |
| Check Id: |
CA1019 |
| Category: |
Microsoft.Design |
| Description: |
Provide accessors for both named and positional arguments. Each positional argument on an attribute should declare a read-only property with the same name (but different casing). Each named argument should provide a read/write property with the same name (but different casing). |
| Found at: |
|
| Resolution: |
Remove the property setter from 'ReflectorHashAttribute.Key' or reduce its accessibility because it corresponds to positional argument 'key'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182136(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Exortech.NetReflector - ReflectorPropertyAttribute |
Breaking |
75 %
|
Avoid unsealed attributes |
|
| Rule: |
Avoid unsealed attributes |
| Check Id: |
CA1813 |
| Category: |
Microsoft.Performance |
| Description: |
Seal attribute types for improved performance. Sealing attribute types speeds up performance during reflection on custom attributes. |
| Found at: |
|
| Resolution: |
Seal 'ReflectorPropertyAttribute', if possible. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182267(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
Exortech.NetReflector - ReflectorPropertyAttribute |
Breaking |
95 %
|
Define accessors for attribute arguments |
|
| Rule: |
Define accessors for attribute arguments |
| Check Id: |
CA1019 |
| Category: |
Microsoft.Design |
| Description: |
Provide accessors for both named and positional arguments. Each positional argument on an attribute should declare a read-only property with the same name (but different casing). Each named argument should provide a read/write property with the same name (but different casing). |
| Found at: |
|
| Resolution: |
Add a public read-only property accessor for positional argument 'factoryType' of Attribute 'ReflectorPropertyAttribute'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182136(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Exortech.NetReflector - ReflectorTypeAttribute |
Breaking |
95 %
|
Define accessors for attribute arguments |
|
| Rule: |
Define accessors for attribute arguments |
| Check Id: |
CA1019 |
| Category: |
Microsoft.Design |
| Description: |
Provide accessors for both named and positional arguments. Each positional argument on an attribute should declare a read-only property with the same name (but different casing). Each named argument should provide a read/write property with the same name (but different casing). |
| Found at: |
|
| Resolution: |
Remove the property setter from 'ReflectorTypeAttribute.Name' or reduce its accessibility because it corresponds to positional argument 'name'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182136(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ReflectorTypeAttribute - #GetAttribute(System.Type) |
Breaking |
50 %
|
Consider passing base types as parameters |
|
| Rule: |
Consider passing base types as parameters |
| Check Id: |
CA1011 |
| Category: |
Microsoft.Design |
| Description: |
Using base types as parameters to methods improves re-use of these methods if you only use methods & properties from the parameter's base class. E.g. use Stream instead of FileStream as a parameter when only calling Stream.Read(), this makes the method work on all kind of streams instead of just File streams. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectorTypeAttribute.cs at line 58 |
| Resolution: |
Consider changing the type of parameter 'type' in 'ReflectorTypeAttribute.GetAttribute(Type)' from 'Type' to its base type 'MemberInfo'. This method appears to only require base class members in its implementation. Suppress this violation if there is a compelling reason to require the more derived type in the method signature. |
| Help Link: |
http://msdn2.microsoft.com/library/3hk32yyz(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlArraySerialiser - #converter |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'XmlArraySerialiser.converter' or change the field to one that is an immutable reference type. If the reference type 'ReflectorTypeConverter' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlArraySerialiser - #converter |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'XmlArraySerialiser.converter' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlArraySerialiser - #Read(System.Xml.XmlNode,System.Type,Exortech.NetReflector.NetReflectorTypeTable) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlArraySerialiser.cs at line 29 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'XmlArraySerialiser.Read(XmlNode, Type, NetReflectorTypeTable)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlArraySerialiser - #Read(System.Xml.XmlNode,System.Type,Exortech.NetReflector.NetReflectorTypeTable) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlArraySerialiser.cs at line 38 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object, object)' could vary based on the current user's locale settings, replace this call in 'XmlArraySerialiser.Read(XmlNode, Type, NetReflectorTypeTable)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlCollectionSerialiser - #elementName |
NonBreaking |
95 %
|
Use literals where appropriate |
|
| Rule: |
Use literals where appropriate |
| Check Id: |
CA1802 |
| Category: |
Microsoft.Performance |
| Description: |
Prefer literals over InitOnly fields if values do not have to be calculated at runtime. |
| Found at: |
|
| Resolution: |
Field 'XmlCollectionSerialiser.elementName' is declared as 'static readonly' but is initialized with a constant value 'string'. Mark this field as 'const' instead. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182280(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlCollectionSerialiser - #Read(System.Xml.XmlNode,System.Type,Exortech.NetReflector.NetReflectorTypeTable) |
Breaking |
95 %
|
Parameter names should match base declaration |
|
| Rule: |
Parameter names should match base declaration |
| Check Id: |
CA1725 |
| Category: |
Microsoft.Naming |
| Description: |
For usability reasons, parameter names in overridden methods should match those of the base declaration. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlCollectionSerialiser.cs at line 37 |
| Resolution: |
In member 'XmlCollectionSerialiser.Read(XmlNode, Type, NetReflectorTypeTable)', change parameter name 'node' to 'childNode' in order to match the identifier as it has been declared in 'XmlMemberSerialiser.Read(XmlNode, Type, NetReflectorTypeTable)'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182251(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlCollectionSerialiser - #Read(System.Xml.XmlNode,System.Type,Exortech.NetReflector.NetReflectorTypeTable) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlCollectionSerialiser.cs at line 49 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object, object)' could vary based on the current user's locale settings, replace this call in 'XmlCollectionSerialiser.Read(XmlNode, Type, NetReflectorTypeTable)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlDictionarySerialiser - #Read(System.Xml.XmlNode,System.Type,Exortech.NetReflector.NetReflectorTypeTable) |
Breaking |
95 %
|
Parameter names should match base declaration |
|
| Rule: |
Parameter names should match base declaration |
| Check Id: |
CA1725 |
| Category: |
Microsoft.Naming |
| Description: |
For usability reasons, parameter names in overridden methods should match those of the base declaration. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlDictionarySerialiser.cs at line 48 |
| Resolution: |
In member 'XmlDictionarySerialiser.Read(XmlNode, Type, NetReflectorTypeTable)', change parameter name 'node' to 'childNode' in order to match the identifier as it has been declared in 'XmlMemberSerialiser.Read(XmlNode, Type, NetReflectorTypeTable)'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182251(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlMemberSerialiser - #CheckIfMemberIsRequired() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlMemberSerialiser.cs at line 88 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'XmlMemberSerialiser.CheckIfMemberIsRequired()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlMemberSerialiser - #GetTargetType(System.Xml.XmlNode,Exortech.NetReflector.NetReflectorTypeTable) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlMemberSerialiser.cs at line 119 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'XmlMemberSerialiser.GetTargetType(XmlNode, NetReflectorTypeTable)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlMemberSerialiser - #Read(System.Xml.XmlNode,System.Type,Exortech.NetReflector.NetReflectorTypeTable) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlMemberSerialiser.cs at line 136 |
| Resolution: |
Modify member 'XmlMemberSerialiser.Read(XmlNode, Type, NetReflectorTypeTable)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlMemberSerialiser - #Read(System.Xml.XmlNode,System.Type,Exortech.NetReflector.NetReflectorTypeTable) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlMemberSerialiser.cs at line 168 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object, object)' could vary based on the current user's locale settings, replace this call in 'XmlMemberSerialiser.Read(XmlNode, Type, NetReflectorTypeTable)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlMemberSerialiser - #Read(System.Xml.XmlNode,System.Type,Exortech.NetReflector.NetReflectorTypeTable) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlMemberSerialiser.cs at line 141 |
| Resolution: |
Because the behavior of 'string.Format(string, params object[])' could vary based on the current user's locale settings, replace this call in 'XmlMemberSerialiser.Read(XmlNode, Type, NetReflectorTypeTable)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlMemberSerialiser - #ReadValue(System.Xml.XmlNode,Exortech.NetReflector.NetReflectorTypeTable) |
DependsOnFix |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlMemberSerialiser.cs at line 184 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'XmlMemberSerialiser.ReadValue(XmlNode, NetReflectorTypeTable)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlMemberSerialiser - #ReadValue(System.Xml.XmlNode,Exortech.NetReflector.NetReflectorTypeTable) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlMemberSerialiser.cs at line 184 |
| Resolution: |
Modify member 'XmlMemberSerialiser.ReadValue(XmlNode, NetReflectorTypeTable)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlTypeSerialiser - #GetNodeByName(System.Collections.IList,System.String) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlTypeSerialiser.cs at line 151 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'XmlTypeSerialiser.GetNodeByName(IList, string)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlTypeSerialiser - #HandleUnusedNode(Exortech.NetReflector.NetReflectorTypeTable,System.Xml.XmlNode) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlTypeSerialiser.cs at line 125 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'XmlTypeSerialiser.HandleUnusedNode(NetReflectorTypeTable, XmlNode)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlTypeSerialiser - #ReadMembers(System.Xml.XmlNode,System.Object,Exortech.NetReflector.NetReflectorTypeTable) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlTypeSerialiser.cs at line 91 |
| Resolution: |
Modify member 'XmlTypeSerialiser.ReadMembers(XmlNode, object, NetReflectorTypeTable)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlTypeSerialiser - #ReadMembers(System.Xml.XmlNode,System.Object,Exortech.NetReflector.NetReflectorTypeTable) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlTypeSerialiser.cs at line 110 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'XmlTypeSerialiser.ReadMembers(XmlNode, object, NetReflectorTypeTable)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlDocumentationGenerator - #WriteIfNotNull(System.Xml.XmlWriter,System.String,System.Type) |
Breaking |
50 %
|
Consider passing base types as parameters |
|
| Rule: |
Consider passing base types as parameters |
| Check Id: |
CA1011 |
| Category: |
Microsoft.Design |
| Description: |
Using base types as parameters to methods improves re-use of these methods if you only use methods & properties from the parameter's base class. E.g. use Stream instead of FileStream as a parameter when only calling Stream.Read(), this makes the method work on all kind of streams instead of just File streams. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XmlDocumentationGenerator.cs at line 66 |
| Resolution: |
Consider changing the type of parameter 'type' in 'XmlDocumentationGenerator.WriteIfNotNull(XmlWriter, string, Type)' from 'Type' to its base type 'MemberInfo'. This method appears to only require base class members in its implementation. Suppress this violation if there is a compelling reason to require the more derived type in the method signature. |
| Help Link: |
http://msdn2.microsoft.com/library/3hk32yyz(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
XsdGenerator - #GenerateElementType(System.Type,System.Xml.Schema.XmlSchemaElement,System.Boolean) |
NonBreaking |
95 %
|
Specify StringComparison |
|
| Rule: |
Specify StringComparison |
| Check Id: |
CA1307 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes a StringComparison argument, it should always be called in favor of an overload that does not. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XsdGenerator.cs at line 207 |
| Resolution: |
'XsdGenerator.GenerateElementType(Type, XmlSchemaElement, bool)' makes a call to 'string.EndsWith(string)' that does not explicitly provide a StringComparison. This should be replaced with a call to 'string.EndsWith(string, StringComparison)'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb386080(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
XsdGenerator - #GenerateItemName(System.Type) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XsdGenerator.cs at line 283 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'XsdGenerator.GenerateItemName(Type)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
XsdGenerator - #NamespaceUri |
Breaking |
75 %
|
URI properties should not be strings |
|
| Rule: |
URI properties should not be strings |
| Check Id: |
CA1056 |
| Category: |
Microsoft.Design |
| Description: |
If a property name contains "uri" or "url" or "urn" and it's typed as string, it should be changed to System.Uri. |
| Found at: |
|
| Resolution: |
Change the type of property 'XsdGenerator.NamespaceUri' from string to System.Uri. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182175(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
#Item[System.Type] - #get_Item(System.Type) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XsdTypes.cs at line 30 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'XsdTypes.this.get(Type)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
ReflectionUtil - #IsCommonType(System.Type) |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
The individual words that make up an identifier should not be abbreviated and should be spelled correctly. If this rule generates a false positive on a term that should be recognized, add the word to the FxCop custom dictionary. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\ReflectionUtil.cs at line 11 |
| Resolution: |
In method 'ReflectionUtil.IsCommonType(Type)', consider providing a more meaningful name than parameter name 't'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ReflectorMember+ReflectorField - #SetValue(System.Object,System.Object) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\ReflectorMember.cs at line 115 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'ReflectorMember.ReflectorField.SetValue(object, object)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
ReflectorMember+ReflectorProperty - #SetValue(System.Object,System.Object) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\ReflectorMember.cs at line 72 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'ReflectorMember.ReflectorProperty.SetValue(object, object)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
ReflectorTypeConverter - #Convert(System.Type,System.Object) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\ReflectorTypeConverter.cs at line 22 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object, object)' could vary based on the current user's locale settings, replace this call in 'ReflectorTypeConverter.Convert(Type, object)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
ReflectorTypeConverter - #IsCompatibleType(System.Type,System.Object) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\ReflectorTypeConverter.cs at line 9 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'ReflectorTypeConverter.IsCompatibleType(Type, object)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
StringUtil - #EqualsIgnoreCase(System.String,System.String) |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
The individual words that make up an identifier should not be abbreviated and should be spelled correctly. If this rule generates a false positive on a term that should be recognized, add the word to the FxCop custom dictionary. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\StringUtil.cs at line 13 |
| Resolution: |
In method 'StringUtil.EqualsIgnoreCase(string, string)', consider providing a more meaningful name than parameter name 'a'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
StringUtil - #EqualsIgnoreCase(System.String,System.String) |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
The individual words that make up an identifier should not be abbreviated and should be spelled correctly. If this rule generates a false positive on a term that should be recognized, add the word to the FxCop custom dictionary. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\StringUtil.cs at line 13 |
| Resolution: |
In method 'StringUtil.EqualsIgnoreCase(string, string)', consider providing a more meaningful name than parameter name 'b'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
StringUtil - #Format(System.String,System.Object[]) |
Breaking |
95 %
|
Parameter names should not match member names |
|
| Rule: |
Parameter names should not match member names |
| Check Id: |
CA1719 |
| Category: |
Microsoft.Naming |
| Description: |
Parameter names should be distinct from member names. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\StringUtil.cs at line 30 |
| Resolution: |
Change either member or parameter name 'format' so that one differs from the other. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182252(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
StringUtil - #Join(System.String,System.Object[]) |
Breaking |
75 %
|
Identifiers should not contain type names |
|
| Rule: |
Identifiers should not contain type names |
| Check Id: |
CA1720 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid using language-specific types name in parameters and members and data type identifiers in parameters. Types names might not be intuitive for all developers. It is recommended that you select a generic name, such as 'value', instead. If this is not sufficient, be sure to use the type name as it is defined in the .NET Framework Library and avoid language-specific type names completely. Some examples of C#-specific type names are 'float' (use 'Single' if a generic name is not sufficient), and 'ulong' (use 'UInt64' if a generic name is not sufficient). |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\StringUtil.cs at line 18 |
| Resolution: |
In member 'StringUtil.Join(string, object[])', consider replacing the data type identifier 'objects' in parameter name 'objects' with a more generic term, such as 'value'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182234(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
Exortech.NetReflector.Util - XmlElementList |
NonBreaking |
60 %
|
Collections should implement generic interface |
|
| Rule: |
Collections should implement generic interface |
| Check Id: |
CA1010 |
| Category: |
Microsoft.Design |
| Description: |
Non-generic strongly typed collections should implement one of the generic collection interfaces. This will allow better integration of the collection with generic API. |
| Found at: |
|
| Resolution: |
'XmlElementList' appears to be a non-generic, strongly typed collection. Add an implementation to the instance of IEnumerable<T> where T is the underlying element type of 'XmlElementList'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182132(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Exortech.NetReflector.Util - XmlUtil |
Breaking |
90 %
|
Static holder types should not have constructors |
|
| Rule: |
Static holder types should not have constructors |
| Check Id: |
CA1053 |
| Category: |
Microsoft.Design |
| Description: |
Instances of types that define only static members do not need to be created. Many compilers will automatically add a public default constructor if no constructor is specified. To prevent this, adding an empty private constructor may be required. |
| Found at: |
|
| Resolution: |
Remove the public constructors from 'XmlUtil'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182169(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlUtil - #GetChildNode(System.Xml.XmlNode,System.String) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\XmlUtil.cs at line 8 |
| Resolution: |
Modify member 'XmlUtil.GetChildNode(XmlNode, string)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlUtil - #ReadNode(System.String) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\XmlUtil.cs at line 14 |
| Resolution: |
Modify member 'XmlUtil.ReadNode(string)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
XmlUtil - #ReadNode(System.Xml.XmlReader) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\XmlUtil.cs at line 21 |
| Resolution: |
Modify member 'XmlUtil.ReadNode(XmlReader)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|