C# Class NServiceBus.Hosting.Helpers.AssemblyScanner

Helpers for assembly scanning operations
Datei anzeigen Open project: Particular/NServiceBus Class Usage Examples

Private Properties

Property Type Description
AssemblyPath string
AssemblyScanner System
DistillLowerAssemblyName string
FormatReflectionTypeLoadException string
GetHandlerMessageTypes List
IsAllowedType bool
IsIncluded bool
IsMatch bool
IsRuntimeAssembly bool
IsRuntimeAssembly bool
ReferencesNServiceBus bool
ReferencesNServiceBus bool
ScanDirectoryForAssemblyFiles List

Public Methods

Method Description
AssemblyScanner ( ) : System

Creates a new scanner that will scan the base directory of the current appdomain.

AssemblyScanner ( string baseDirectoryToScan ) : System

Creates a scanner for the given directory.

GetScannableAssemblies ( ) : AssemblyScannerResults

Traverses the specified base directory including all sub-directories, generating a list of assemblies that can be scanned for handlers, a list of skipped files, and a list of errors that occurred while scanning. Scanned files may be skipped when they're either not a .NET assembly, or if a reflection-only load of the .NET assembly reveals that it does not reference NServiceBus.

ScanAssembly ( string assemblyPath, AssemblyScannerResults results, bool>.Dictionary processed ) : void

Private Methods

Method Description
AssemblyPath ( Assembly assembly ) : string
AssemblyScanner ( Assembly assemblyToScan ) : System
DistillLowerAssemblyName ( string assemblyOrFileName ) : string
FormatReflectionTypeLoadException ( string fileName, ReflectionTypeLoadException e ) : string
GetHandlerMessageTypes ( List list ) : List
IsAllowedType ( Type type ) : bool
IsIncluded ( string assemblyNameOrFileName ) : bool
IsMatch ( string expression1, string expression2 ) : bool
IsRuntimeAssembly ( AssemblyName assemblyName ) : bool
IsRuntimeAssembly ( string assemblyPath ) : bool
ReferencesNServiceBus ( Assembly assembly, string coreAssemblyName, bool>.Dictionary processed ) : bool
ReferencesNServiceBus ( string assemblyPath, bool>.Dictionary processed, string coreAssemblyName = NServicebusCoreAssemblyName ) : bool
ScanDirectoryForAssemblyFiles ( string directoryToScan, bool scanNestedDirectories ) : List

Method Details

AssemblyScanner() public method

Creates a new scanner that will scan the base directory of the current appdomain.
public AssemblyScanner ( ) : System
return System

AssemblyScanner() public method

Creates a scanner for the given directory.
public AssemblyScanner ( string baseDirectoryToScan ) : System
baseDirectoryToScan string
return System

GetScannableAssemblies() public method

Traverses the specified base directory including all sub-directories, generating a list of assemblies that can be scanned for handlers, a list of skipped files, and a list of errors that occurred while scanning. Scanned files may be skipped when they're either not a .NET assembly, or if a reflection-only load of the .NET assembly reveals that it does not reference NServiceBus.
public GetScannableAssemblies ( ) : AssemblyScannerResults
return AssemblyScannerResults

ScanAssembly() public method

public ScanAssembly ( string assemblyPath, AssemblyScannerResults results, bool>.Dictionary processed ) : void
assemblyPath string
results AssemblyScannerResults
processed bool>.Dictionary
return void