using System; namespace System.ComponentModel { /// Specifies whether the property this attribute is bound to is read-only or read/write. This class cannot be inherited // Token: 0x020000B7 RID: 183 [AttributeUsage(AttributeTargets.All)] public sealed class ReadOnlyAttribute : Attribute { /// Initializes a new instance of the class. /// true to show that the property this attribute is bound to is read-only; false to show that the property is read/write. // Token: 0x06000624 RID: 1572 RVA: 0x0000FC1C File Offset: 0x0000DE1C public ReadOnlyAttribute(bool read_only) { this.read_only = read_only; } /// Gets a value indicating whether the property this attribute is bound to is read-only. /// true if the property this attribute is bound to is read-only; false if the property is read/write. // Token: 0x1700019B RID: 411 // (get) Token: 0x06000626 RID: 1574 RVA: 0x0000FC50 File Offset: 0x0000DE50 public bool IsReadOnly { get { return this.read_only; } } /// Returns the hash code for this instance. /// A hash code for the current . // Token: 0x06000627 RID: 1575 RVA: 0x0000FC58 File Offset: 0x0000DE58 public override int GetHashCode() { return this.read_only.GetHashCode(); } /// Indicates whether this instance and a specified object are equal. /// true if is equal to this instance; otherwise, false. /// Another object to compare to. // Token: 0x06000628 RID: 1576 RVA: 0x0000FC68 File Offset: 0x0000DE68 public override bool Equals(object o) { return o is ReadOnlyAttribute && ((ReadOnlyAttribute)o).IsReadOnly.Equals(this.read_only); } /// Determines if this attribute is the default. /// true if the attribute is the default value for this attribute class; otherwise, false. // Token: 0x06000629 RID: 1577 RVA: 0x0000FC9C File Offset: 0x0000DE9C public override bool IsDefaultAttribute() { return this.Equals(ReadOnlyAttribute.Default); } // Token: 0x040001C3 RID: 451 private bool read_only; /// Specifies that the property this attribute is bound to is read/write and can be modified. This static field is read-only. // Token: 0x040001C4 RID: 452 public static readonly ReadOnlyAttribute No = new ReadOnlyAttribute(false); /// Specifies that the property this attribute is bound to is read-only and cannot be modified in the server explorer. This static field is read-only. // Token: 0x040001C5 RID: 453 public static readonly ReadOnlyAttribute Yes = new ReadOnlyAttribute(true); /// Specifies the default value for the , which is (that is, the property this attribute is bound to is read/write). This static field is read-only. // Token: 0x040001C6 RID: 454 public static readonly ReadOnlyAttribute Default = new ReadOnlyAttribute(false); } }