71 lines
3.5 KiB
C#
71 lines
3.5 KiB
C#
using System;
|
|
|
|
namespace System.ComponentModel
|
|
{
|
|
/// <summary>Specifies that this property can be combined with properties belonging to other objects in a Properties window.</summary>
|
|
// Token: 0x020000AE RID: 174
|
|
[AttributeUsage(AttributeTargets.All)]
|
|
public sealed class MergablePropertyAttribute : Attribute
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.MergablePropertyAttribute" /> class.</summary>
|
|
/// <param name="allowMerge">true if this property can be combined with properties belonging to other objects in a Properties window; otherwise, false. </param>
|
|
// Token: 0x060005A6 RID: 1446 RVA: 0x0000EB00 File Offset: 0x0000CD00
|
|
public MergablePropertyAttribute(bool allowMerge)
|
|
{
|
|
this.mergable = allowMerge;
|
|
}
|
|
|
|
/// <summary>Gets a value indicating whether this property can be combined with properties belonging to other objects in a Properties window.</summary>
|
|
/// <returns>true if this property can be combined with properties belonging to other objects in a Properties window; otherwise, false.</returns>
|
|
// Token: 0x1700017D RID: 381
|
|
// (get) Token: 0x060005A8 RID: 1448 RVA: 0x0000EB34 File Offset: 0x0000CD34
|
|
public bool AllowMerge
|
|
{
|
|
get
|
|
{
|
|
return this.mergable;
|
|
}
|
|
}
|
|
|
|
/// <summary>Indicates whether this instance and a specified object are equal.</summary>
|
|
/// <returns>true if <paramref name="obj" /> is equal to this instance; otherwise, false.</returns>
|
|
/// <param name="obj">Another object to compare to. </param>
|
|
// Token: 0x060005A9 RID: 1449 RVA: 0x0000EB3C File Offset: 0x0000CD3C
|
|
public override bool Equals(object obj)
|
|
{
|
|
return obj is MergablePropertyAttribute && (obj == this || ((MergablePropertyAttribute)obj).AllowMerge == this.mergable);
|
|
}
|
|
|
|
/// <summary>Returns the hash code for this instance.</summary>
|
|
/// <returns>A hash code for the current <see cref="T:System.ComponentModel.MergablePropertyAttribute" />.</returns>
|
|
// Token: 0x060005AA RID: 1450 RVA: 0x0000EB68 File Offset: 0x0000CD68
|
|
public override int GetHashCode()
|
|
{
|
|
return this.mergable.GetHashCode();
|
|
}
|
|
|
|
/// <summary>Determines if this attribute is the default.</summary>
|
|
/// <returns>true if the attribute is the default value for this attribute class; otherwise, false.</returns>
|
|
// Token: 0x060005AB RID: 1451 RVA: 0x0000EB78 File Offset: 0x0000CD78
|
|
public override bool IsDefaultAttribute()
|
|
{
|
|
return this.mergable == MergablePropertyAttribute.Default.AllowMerge;
|
|
}
|
|
|
|
// Token: 0x040001AC RID: 428
|
|
private bool mergable;
|
|
|
|
/// <summary>Specifies the default value, which is <see cref="F:System.ComponentModel.MergablePropertyAttribute.Yes" />, that is a property can be combined with properties belonging to other objects in a Properties window. This static field is read-only.</summary>
|
|
// Token: 0x040001AD RID: 429
|
|
public static readonly MergablePropertyAttribute Default = new MergablePropertyAttribute(true);
|
|
|
|
/// <summary>Specifies that a property cannot be combined with properties belonging to other objects in a Properties window. This static field is read-only.</summary>
|
|
// Token: 0x040001AE RID: 430
|
|
public static readonly MergablePropertyAttribute No = new MergablePropertyAttribute(false);
|
|
|
|
/// <summary>Specifies that a property can be combined with properties belonging to other objects in a Properties window. This static field is read-only.</summary>
|
|
// Token: 0x040001AF RID: 431
|
|
public static readonly MergablePropertyAttribute Yes = new MergablePropertyAttribute(true);
|
|
}
|
|
}
|