IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
The ExtensionService discovers ExtensionPoints and Extensions and maintains them in a database. It can return extension nodes or actual extension objects on request. More...
Public Member Functions | |
ExtensionPoint | GetExtensionPoint (string path) |
Get an ExtensionPoint based on it's unique identifying path. More... | |
ExtensionPoint | GetExtensionPoint (Type type) |
Get an ExtensionPoint based on the required Type for extensions. More... | |
ExtensionPoint | GetExtensionPoint (TypeReference type) |
Get an ExtensionPoint based on a Cecil TypeReference. More... | |
IEnumerable< ExtensionNode > | GetExtensionNodes (string path) |
ExtensionNode | GetExtensionNode (string path) |
IEnumerable< ExtensionNode > | GetExtensionNodes< T > () |
IEnumerable< T > | GetExtensions< T > () |
override void | StartService () |
Initialize the Service More... | |
![]() | |
virtual void | StopService () |
Do any cleanup needed before terminating the service More... | |
void | Dispose () |
Properties | |
IEnumerable< ExtensionPoint > | ExtensionPoints [get] |
IEnumerable< ExtensionNode > | Extensions [get] |
![]() | |
IServiceLocator | ServiceContext [get, set] |
The ServiceContext More... | |
ServiceStatus | Status [get, protected set] |
Gets the ServiceStatus of this service More... | |
![]() | |
IServiceLocator | ServiceContext [get, set] |
The ServiceContext More... | |
ServiceStatus | Status [get] |
Gets the ServiceStatus of this service More... | |
Private Member Functions | |
void | FindExtensionPoints (Assembly assembly) |
Find the extension points in a loaded assembly More... | |
ExtensionPoint | DeduceExtensionPointFromType (TypeReference typeRef) |
Deduce the extension point based on the Type of an extension. Returns null if no extension point can be found that would be satisfied by the provided Type. More... | |
void | FindExtensionsInDirectory (DirectoryInfo startDir) |
Scans a directory for addins. Note that assemblies in the directory are only scanned if no file of type .addins is found. If such a file is found, then those assemblies it references are scanned. More... | |
void | ProcessAddinsFile (DirectoryInfo baseDir, string fileName) |
Process a .addins type file. The file contains one entry per line. Each entry may be a directory to scan, an assembly path or a wildcard pattern used to find assemblies. Blank lines and comments started by # are ignored. More... | |
void | FindExtensionsInAssembly (string assemblyName) |
Scan a single assembly for extensions marked by ExtensionAttribute. For each extension, create an ExtensionNode and link it to the correct ExtensionPoint. More... | |
Private Attributes | |
List< ExtensionPoint > | _extensionPoints = new List<ExtensionPoint>() |
Dictionary< string, ExtensionPoint > | _pathIndex = new Dictionary<string, ExtensionPoint>() |
List< ExtensionNode > | _extensions = new List<ExtensionNode>() |
Additional Inherited Members | |
![]() | |
virtual void | Dispose (bool disposing) |
![]() | |
bool | _disposed = false |
The ExtensionService discovers ExtensionPoints and Extensions and maintains them in a database. It can return extension nodes or actual extension objects on request.
|
inline |
Get an ExtensionPoint based on it's unique identifying path.
Referenced by NUnit.Engine.Services.Tests.ExtensionServiceTests.CanGetExtensionPointByPath(), NUnit.Engine.Services.Tests.ExtensionServiceTests.CanGetExtensionPointByType(), and NUnit.Engine.Services.Tests.ExtensionServiceTests.ExtensionsAreAddedToExtensionPoint().
|
inline |
Get an ExtensionPoint based on the required Type for extensions.
|
inline |
Get an ExtensionPoint based on a Cecil TypeReference.
|
inline |
Referenced by NUnit.Engine.Services.ResultService.StartService().
|
inline |
Referenced by NUnit.Engine.Services.DriverService.StartService().
|
inline |
|
inline |
|
inlinevirtual |
Initialize the Service
Reimplemented from NUnit.Engine.Services.Service.
Referenced by NUnit.Engine.Services.Tests.ExtensionServiceTests.CreateService().
|
inlineprivate |
Find the extension points in a loaded assembly
References NUnit.Engine.Extensibility.ExtensionPointAttribute.Description, NUnit.Engine.Extensibility.TypeExtensionPointAttribute.Description, NUnit.Engine.Extensibility.ExtensionPointAttribute.Path, NUnit.Engine.Extensibility.TypeExtensionPointAttribute.Path, and NUnit.Engine.Extensibility.ExtensionPointAttribute.Type.
|
inlineprivate |
Deduce the extension point based on the Type of an extension. Returns null if no extension point can be found that would be satisfied by the provided Type.
|
inlineprivate |
Scans a directory for addins. Note that assemblies in the directory are only scanned if no file of type .addins is found. If such a file is found, then those assemblies it references are scanned.
|
inlineprivate |
Process a .addins type file. The file contains one entry per line. Each entry may be a directory to scan, an assembly path or a wildcard pattern used to find assemblies. Blank lines and comments started by # are ignored.
|
inlineprivate |
Scan a single assembly for extensions marked by ExtensionAttribute. For each extension, create an ExtensionNode and link it to the correct ExtensionPoint.
References NUnit.Engine.Extensibility.ExtensionPoint.Install(), and NUnit.Engine.Extensibility.ExtensionPoint.Path.
|
private |
|
private |
|
private |
|
get |
|
get |