LicenseManager.Validate Method

Definition

Determines whether a license can be granted.

Overloads

Validate(Type)

Determines whether a license can be granted for the specified type.

Validate(Type, Object)

Determines whether a license can be granted for the instance of the specified type.

Validate(Type)

Source:
LicenseManager.cs
Source:
LicenseManager.cs
Source:
LicenseManager.cs

Determines whether a license can be granted for the specified type.

public static void Validate (Type type);

Parameters

type
Type

A Type that represents the type of object that requests the license.

Exceptions

A License cannot be granted.

Remarks

This method throws a LicenseException when a valid License cannot be granted. The IsValid method does not throw an exception.

See also

Applies to

.NET 9 og aðrar útgáfur
Vara Útgáfur
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Validate(Type, Object)

Source:
LicenseManager.cs
Source:
LicenseManager.cs
Source:
LicenseManager.cs

Determines whether a license can be granted for the instance of the specified type.

public static System.ComponentModel.License Validate (Type type, object instance);
public static System.ComponentModel.License? Validate (Type type, object? instance);

Parameters

type
Type

A Type that represents the type of object that requests the license.

instance
Object

An Object of the specified type or a type derived from the specified type.

Returns

A valid License.

Exceptions

The type is licensed, but a License cannot be granted.

Remarks

This method throws a LicenseException when a valid License cannot be granted. The IsValid method does not throw an exception.

All objects asking for a License must dispose of the license by calling the Dispose method when the object is disposed of or finalized.

See also

Applies to

.NET 9 og aðrar útgáfur
Vara Útgáfur
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1