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

« back to all changes in this revision

Viewing changes to gendarme/rules/Gendarme.Rules.Design/TypesWithNativeFieldsShouldBeDisposableRule.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:
35
35
namespace Gendarme.Rules.Design {
36
36
 
37
37
        /// <summary>
38
 
        /// The rule inspects all fields inside a type for it's use of specific native types, 
39
 
        /// like <c>IntPtr</c>, <c>UIntPtr</c> and <c>HandleRef</c>. If used the rule warns if 
40
 
        /// the type itself doesn't implement <c>System.IDisposable</c>.
 
38
        /// This rule will fire if a type contains <c>IntPtr</c>, <c>UIntPtr</c>, or 
 
39
        /// <c>HandleRef</c> fields but does not implement <c>System.IDisposable</c>.
41
40
        /// </summary>
42
41
        /// <example>
43
42
        /// Bad examples:
69
68
        /// </example>
70
69
 
71
70
        [Problem ("This type contains native field(s) but doesn't implement IDisposable.")]
72
 
        [Solution ("Implement IDisposable and free the native field(s) in it's Dispose method.")]
 
71
        [Solution ("Implement IDisposable and free the native field(s) in the Dispose method.")]
73
72
        [FxCopCompatibility ("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")]
74
73
        public class TypesWithNativeFieldsShouldBeDisposableRule : Rule, ITypeRule {
75
74