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

« back to all changes in this revision

Viewing changes to gendarme/rules/Gendarme.Rules.Correctness/MethodCanBeMadeStaticRule.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:
40
40
        /// <summary>
41
41
        /// This rule checks for methods that do not require anything from the current
42
42
        /// instance. Those methods can be converted into static methods, which helps
43
 
        /// a bit the performance (the hidden <c>this</c> parameter can be omitted),
44
 
        /// and clarify the API.
 
43
        /// a bit with performance (the hidden <c>this</c> parameter can be omitted),
 
44
        /// and clarifies the API.
45
45
        /// </summary>
46
46
        /// <example>
47
47
        /// Bad example:
51
51
        ///     
52
52
        ///     bool Valid (int value)
53
53
        ///     {
54
 
        ///             // the validation has no need to know the instance values
 
54
        ///             // no instance members are used
55
55
        ///             return (value > 0);
56
56
        ///     }
57
57
        ///     
88
88
        /// </example>
89
89
 
90
90
        [Problem ("This method does not use any instance fields, properties or methods and can be made static.")]
91
 
        [Solution ("Make this method static.")]
 
91
        [Solution ("Make the method static.")]
92
92
        [EngineDependency (typeof (OpCodeEngine))]
93
93
        [FxCopCompatibility ("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
94
94
        public class MethodCanBeMadeStaticRule : Rule, IMethodRule {