LicFileLicenseProvider.IsKeyValid(String, Type) 方法

定義

判斷方法檢索的 GetLicense(LicenseContext, Type, Object, Boolean) 金鑰是否適用於指定型別。

protected:
 virtual bool IsKeyValid(System::String ^ key, Type ^ type);
protected virtual bool IsKeyValid(string? key, Type type);
protected virtual bool IsKeyValid(string key, Type type);
abstract member IsKeyValid : string * Type -> bool
override this.IsKeyValid : string * Type -> bool
Protected Overridable Function IsKeyValid (key As String, type As Type) As Boolean

參數

key
String

LicenseKey 檢查一下。

type
Type

A Type 代表請求 的 License元件。

傳回

true 若該金鑰對指定型別有效 LicenseKey ;否則, false

備註

此方法會將鍵與短語「 “ myClassName is a licensed component. ,其中 myClassNameFullName 你想建立的元件的 。

給繼承者的注意事項

當你從這個類別繼承時,可以覆寫這個方法,提供你自己的驗證邏輯。

適用於

另請參閱