LicenseManager.Validate 方法

定義

判斷是否授與授權。

多載

Validate(Type)

判斷是否授與指定型別的授權。

Validate(Type, Object)

判斷是否授與指定型別執行個體的授權。

Validate(Type)

來源:
LicenseManager.cs
來源:
LicenseManager.cs
來源:
LicenseManager.cs

判斷是否授與指定型別的授權。

public:
 static void Validate(Type ^ type);
public static void Validate (Type type);
static member Validate : Type -> unit
Public Shared Sub Validate (type As Type)

參數

type
Type

Type,表示要求授權的物件型別。

例外狀況

License 無法授與。

備註

這個方法會在無法授與有效的 License 時擲回 LicenseException 。 方法 IsValid 不會擲回例外狀況。

另請參閱

適用於

Validate(Type, Object)

來源:
LicenseManager.cs
來源:
LicenseManager.cs
來源:
LicenseManager.cs

判斷是否授與指定型別執行個體的授權。

public:
 static System::ComponentModel::License ^ Validate(Type ^ type, System::Object ^ instance);
public static System.ComponentModel.License Validate (Type type, object instance);
public static System.ComponentModel.License? Validate (Type type, object? instance);
static member Validate : Type * obj -> System.ComponentModel.License
Public Shared Function Validate (type As Type, instance As Object) As License

參數

type
Type

Type,表示要求授權的物件型別。

instance
Object

指定型別的 Object 或衍生自指定型別的型別。

傳回

有效的 License

例外狀況

型別已授權,但是無法授與 License

備註

這個方法會在無法授與有效的 License 時擲回 LicenseException 。 方法 IsValid 不會擲回例外狀況。

要求 License 的所有物件都必須在處置或完成物件時呼叫 Dispose 方法來處置授權。

另請參閱

適用於