mscorlib(4.0.0.0) API with additions
LocalizableAttribute.cs
1 namespace System.ComponentModel
2 {
4  [AttributeUsage(AttributeTargets.All)]
5  public sealed class LocalizableAttribute : Attribute
6  {
7  private bool isLocalizable;
8 
10  public static readonly LocalizableAttribute Yes = new LocalizableAttribute(isLocalizable: true);
11 
13  public static readonly LocalizableAttribute No = new LocalizableAttribute(isLocalizable: false);
14 
16  public static readonly LocalizableAttribute Default = No;
17 
21  public bool IsLocalizable => isLocalizable;
22 
26  public LocalizableAttribute(bool isLocalizable)
27  {
28  this.isLocalizable = isLocalizable;
29  }
30 
34  public override bool IsDefaultAttribute()
35  {
37  }
38 
43  public override bool Equals(object obj)
44  {
45  LocalizableAttribute localizableAttribute = obj as LocalizableAttribute;
46  if (localizableAttribute != null)
47  {
48  return localizableAttribute.IsLocalizable == isLocalizable;
49  }
50  return false;
51  }
52 
55  public override int GetHashCode()
56  {
57  return base.GetHashCode();
58  }
59  }
60 }
override int GetHashCode()
Returns the hash code for this instance.
static readonly LocalizableAttribute Yes
Specifies that a property should be localized. This static field is read-only.
bool IsLocalizable
Gets a value indicating whether a property should be localized.
Represents the base class for custom attributes.
Definition: Attribute.cs:15
override bool Equals(object obj)
Returns whether the value of the given object is equal to the current T:System.ComponentModel....
Specifies whether a property should be localized. This class cannot be inherited.
static readonly LocalizableAttribute No
Specifies that a property should not be localized. This static field is read-only.
static readonly LocalizableAttribute Default
Specifies the default value, which is F:System.ComponentModel.LocalizableAttribute....
LocalizableAttribute(bool isLocalizable)
Initializes a new instance of the T:System.ComponentModel.LocalizableAttribute class.
AttributeTargets
Specifies the application elements on which it is valid to apply an attribute.
override bool IsDefaultAttribute()
Determines if this attribute is the default.