LicenseManager.CreateWithContext Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an instance of an object type with a license context.
Overloads
CreateWithContext(Type, LicenseContext) |
Creates an instance of the specified type, given a context in which you can use the licensed instance. |
CreateWithContext(Type, LicenseContext, Object[]) |
Creates an instance of the specified type with the specified arguments, given a context in which you can use the licensed instance. |
CreateWithContext(Type, LicenseContext)
- Source:
- LicenseManager.cs
- Source:
- LicenseManager.cs
- Source:
- LicenseManager.cs
Creates an instance of the specified type, given a context in which you can use the licensed instance.
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
Parameters
- creationContext
- LicenseContext
A LicenseContext that specifies when you can use the licensed instance.
Returns
An instance of the specified type.
- Attributes
Remarks
The LicenseContext you specify as the creationContext
parameter is used as the CurrentContext for the life of this License. The CreateWithContext method blocks all other threads in the AppDomain from modifying the CurrentContext, allowing CreateWithContext to behave as an atomic operation.
See also
- License
- LicenseContext
- LicenseException
- LicenseProvider
- LicenseProviderAttribute
- LicFileLicenseProvider
- LicenseUsageMode
Applies to
CreateWithContext(Type, LicenseContext, Object[])
- Source:
- LicenseManager.cs
- Source:
- LicenseManager.cs
- Source:
- LicenseManager.cs
Creates an instance of the specified type with the specified arguments, given a context in which you can use the licensed instance.
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
Parameters
- creationContext
- LicenseContext
A LicenseContext that specifies when you can use the licensed instance.
Returns
An instance of the specified type with the given array of arguments.
- Attributes
Remarks
The LicenseContext you specify as the creationContext
parameter is used as the CurrentContext for the life of this License. This method blocks all other threads in the AppDomain from modifying the CurrentContext, allowing CreateWithContext to behave as an atomic operation.
See also
- License
- LicenseContext
- LicenseException
- LicenseProvider
- LicenseProviderAttribute
- LicFileLicenseProvider
- LicenseUsageMode