语言

LicenseManager.CreateWithContext 方法

定义

使用许可证上下文创建对象类型的实例。

重载

名称 说明
CreateWithContext(Type, LicenseContext)

创建指定类型的实例,给定一个上下文,可在该上下文中使用许可实例。

CreateWithContext(Type, LicenseContext, Object[])

使用指定参数创建指定类型的实例,给定一个上下文,可在该上下文中使用许可实例。

CreateWithContext(Type, LicenseContext)

Source:
LicenseManager.cs
Source:
LicenseManager.cs
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

参数

type
Type

一个 Type 表示要创建的类型。

creationContext
LicenseContext

一个 LicenseContext ,指定何时可以使用许可实例。

返回

指定类型的实例。

属性

注解

指定 LicenseContext 为 creationContext 参数 CurrentContext 用作此 License生存期的参数。 该方法 CreateWithContext 阻止所有其他线程 AppDomain 修改 CurrentContext,从而允许 CreateWithContext 作为原子操作。

另请参阅

适用于

CreateWithContext(Type, LicenseContext, Object[])

Source:
LicenseManager.cs
Source:
LicenseManager.cs
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

参数

type
Type

一个 Type 表示要创建的类型。

creationContext
LicenseContext

一个 LicenseContext ,指定何时可以使用许可实例。

args
Object[]

一个类型 Object 数组,表示该类型的参数。

返回

具有给定参数数组的指定类型的实例。

属性

注解

指定 LicenseContext 为 creationContext 参数 CurrentContext 用作此 License生存期的参数。 此方法阻止所有其他线程 AppDomain 修改 CurrentContext,从而允许 CreateWithContext 充当原子操作。

另请参阅

适用于