NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

LicenseManager.CreateWithContext (Type, LicenseContext, Object[])

Creates an instance of the specified type with the specified args, using creationContext as the context in which the licensed instance can be used.

[Visual Basic]
Overloads Public Shared Function CreateWithContext( _
   ByVal type As Type, _
   ByVal creationContext As LicenseContext, _
   ByVal args() As Object _
) As Object
[C#]
public static object CreateWithContext(
   Type type,
   LicenseContext creationContext,
   object[] args
);
[C++]
public: static Object* CreateWithContext(
   Type* type,
   LicenseContext* creationContext,
   Object* args[]
);
[JScript]
public static function CreateWithContext(
   type : Type,
   creationContext : LicenseContext,
   args : Object[]
) : Object;

Parameters

type
A Type that represents the type to create.
creationContext
A LicenseContext that specifies when the licensed instance can be used.
args
An array of type Object that represent the arguments for the type.

Return Value

An instance of the specified type with the specified args, using creationContext as the LicenseContext.

Remarks

This method makes creationContext the CurrentContext for the duration of the construction. This method blocks all other threads in the AppDomain from modifying the CurrentContext, allowing CreateWithContext to behave as an atomic operation.

See Also

LicenseManager Class | LicenseManager Members | System.ComponentModel Namespace | LicenseManager.CreateWithContext Overload List | License | LicenseContext | LicenseException | LicenseProvider | LicenseProviderAttribute | LicFileLicenseProvider | LicenseUsageMode