~ubuntu-branches/debian/sid/mono-tools/sid

« back to all changes in this revision

Viewing changes to gendarme/rules/Gendarme.Rules.Maintainability/PreferStringIsNullOrEmptyRule.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-09-13 09:08:47 UTC
  • mfrom: (14.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20100913090847-lhu3z021w2azaj8q
Tags: 2.6.2-3
Upload to Debian Unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
        /// <summary>
40
40
        /// This rule checks methods for cases where <c>String.IsNullOrEmpty</c> could be
41
41
        /// used instead of doing separate null and length checks. This does not affect
42
 
        /// execution nor (much) performance but it improves source code readability.
43
 
        /// This rule only applies to assemblies compiled with the .NET framework version 
44
 
        /// 2.0 (or later).
 
42
        /// execution nor performance (much) but it does improve source code readability.
 
43
        /// This rule only applies to assemblies compiled with .NET 2.0 (or later).
45
44
        /// </summary>
46
45
        /// <example>
47
46
        /// Bad example:
69
68
        /// </example>
70
69
        /// <remarks>This rule is available since Gendarme 2.0</remarks>
71
70
 
72
 
        [Problem ("This method does string null and length check which can be harder on code readability/maintainability.")]
 
71
        [Problem ("This method does both string null and length checks which can be harder on code readability/maintainability.")]
73
72
        [Solution ("Replace both checks with a single call to String.IsNullOrEmpty(string).")]
74
73
        [EngineDependency (typeof (OpCodeEngine))]
75
74
        public class PreferStringIsNullOrEmptyRule : Rule, IMethodRule {