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)

Creates an instance of the specified type, 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 _
) As Object
[C#]
public static object CreateWithContext(
   Type type,
   LicenseContext creationContext
);
[C++]
public: static Object* CreateWithContext(
   Type* type,
   LicenseContext* creationContext
);
[JScript]
public static function CreateWithContext(
   type : Type,
   creationContext : LicenseContext
) : Object;

Parameters

type
A Type that represents the type to create.
creationContext
A LicenseContext that specifies when the licensed instance can be used.

Return Value

An instance of the specified type, 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