using System;
namespace System.ComponentModel
{
/// Specifies that an object has no subproperties capable of being edited. This class cannot be inherited.
// Token: 0x02000096 RID: 150
[AttributeUsage(AttributeTargets.All)]
public sealed class ImmutableObjectAttribute : Attribute
{
/// Initializes a new instance of the class.
/// true if the object is immutable; otherwise, false.
// Token: 0x06000508 RID: 1288 RVA: 0x0000D96C File Offset: 0x0000BB6C
public ImmutableObjectAttribute(bool immutable)
{
this.immutable = immutable;
}
/// Gets whether the object is immutable.
/// true if the object is immutable; otherwise, false.
// Token: 0x17000154 RID: 340
// (get) Token: 0x0600050A RID: 1290 RVA: 0x0000D9A0 File Offset: 0x0000BBA0
public bool Immutable
{
get
{
return this.immutable;
}
}
/// true if equals the type and value of this instance; otherwise, false.
/// An to compare with this instance or null.
// Token: 0x0600050B RID: 1291 RVA: 0x0000D9A8 File Offset: 0x0000BBA8
public override bool Equals(object obj)
{
return obj is ImmutableObjectAttribute && (obj == this || ((ImmutableObjectAttribute)obj).Immutable == this.immutable);
}
/// Returns the hash code for this instance.
/// A hash code for the current .
// Token: 0x0600050C RID: 1292 RVA: 0x0000D9D4 File Offset: 0x0000BBD4
public override int GetHashCode()
{
return this.immutable.GetHashCode();
}
/// Indicates whether the value of this instance is the default value.
/// true if this instance is the default attribute for the class; otherwise, false.
// Token: 0x0600050D RID: 1293 RVA: 0x0000D9E4 File Offset: 0x0000BBE4
public override bool IsDefaultAttribute()
{
return this.immutable == ImmutableObjectAttribute.Default.Immutable;
}
// Token: 0x0400017C RID: 380
private bool immutable;
/// Represents the default value for .
// Token: 0x0400017D RID: 381
public static readonly ImmutableObjectAttribute Default = new ImmutableObjectAttribute(false);
/// Specifies that an object has at least one editable subproperty. This static field is read-only.
// Token: 0x0400017E RID: 382
public static readonly ImmutableObjectAttribute No = new ImmutableObjectAttribute(false);
/// Specifies that an object has no subproperties that can be edited. This static field is read-only.
// Token: 0x0400017F RID: 383
public static readonly ImmutableObjectAttribute Yes = new ImmutableObjectAttribute(true);
}
}