Language

LicenseProvider.GetLicense(LicenseContext, Type, Object, Boolean) メソッド

定義

派生クラスでオーバーライドされた場合は、コンテキストが指定されたときに、インスタンスまたはコンポーネントの種類のライセンスを取得し、ライセンス拒否が例外をスローするかどうかを取得します。

public:
 abstract System::ComponentModel::License ^ GetLicense(System::ComponentModel::LicenseContext ^ context, Type ^ type, System::Object ^ instance, bool allowExceptions);
public abstract System.ComponentModel.License? GetLicense(System.ComponentModel.LicenseContext context, Type type, object? instance, bool allowExceptions);
public abstract System.ComponentModel.License GetLicense(System.ComponentModel.LicenseContext context, Type type, object instance, bool allowExceptions);
abstract member GetLicense : System.ComponentModel.LicenseContext * Type * obj * bool -> System.ComponentModel.License
Public MustOverride Function GetLicense (context As LicenseContext, type As Type, instance As Object, allowExceptions As Boolean) As License

パラメーター

context
LicenseContext

ライセンスされたオブジェクトを使用できる場所を指定する LicenseContext 。

type
Type

ライセンスを要求するコンポーネントを表す Type 。

instance
Object

ライセンスを要求しているオブジェクト。

allowExceptions
Boolean

true コンポーネントにライセンスを付与できないときに LicenseException をスローする必要がある場合は |。それ以外の場合は false。

返品

有効な License。

注意 (実装者)

LicenseProviderから継承する場合は、ライセンス キーの検証方法を実装するためにGetLicense(LicenseContext, Type, Object, Boolean)をオーバーライドする必要があります。

適用対象

こちらもご覧ください