using System;
namespace System.ComponentModel
{
/// Specifies whether a property can only be set at design time.
// Token: 0x02000070 RID: 112
[AttributeUsage(AttributeTargets.All)]
public sealed class DesignOnlyAttribute : Attribute
{
/// Initializes a new instance of the class.
/// true if a property can be set only at design time; false if the property can be set at design time and at run time.
// Token: 0x06000417 RID: 1047 RVA: 0x0000C448 File Offset: 0x0000A648
public DesignOnlyAttribute(bool design_only)
{
this.design_only = design_only;
}
/// Gets a value indicating whether a property can be set only at design time.
/// true if a property can be set only at design time; otherwise, false.
// Token: 0x17000115 RID: 277
// (get) Token: 0x06000419 RID: 1049 RVA: 0x0000C47C File Offset: 0x0000A67C
public bool IsDesignOnly
{
get
{
return this.design_only;
}
}
/// Returns whether the value of the given object is equal to the current .
/// true if the value of the given object is equal to that of the current; otherwise, false.
/// The object to test the value equality of.
// Token: 0x0600041A RID: 1050 RVA: 0x0000C484 File Offset: 0x0000A684
public override bool Equals(object obj)
{
return obj is DesignOnlyAttribute && (obj == this || ((DesignOnlyAttribute)obj).IsDesignOnly == this.design_only);
}
// Token: 0x0600041B RID: 1051 RVA: 0x0000C4B0 File Offset: 0x0000A6B0
public override int GetHashCode()
{
return this.design_only.GetHashCode();
}
/// Determines if this attribute is the default.
/// true if the attribute is the default value for this attribute class; otherwise, false.
// Token: 0x0600041C RID: 1052 RVA: 0x0000C4C0 File Offset: 0x0000A6C0
public override bool IsDefaultAttribute()
{
return this.design_only == DesignOnlyAttribute.Default.IsDesignOnly;
}
// Token: 0x0400014E RID: 334
private bool design_only;
/// Specifies the default value for the , which is . This static field is read-only.
// Token: 0x0400014F RID: 335
public static readonly DesignOnlyAttribute Default = new DesignOnlyAttribute(false);
/// Specifies that a property can be set at design time or at run time. This static field is read-only.
// Token: 0x04000150 RID: 336
public static readonly DesignOnlyAttribute No = new DesignOnlyAttribute(false);
/// Specifies that a property can be set only at design time. This static field is read-only.
// Token: 0x04000151 RID: 337
public static readonly DesignOnlyAttribute Yes = new DesignOnlyAttribute(true);
}
}