82 lines
3.4 KiB
C#
82 lines
3.4 KiB
C#
using System;
|
|
|
|
namespace System.ComponentModel
|
|
{
|
|
/// <summary>Specifies the <see cref="T:System.ComponentModel.LicenseProvider" /> to use with a class. This class cannot be inherited.</summary>
|
|
// Token: 0x020000A2 RID: 162
|
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
|
|
public sealed class LicenseProviderAttribute : Attribute
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.LicenseProviderAttribute" /> class without a license provider.</summary>
|
|
// Token: 0x06000549 RID: 1353 RVA: 0x0000E11C File Offset: 0x0000C31C
|
|
public LicenseProviderAttribute()
|
|
{
|
|
this.Provider = null;
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.LicenseProviderAttribute" /> class with the specified type.</summary>
|
|
/// <param name="typeName">The fully qualified name of the license provider class. </param>
|
|
// Token: 0x0600054A RID: 1354 RVA: 0x0000E12C File Offset: 0x0000C32C
|
|
public LicenseProviderAttribute(string typeName)
|
|
{
|
|
this.Provider = Type.GetType(typeName, false);
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.LicenseProviderAttribute" /> class with the specified type of license provider.</summary>
|
|
/// <param name="type">A <see cref="T:System.Type" /> that represents the type of the license provider class. </param>
|
|
// Token: 0x0600054B RID: 1355 RVA: 0x0000E144 File Offset: 0x0000C344
|
|
public LicenseProviderAttribute(Type type)
|
|
{
|
|
this.Provider = type;
|
|
}
|
|
|
|
/// <summary>Gets the license provider that must be used with the associated class.</summary>
|
|
/// <returns>A <see cref="T:System.Type" /> that represents the type of the license provider. The default value is null.</returns>
|
|
// Token: 0x1700015E RID: 350
|
|
// (get) Token: 0x0600054D RID: 1357 RVA: 0x0000E160 File Offset: 0x0000C360
|
|
public Type LicenseProvider
|
|
{
|
|
get
|
|
{
|
|
return this.Provider;
|
|
}
|
|
}
|
|
|
|
/// <summary>Indicates a unique ID for this attribute type.</summary>
|
|
/// <returns>A unique ID for this attribute type.</returns>
|
|
// Token: 0x1700015F RID: 351
|
|
// (get) Token: 0x0600054E RID: 1358 RVA: 0x0000E168 File Offset: 0x0000C368
|
|
public override object TypeId
|
|
{
|
|
get
|
|
{
|
|
return base.ToString() + ((this.Provider == null) ? null : this.Provider.ToString());
|
|
}
|
|
}
|
|
|
|
/// <summary>Indicates whether this instance and a specified object are equal.</summary>
|
|
/// <returns>true if <paramref name="value" /> is equal to this instance; otherwise, false.</returns>
|
|
/// <param name="value">Another object to compare to. </param>
|
|
// Token: 0x0600054F RID: 1359 RVA: 0x0000E194 File Offset: 0x0000C394
|
|
public override bool Equals(object obj)
|
|
{
|
|
return obj is LicenseProviderAttribute && (obj == this || ((LicenseProviderAttribute)obj).LicenseProvider.Equals(this.Provider));
|
|
}
|
|
|
|
/// <summary>Returns the hash code for this instance.</summary>
|
|
/// <returns>A hash code for the current <see cref="T:System.ComponentModel.LicenseProviderAttribute" />.</returns>
|
|
// Token: 0x06000550 RID: 1360 RVA: 0x0000E1D0 File Offset: 0x0000C3D0
|
|
public override int GetHashCode()
|
|
{
|
|
return this.Provider.GetHashCode();
|
|
}
|
|
|
|
// Token: 0x04000185 RID: 389
|
|
private Type Provider;
|
|
|
|
/// <summary>Specifies the default value, which is no provider. This static field is read-only.</summary>
|
|
// Token: 0x04000186 RID: 390
|
|
public static readonly LicenseProviderAttribute Default = new LicenseProviderAttribute();
|
|
}
|
|
}
|