LicenseManager.CreateWithContext 方法    
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
用许可证上下文创建对象类型的实例。
重载
| CreateWithContext(Type, LicenseContext) | 
						 根据可在其中使用已授权实例的上下文,创建指定类型的实例。  | 
        	
| CreateWithContext(Type, LicenseContext, Object[]) | 
						 根据可在其中使用已授权实例的上下文,用指定的参数创建指定类型的实例。  | 
        	
CreateWithContext(Type, LicenseContext)
- Source:
 - LicenseManager.cs
 
- Source:
 - LicenseManager.cs
 
- Source:
 - LicenseManager.cs
 
根据可在其中使用已授权实例的上下文,创建指定类型的实例。
public:
 static System::Object ^ CreateWithContext(Type ^ type, System::ComponentModel::LicenseContext ^ creationContext);
	[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static object CreateWithContext (Type type, System.ComponentModel.LicenseContext creationContext);
	[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static object? CreateWithContext (Type type, System.ComponentModel.LicenseContext creationContext);
	public static object CreateWithContext (Type type, System.ComponentModel.LicenseContext creationContext);
	[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member CreateWithContext : Type * System.ComponentModel.LicenseContext -> obj
	static member CreateWithContext : Type * System.ComponentModel.LicenseContext -> obj
	Public Shared Function CreateWithContext (type As Type, creationContext As LicenseContext) As Object
	参数
- creationContext
 - LicenseContext
 
一个 LicenseContext,指定何时可以使用已授权的实例。
返回
指定类型的实例。
- 属性
 
注解
              LicenseContext指定为 参数的 creationContext 将用作CurrentContext此 License生存期的 。 方法 CreateWithContext 阻止 中的所有 AppDomain 其他线程修改 CurrentContext,从而允许 CreateWithContext 以原子操作的形式运行。
另请参阅
- License
 - LicenseContext
 - LicenseException
 - LicenseProvider
 - LicenseProviderAttribute
 - LicFileLicenseProvider
 - LicenseUsageMode
 
适用于
CreateWithContext(Type, LicenseContext, Object[])
- Source:
 - LicenseManager.cs
 
- Source:
 - LicenseManager.cs
 
- Source:
 - LicenseManager.cs
 
根据可在其中使用已授权实例的上下文,用指定的参数创建指定类型的实例。
public:
 static System::Object ^ CreateWithContext(Type ^ type, System::ComponentModel::LicenseContext ^ creationContext, cli::array <System::Object ^> ^ args);
	[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static object CreateWithContext (Type type, System.ComponentModel.LicenseContext creationContext, object[] args);
	[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static object? CreateWithContext (Type type, System.ComponentModel.LicenseContext creationContext, object[] args);
	public static object CreateWithContext (Type type, System.ComponentModel.LicenseContext creationContext, object[] args);
	[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member CreateWithContext : Type * System.ComponentModel.LicenseContext * obj[] -> obj
	static member CreateWithContext : Type * System.ComponentModel.LicenseContext * obj[] -> obj
	Public Shared Function CreateWithContext (type As Type, creationContext As LicenseContext, args As Object()) As Object
	参数
- creationContext
 - LicenseContext
 
一个 LicenseContext,指定何时可以使用已授权的实例。
返回
具有给定参数数组的指定类型的实例。
- 属性
 
注解
              LicenseContext指定为 参数的 creationContext 将用作CurrentContext此 License生存期的 。 此方法阻止 中的所有 AppDomain 其他线程修改 CurrentContext,从而允许 CreateWithContext 以原子操作的形式运行。
另请参阅
- License
 - LicenseContext
 - LicenseException
 - LicenseProvider
 - LicenseProviderAttribute
 - LicFileLicenseProvider
 - LicenseUsageMode