संपादित करें

इसके माध्यम से साझा किया गया


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.

public:
 static bool IsValid(Type ^ type);
public static bool IsValid (Type type);
static member IsValid : Type -> bool
Public Shared Function IsValid (type As Type) As Boolean

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

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.

public:
 static bool IsValid(Type ^ type, System::Object ^ instance, [Runtime::InteropServices::Out] System::ComponentModel::License ^ % license);
public static bool IsValid (Type type, object instance, out System.ComponentModel.License license);
public static bool IsValid (Type type, object? instance, out System.ComponentModel.License? license);
static member IsValid : Type * obj * License -> bool
Public Shared Function IsValid (type As Type, instance As Object, ByRef license As License) As Boolean

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