C# Класс System.ComponentModel.LicenseManager

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CreateWithContext ( Type type, System.ComponentModel.LicenseContext creationContext ) : object

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

CreateWithContext ( Type type, System.ComponentModel.LicenseContext creationContext, object args ) : object

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

IsLicensed ( Type type ) : bool

Determines if the given type has a valid license or not.

IsValid ( Type type ) : bool

Determines if a valid license can be granted for the specified type.

IsValid ( Type type, object instance, System.ComponentModel.License &license ) : bool

Determines if a valid license can be granted for the specified instance of the type. This method creates a valid .

LockContext ( object contextUser ) : void

UnlockContext ( object contextUser ) : void

Validate ( Type type, object instance ) : System.ComponentModel.License

Determines if a license can be granted for the instance of the specified type.

Validate ( Type type ) : void

Determines if a license can be granted for the specified type.

Приватные методы

Метод Описание
CacheProvider ( Type type, LicenseProvider provider ) : void

Caches the provider, both in the instance cache, and the type cache.

GetCachedNoLicenseProvider ( Type type ) : bool

Determines if type was actually cached to have _no_ provider, as opposed to not being cached.

GetCachedProvider ( Type type ) : LicenseProvider

Retrieves a cached instance of the provider associated with the specified type.

GetCachedProviderInstance ( Type providerType ) : LicenseProvider

Retrieves a cached instance of the provider of the specified type.

LicenseManager ( ) : System.Runtime.InteropServices
ValidateInternal ( Type type, object instance, bool allowExceptions, System.ComponentModel.License &license ) : bool

Internal validation helper.

ValidateInternalRecursive ( System.ComponentModel.LicenseContext context, Type type, object instance, bool allowExceptions, System.ComponentModel.License &license, string &licenseKey ) : bool

Since we want to walk up the entire inheritance change, when not give an instance, we need another helper method to walk up the chain...

Описание методов

CreateWithContext() публичный статический Метод

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

public static CreateWithContext ( Type type, System.ComponentModel.LicenseContext creationContext ) : object
type Type
creationContext System.ComponentModel.LicenseContext
Результат object

CreateWithContext() публичный статический Метод

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

public static CreateWithContext ( Type type, System.ComponentModel.LicenseContext creationContext, object args ) : object
type Type
creationContext System.ComponentModel.LicenseContext
args object
Результат object

IsLicensed() публичный статический Метод

Determines if the given type has a valid license or not.

public static IsLicensed ( Type type ) : bool
type Type
Результат bool

IsValid() публичный статический Метод

Determines if a valid license can be granted for the specified type.

public static IsValid ( Type type ) : bool
type Type
Результат bool

IsValid() публичный статический Метод

Determines if a valid license can be granted for the specified instance of the type. This method creates a valid .

public static IsValid ( Type type, object instance, System.ComponentModel.License &license ) : bool
type Type
instance object
license System.ComponentModel.License
Результат bool

LockContext() публичный статический Метод

public static LockContext ( object contextUser ) : void
contextUser object
Результат void

UnlockContext() публичный статический Метод

public static UnlockContext ( object contextUser ) : void
contextUser object
Результат void

Validate() публичный статический Метод

Determines if a license can be granted for the instance of the specified type.

public static Validate ( Type type, object instance ) : System.ComponentModel.License
type Type
instance object
Результат System.ComponentModel.License

Validate() публичный статический Метод

Determines if a license can be granted for the specified type.

public static Validate ( Type type ) : void
type Type
Результат void