LicenseManager.CurrentContext 属性

定义

获取或设置当前的 LicenseContext,它指定您何时可以使用已授权的对象。Gets or sets the current LicenseContext, which specifies when you can use the licensed object.

public:
 static property System::ComponentModel::LicenseContext ^ CurrentContext { System::ComponentModel::LicenseContext ^ get(); void set(System::ComponentModel::LicenseContext ^ value); };
public static System.ComponentModel.LicenseContext CurrentContext { get; set; }
member this.CurrentContext : System.ComponentModel.LicenseContext with get, set
Public Shared Property CurrentContext As LicenseContext

属性值

一个 LicenseContext,指定何时可以使用已授权的对象。A LicenseContext that specifies when you can use the licensed object.

异常

CurrentContext 属性当前被锁定,因而无法更改它。The CurrentContext property is currently locked and cannot be changed.

注解

当用户请求有效License的时,用户必须为该LicenseProvider.GetLicense方法指定有效的License上下文。When the user requests a valid License, the user must give the context in which the License is valid to the LicenseProvider.GetLicense method. LicenseContext属性返回的应传递给所有LicenseProvider类。The LicenseContext returned by this property should be passed to all LicenseProvider classes.

适用于

另请参阅