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

71 lines
3.1 KiB
C#

using System;
namespace System.ComponentModel
{
/// <summary>Specifies whether a property should be localized. This class cannot be inherited.</summary>
// Token: 0x020000AA RID: 170
[AttributeUsage(AttributeTargets.All)]
public sealed class LocalizableAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.LocalizableAttribute" /> class.</summary>
/// <param name="isLocalizable">true if a property should be localized; otherwise, false. </param>
// Token: 0x06000579 RID: 1401 RVA: 0x0000E4DC File Offset: 0x0000C6DC
public LocalizableAttribute(bool localizable)
{
this.localizable = localizable;
}
/// <summary>Gets a value indicating whether a property should be localized.</summary>
/// <returns>true if a property should be localized; otherwise, false.</returns>
// Token: 0x1700016E RID: 366
// (get) Token: 0x0600057B RID: 1403 RVA: 0x0000E510 File Offset: 0x0000C710
public bool IsLocalizable
{
get
{
return this.localizable;
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.LocalizableAttribute" />.</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: 0x0600057C RID: 1404 RVA: 0x0000E518 File Offset: 0x0000C718
public override bool Equals(object obj)
{
return obj is LocalizableAttribute && (obj == this || ((LocalizableAttribute)obj).IsLocalizable == this.localizable);
}
/// <summary>Returns the hash code for this instance.</summary>
/// <returns>A hash code for the current <see cref="T:System.ComponentModel.LocalizableAttribute" />.</returns>
// Token: 0x0600057D RID: 1405 RVA: 0x0000E544 File Offset: 0x0000C744
public override int GetHashCode()
{
return this.localizable.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: 0x0600057E RID: 1406 RVA: 0x0000E554 File Offset: 0x0000C754
public override bool IsDefaultAttribute()
{
return this.localizable == LocalizableAttribute.Default.IsLocalizable;
}
// Token: 0x040001A1 RID: 417
private bool localizable;
/// <summary>Specifies the default value, which is <see cref="F:System.ComponentModel.LocalizableAttribute.No" />. This static field is read-only.</summary>
// Token: 0x040001A2 RID: 418
public static readonly LocalizableAttribute Default = new LocalizableAttribute(false);
/// <summary>Specifies that a property should not be localized. This static field is read-only.</summary>
// Token: 0x040001A3 RID: 419
public static readonly LocalizableAttribute No = new LocalizableAttribute(false);
/// <summary>Specifies that a property should be localized. This static field is read-only.</summary>
// Token: 0x040001A4 RID: 420
public static readonly LocalizableAttribute Yes = new LocalizableAttribute(true);
}
}