C# Class System.ComponentModel.LicenseManager

Afficher le fichier Open project: dotnet/corefx Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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...

Method Details

CreateWithContext() public static méthode

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
Résultat object

CreateWithContext() public static méthode

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
Résultat object

IsLicensed() public static méthode

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

public static IsLicensed ( Type type ) : bool
type Type
Résultat bool

IsValid() public static méthode

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

public static IsValid ( Type type ) : bool
type Type
Résultat bool

IsValid() public static méthode

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
Résultat bool

LockContext() public static méthode

public static LockContext ( object contextUser ) : void
contextUser object
Résultat void

UnlockContext() public static méthode

public static UnlockContext ( object contextUser ) : void
contextUser object
Résultat void

Validate() public static méthode

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
Résultat System.ComponentModel.License

Validate() public static méthode

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

public static Validate ( Type type ) : void
type Type
Résultat void