Merge pull request #1504 from madrang/SafeHandle.SetInvalidRelease
[mono.git] / mcs / class / System.Data / ReferenceSources / BidMethodAttribute.cs
1 using System;
2
3 /// <summary>
4 /// This attribute is used by FxCopBid rule to mark methods that accept format string and list of arguments that match it
5 /// FxCopBid rule uses this attribute to check if the method needs to be included in checks and to read type mappings
6 /// between the argument type to printf Type spec.
7 /// 
8 /// If you need to rename/remove the attribute or change its properties, make sure to update the FxCopBid rule!
9 /// </summary>
10 [System.Diagnostics.ConditionalAttribute("CODE_ANALYSIS")]
11 [System.AttributeUsage(AttributeTargets.Method)]
12 internal sealed class BidMethodAttribute : Attribute
13 {
14     private bool m_enabled;
15
16     /// <summary>
17     /// enabled by default
18     /// </summary>
19     internal BidMethodAttribute()
20     {
21         m_enabled = true;
22     }
23
24     /// <summary>
25     /// if Enabled is true, FxCopBid rule will validate all calls to this method and require that it will have string argument;
26     /// otherwise, this method is ignored.
27     /// </summary>
28     public bool Enabled {
29         get
30         {
31             return m_enabled;
32         }
33         set
34         {
35             m_enabled = value;
36         }
37     }
38 }