Files
Dec2017-Script-Dump/System/ComponentModel/NotifyParentPropertyAttribute.cs
2026-06-04 11:42:34 +02:00

71 lines
3.5 KiB
C#

using System;
namespace System.ComponentModel
{
/// <summary>Indicates that the parent property is notified when the value of the property that this attribute is applied to is modified. This class cannot be inherited.</summary>
// Token: 0x020000B0 RID: 176
[AttributeUsage(AttributeTargets.Property)]
public sealed class NotifyParentPropertyAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.NotifyParentPropertyAttribute" /> class, using the specified value to determine whether the parent property is notified of changes to the value of the property.</summary>
/// <param name="notifyParent">true if the parent should be notified of changes; otherwise, false. </param>
// Token: 0x060005B0 RID: 1456 RVA: 0x0000EBAC File Offset: 0x0000CDAC
public NotifyParentPropertyAttribute(bool notifyParent)
{
this.notifyParent = notifyParent;
}
/// <summary>Gets or sets a value indicating whether the parent property should be notified of changes to the value of the property.</summary>
/// <returns>true if the parent property should be notified of changes; otherwise, false.</returns>
// Token: 0x1700017E RID: 382
// (get) Token: 0x060005B2 RID: 1458 RVA: 0x0000EBE0 File Offset: 0x0000CDE0
public bool NotifyParent
{
get
{
return this.notifyParent;
}
}
/// <summary>Gets a value indicating whether the specified object is the same as the current object.</summary>
/// <returns>true if the object is the same as this object; otherwise, false.</returns>
/// <param name="obj">The object to test for equality. </param>
// Token: 0x060005B3 RID: 1459 RVA: 0x0000EBE8 File Offset: 0x0000CDE8
public override bool Equals(object obj)
{
return obj is NotifyParentPropertyAttribute && (obj == this || ((NotifyParentPropertyAttribute)obj).NotifyParent == this.notifyParent);
}
/// <summary>Gets the hash code for this object.</summary>
/// <returns>The hash code for the object the attribute belongs to.</returns>
// Token: 0x060005B4 RID: 1460 RVA: 0x0000EC14 File Offset: 0x0000CE14
public override int GetHashCode()
{
return this.notifyParent.GetHashCode();
}
/// <summary>Gets a value indicating whether the current value of the attribute is the default value for the attribute.</summary>
/// <returns>true if the current value of the attribute is the default value of the attribute; otherwise, false.</returns>
// Token: 0x060005B5 RID: 1461 RVA: 0x0000EC24 File Offset: 0x0000CE24
public override bool IsDefaultAttribute()
{
return this.notifyParent == NotifyParentPropertyAttribute.Default.NotifyParent;
}
// Token: 0x040001B0 RID: 432
private bool notifyParent;
/// <summary>Indicates the default attribute state, that the property should not notify the parent property of changes to its value. This field is read-only.</summary>
// Token: 0x040001B1 RID: 433
public static readonly NotifyParentPropertyAttribute Default = new NotifyParentPropertyAttribute(false);
/// <summary>Indicates that the parent property is not be notified of changes to the value of the property. This field is read-only.</summary>
// Token: 0x040001B2 RID: 434
public static readonly NotifyParentPropertyAttribute No = new NotifyParentPropertyAttribute(false);
/// <summary>Indicates that the parent property is notified of changes to the value of the property. This field is read-only.</summary>
// Token: 0x040001B3 RID: 435
public static readonly NotifyParentPropertyAttribute Yes = new NotifyParentPropertyAttribute(true);
}
}