C# Class Recognos.Core.ReferencedAssemblyLoader

Helper class to help ensure that all referenced assemblies are loaded. This class is useful when all referenced assemblies must be scanned for types, for registering them in a DI container. If an assembly is already loaded, it will not be loaded again. http://msdn.microsoft.com/en-us/library/system.appdomain.getassemblies.aspx The call to AppDomain.GetAssemblies only returns: "assemblies that have been loaded into the execution context of this application domain." The JIT might not load an assembly when the scan happens.
Afficher le fichier Open project: Recognos/Recognos.Core

Méthodes publiques

Méthode Description
EnsureReferencesAreLoaded ( ) : void

Ensures recursively that all assemblies referenced by this assembly are loaded.

EnsureReferencesAreLoaded ( Assembly root ) : void

Ensures recursively that all assemblies referenced by this assembly are loaded.

EnsureReferencesAreLoaded ( Assembly root, Predicate assemblyMatch ) : void

Ensures recursively that all assemblies referenced by this assembly are loaded. Only assemblies for which assemblyMatch predicate is true are considered.

EnsureReferencesAreLoaded ( Assembly root, string assemblyPrefix ) : void

Ensures recursively that all assemblies referenced by this assembly are loaded. Only assemblies with assemblyPrefix prefix are considered.

EnsureReferencesAreLoaded ( Predicate assemblyMatch ) : void

Ensures recursively that all assemblies referenced by this assembly are loaded. Only assemblies for which assemblyMatch predicate is true are considered.

EnsureReferencesAreLoaded ( string assemblyPrefix ) : void

Ensures recursively that all assemblies referenced by this assembly are loaded. Only assemblies with assemblyPrefix prefix are considered.

Private Methods

Méthode Description
LoadReferencedAssemblies ( Assembly root ) : void

Recursively load referenced assemblies.

ReferencedAssemblyLoader ( Assembly root, Predicate assemblyMatch ) : System

Method Details

EnsureReferencesAreLoaded() public static méthode

Ensures recursively that all assemblies referenced by this assembly are loaded.
public static EnsureReferencesAreLoaded ( ) : void
Résultat void

EnsureReferencesAreLoaded() public static méthode

Ensures recursively that all assemblies referenced by this assembly are loaded.
public static EnsureReferencesAreLoaded ( Assembly root ) : void
root System.Reflection.Assembly Assembly to start the scanning from.
Résultat void

EnsureReferencesAreLoaded() public static méthode

Ensures recursively that all assemblies referenced by this assembly are loaded. Only assemblies for which assemblyMatch predicate is true are considered.
public static EnsureReferencesAreLoaded ( Assembly root, Predicate assemblyMatch ) : void
root System.Reflection.Assembly Assembly to start the scanning from.
assemblyMatch Predicate Predicate to apply when considering assemblies.
Résultat void

EnsureReferencesAreLoaded() public static méthode

Ensures recursively that all assemblies referenced by this assembly are loaded. Only assemblies with assemblyPrefix prefix are considered.
public static EnsureReferencesAreLoaded ( Assembly root, string assemblyPrefix ) : void
root System.Reflection.Assembly Assembly to start the scanning from.
assemblyPrefix string Prefix for assembly name to consider.
Résultat void

EnsureReferencesAreLoaded() public static méthode

Ensures recursively that all assemblies referenced by this assembly are loaded. Only assemblies for which assemblyMatch predicate is true are considered.
public static EnsureReferencesAreLoaded ( Predicate assemblyMatch ) : void
assemblyMatch Predicate Predicate to apply when considering assemblies.
Résultat void

EnsureReferencesAreLoaded() public static méthode

Ensures recursively that all assemblies referenced by this assembly are loaded. Only assemblies with assemblyPrefix prefix are considered.
public static EnsureReferencesAreLoaded ( string assemblyPrefix ) : void
assemblyPrefix string Prefix for assembly name to consider.
Résultat void