LicenseContext.SetSavedLicenseKey(Type, String) 方法

定義

在衍生類別中覆寫時,為指定的型別設定授權識別碼。

public:
 virtual void SetSavedLicenseKey(Type ^ type, System::String ^ key);
public virtual void SetSavedLicenseKey (Type type, string key);
abstract member SetSavedLicenseKey : Type * string -> unit
override this.SetSavedLicenseKey : Type * string -> unit
Public Overridable Sub SetSavedLicenseKey (type As Type, key As String)

參數

type
Type

Type,表示與授權識別碼相關的元件。

key
String

為元件的型別所儲存的 LicenseKey

備註

一般而言,當您在設計時間設定 LicenseUsageMode 時呼叫這個方法。 您必須覆寫 UsageMode 屬性,才能實作設計時間授權支援。

給繼承者的注意事項

此方法不支援已儲存的授權金鑰。 覆寫這個方法和 GetSavedLicenseKey(Type, Assembly) 方法來實作索引鍵。

適用於

另請參閱