Files
2026-06-04 11:42:34 +02:00

55 lines
2.3 KiB
C#

using System;
namespace System.ComponentModel
{
/// <summary>Specifies the default property for a component.</summary>
// Token: 0x0200006D RID: 109
[AttributeUsage(AttributeTargets.Class)]
public sealed class DefaultPropertyAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultPropertyAttribute" /> class.</summary>
/// <param name="name">The name of the default property for the component this attribute is bound to. </param>
// Token: 0x060003FA RID: 1018 RVA: 0x0000C188 File Offset: 0x0000A388
public DefaultPropertyAttribute(string name)
{
this.property_name = name;
}
/// <summary>Gets the name of the default property for the component this attribute is bound to.</summary>
/// <returns>The name of the default property for the component this attribute is bound to. The default value is null.</returns>
// Token: 0x17000111 RID: 273
// (get) Token: 0x060003FC RID: 1020 RVA: 0x0000C1A8 File Offset: 0x0000A3A8
public string Name
{
get
{
return this.property_name;
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DefaultPropertyAttribute" />.</summary>
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
/// <param name="obj">The object to test the value equality of. </param>
// Token: 0x060003FD RID: 1021 RVA: 0x0000C1B0 File Offset: 0x0000A3B0
public override bool Equals(object o)
{
return o is DefaultPropertyAttribute && ((DefaultPropertyAttribute)o).Name == this.property_name;
}
/// <summary>Returns the hash code for this instance.</summary>
/// <returns>A 32-bit signed integer hash code.</returns>
// Token: 0x060003FE RID: 1022 RVA: 0x0000C1D8 File Offset: 0x0000A3D8
public override int GetHashCode()
{
return base.GetHashCode();
}
// Token: 0x04000149 RID: 329
private string property_name;
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.DefaultPropertyAttribute" />, which is null. This static field is read-only.</summary>
// Token: 0x0400014A RID: 330
public static readonly DefaultPropertyAttribute Default = new DefaultPropertyAttribute(null);
}
}