Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


LicenseManager.IsValid Method

Definition

Determines whether a valid license can be granted.

Overloads

IsValid(Type)

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

IsValid(Type, Object, License)

Determines whether a valid license can be granted for the specified instance of the type. This method creates a valid License.

IsValid(Type)

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

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

C#
public static bool IsValid(Type type);

Parameters

type
Type

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

Returns

true if a valid license can be granted; otherwise, false.

Remarks

The IsValid method returns true when the type is either not licensed, or is licensed and the license is valid.

This method does not throw a LicenseException when it cannot grant a valid License. The Validate method throws exceptions.

See also

Applies to

.NET 10 és más verziók
Termék Verziók
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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

IsValid(Type, Object, License)

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

Determines whether a valid license can be granted for the specified instance of the type. This method creates a valid License.

C#
public static bool IsValid(Type type, object? instance, out System.ComponentModel.License? license);
C#
public static bool IsValid(Type type, object instance, out System.ComponentModel.License license);

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.

license
License

A License that is a valid license, or null if a valid license cannot be granted.

Returns

true if a valid License can be granted; otherwise, false.

Remarks

The IsValid method returns true when the type parameter is not licensed, or when it is licensed and the license parameter is valid.

This method does not throw a LicenseException when it cannot grant a valid License. The Validate method throws exceptions.

If the license parameter is not null after this call, the object 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 10 és más verziók
Termék Verziók
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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