LicenseManager.CreateWithContext Methode

Definition

Erstellt eine Instanz eines Objekttyps mit einem Lizenzkontext.

Überlädt

CreateWithContext(Type, LicenseContext)

Erstellt eine Instanz des angegebenen Typs, wenn ein Kontext angegeben ist, in dem Sie die lizenzierte Instanz verwenden können.

CreateWithContext(Type, LicenseContext, Object[])

Erstellt eine Instanz des angegebenen Typs mit den angegebenen Argumenten, wenn ein Kontext vorhanden ist, in dem Sie die lizenzierte Instanz verwenden können.

CreateWithContext(Type, LicenseContext)

Erstellt eine Instanz des angegebenen Typs, wenn ein Kontext angegeben ist, in dem Sie die lizenzierte Instanz verwenden können.

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

Parameter

type
Type

Eine Type-Klasse, die den zu erstellenden Typ darstellt.

creationContext
LicenseContext

Eine LicenseContext-Klasse, die angibt, wann Sie die lizenzierte Instanz verwenden können.

Gibt zurück

Object

Eine Instanz des angegebenen Typs.

Attribute

Hinweise

Der LicenseContext Angegebene Parameter wird als CurrentContext Parameter für die creationContext Lebensdauer dieses LicenseWerts verwendet. Die CreateWithContext Methode blockiert alle anderen Threads im AppDomain Rahmen des Änderns, CurrentContextwodurch CreateWithContext sie sich als Atomvorgang verhalten können.

Siehe auch

Gilt für:

CreateWithContext(Type, LicenseContext, Object[])

Erstellt eine Instanz des angegebenen Typs mit den angegebenen Argumenten, wenn ein Kontext vorhanden ist, in dem Sie die lizenzierte Instanz verwenden können.

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

Parameter

type
Type

Eine Type-Klasse, die den zu erstellenden Typ darstellt.

creationContext
LicenseContext

Eine LicenseContext-Klasse, die angibt, wann Sie die lizenzierte Instanz verwenden können.

args
Object[]

Ein Array vom Typ Object, das die Argumente für den Typ darstellt.

Gibt zurück

Object

Eine Instanz des angegebenen Typs mit dem angegebenen Array von Argumenten.

Attribute

Hinweise

Der LicenseContext Angegebene Parameter wird als CurrentContext Parameter für die creationContext Lebensdauer dieses LicenseWerts verwendet. Diese Methode blockiert alle anderen Threads in der AppDomain Änderung des CurrentContextThreads, sodass CreateWithContext sie sich als Atomvorgang verhalten können.

Siehe auch

Gilt für: