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

92 lines
4.8 KiB
C#

using System;
using System.Runtime.Serialization;
namespace System.ComponentModel
{
/// <summary>Represents the exception thrown when a component cannot be granted a license.</summary>
// Token: 0x0200009F RID: 159
[Serializable]
public class LicenseException : SystemException
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.LicenseException" /> class for the type of component that was denied a license. </summary>
/// <param name="type">A <see cref="T:System.Type" /> that represents the type of component that was not granted a license. </param>
// Token: 0x06000531 RID: 1329 RVA: 0x0000DCB8 File Offset: 0x0000BEB8
public LicenseException(Type type)
: this(type, null)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.LicenseException" /> class for the type and the instance of the component that was denied a license.</summary>
/// <param name="type">A <see cref="T:System.Type" /> that represents the type of component that was not granted a license. </param>
/// <param name="instance">The instance of the component that was not granted a license. </param>
// Token: 0x06000532 RID: 1330 RVA: 0x0000DCC4 File Offset: 0x0000BEC4
public LicenseException(Type type, object instance)
{
this.type = type;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.LicenseException" /> class for the type and the instance of the component that was denied a license, along with a message to display.</summary>
/// <param name="type">A <see cref="T:System.Type" /> that represents the type of component that was not granted a license. </param>
/// <param name="instance">The instance of the component that was not granted a license. </param>
/// <param name="message">The exception message to display. </param>
// Token: 0x06000533 RID: 1331 RVA: 0x0000DCD4 File Offset: 0x0000BED4
public LicenseException(Type type, object instance, string message)
: this(type, instance, message, null)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.LicenseException" /> class for the type and the instance of the component that was denied a license, along with a message to display and the original exception thrown.</summary>
/// <param name="type">A <see cref="T:System.Type" /> that represents the type of component that was not granted a license. </param>
/// <param name="instance">The instance of the component that was not granted a license. </param>
/// <param name="message">The exception message to display. </param>
/// <param name="innerException">An <see cref="T:System.Exception" /> that represents the original exception. </param>
// Token: 0x06000534 RID: 1332 RVA: 0x0000DCE0 File Offset: 0x0000BEE0
public LicenseException(Type type, object instance, string message, Exception innerException)
: base(message, innerException)
{
this.type = type;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.LicenseException" /> class with the given <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and <see cref="T:System.Runtime.Serialization.StreamingContext" />.</summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> to be used for deserialization.</param>
/// <param name="context">The destination to be used for deserialization.</param>
// Token: 0x06000535 RID: 1333 RVA: 0x0000DCF4 File Offset: 0x0000BEF4
protected LicenseException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
this.type = (Type)info.GetValue("LicensedType", typeof(Type));
}
/// <summary>Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.</summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> to be used for deserialization.</param>
/// <param name="context">The destination to be used for deserialization.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="info" /> is null.</exception>
// Token: 0x06000536 RID: 1334 RVA: 0x0000DD2C File Offset: 0x0000BF2C
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (info == null)
{
throw new ArgumentNullException("info");
}
info.AddValue("LicensedType", this.type);
base.GetObjectData(info, context);
}
/// <summary>Gets the type of the component that was not granted a license.</summary>
/// <returns>A <see cref="T:System.Type" /> that represents the type of component that was not granted a license.</returns>
// Token: 0x1700015B RID: 347
// (get) Token: 0x06000537 RID: 1335 RVA: 0x0000DD64 File Offset: 0x0000BF64
public Type LicensedType
{
get
{
return this.type;
}
}
// Token: 0x04000181 RID: 385
private Type type;
}
}