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.
显示文件 Open project: Recognos/Recognos.Core

Public Methods

Method 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

Method Description
LoadReferencedAssemblies ( Assembly root ) : void

Recursively load referenced assemblies.

ReferencedAssemblyLoader ( Assembly root, Predicate assemblyMatch ) : System

Method Details

EnsureReferencesAreLoaded() public static method

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

EnsureReferencesAreLoaded() public static method

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.
return void

EnsureReferencesAreLoaded() public static method

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.
return void

EnsureReferencesAreLoaded() public static method

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.
return void

EnsureReferencesAreLoaded() public static method

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.
return void

EnsureReferencesAreLoaded() public static method

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.
return void