Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​ComponentModel.​LicenseManager
Assembly: System.ComponentModel.TypeConverter
Inheritance: object → LicenseManager
Provides properties and methods to add a license to a component and to manage a <see cref="T:System.ComponentModel.LicenseProvider" /> . This class cannot be inherited.
Properties
public static
LicenseContext
CurrentContext
Gets or sets the current <see cref="T:System.ComponentModel.LicenseContext" /> , which specifies when you can use the licensed object.
public static
LicenseUsageMode
UsageMode
Gets the <see cref="T:System.ComponentModel.LicenseUsageMode" /> that specifies when you can use the licensed object for the <see cref="P:System.ComponentModel.LicenseManager.CurrentContext" /> .
Methods
public static
object
CreateWithContext​(Type type,
LicenseContext creationContext)
Creates an instance of the specified type, given a context in which you can use the licensed instance.
Returns An instance of the specified type.
type
A <see cref="T:System.Type" /> that represents the type to create.
creationContext
A <see cref="T:System.ComponentModel.LicenseContext" /> that specifies when you can use the licensed instance.
public static
object
CreateWithContext​(Type type,
LicenseContext creationContext,
object[] args)
Creates an instance of the specified type with the specified arguments, given a context in which you can use the licensed instance.
Returns An instance of the specified type with the given array of arguments.
type
A <see cref="T:System.Type" /> that represents the type to create.
creationContext
A <see cref="T:System.ComponentModel.LicenseContext" /> that specifies when you can use the licensed instance.
args
An array of type <see cref="T:System.Object" /> that represents the arguments for the type.
public static
bool
IsLicensed​(Type type)
Returns whether the given type has a valid license.
Returns <see langword="true" /> if the given type is licensed; otherwise, <see langword="false" /> .
type
The <see cref="T:System.Type" /> to find a valid license for.
public static
bool
IsValid​(Type type)
Determines whether a valid license can be granted for the specified type.
Returns <see langword="true" /> if a valid license can be granted; otherwise, <see langword="false" /> .
type
A <see cref="T:System.Type" /> that represents the type of object that requests the <see cref="T:System.ComponentModel.License" /> .
public static
void
LockContext​(object contextUser)
Prevents changes being made to the current <see cref="T:System.ComponentModel.LicenseContext" /> of the given object.
contextUser
The object whose current context you want to lock.
public static
void
UnlockContext​(object contextUser)
Allows changes to be made to the current <see cref="T:System.ComponentModel.LicenseContext" /> of the given object.
contextUser
The object whose current context you want to unlock.
public static
void
Validate​(Type type)
Determines whether a license can be granted for the specified type.
type
A <see cref="T:System.Type" /> that represents the type of object that requests the license.
public static
License
Validate​(Type type,
object instance)
Determines whether a license can be granted for the instance of the specified type.
Returns A valid <see cref="T:System.ComponentModel.License" /> .
type
A <see cref="T:System.Type" /> that represents the type of object that requests the license.
instance
An <see cref="T:System.Object" /> of the specified type or a type derived from the specified type.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object