Interface IServiceRepository
This interface is one of many which the Dapplo.Addon CompositionBootstrapper (ApplicationBootstrapper) implements. The Bootstrapper will automatically export itself as IServiceRepository, so framework code can dlls and assemblies A IServiceRepository should only be used for cases where assemblies need to be scanned or exported
Namespace:Dapplo.Addons
Assembly:Dapplo.Addons.dll
Syntax
public interface IServiceRepository
Properties
| Improve this Doc View SourceKnownAssemblies
all assemblies this bootstrapper knows
Declaration
ISet<string> KnownAssemblies { get; }
Property Value
Type | Description |
---|---|
ISet<System.String> |
KnownFiles
All addon files this bootstrapper knows
Declaration
IList<string> KnownFiles { get; }
Property Value
Type | Description |
---|---|
IList<System.String> |
Methods
| Improve this Doc View SourceAdd(Assembly)
Add an assembly to the AggregateCatalog.Catalogs In english: make the items in the assembly discoverable
Declaration
void Add(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
Assembly | assembly | Assembly to add |
Add(AssemblyCatalog)
Add an AssemblyCatalog AggregateCatalog.Catalogs But only if the AssemblyCatalog has parts
Declaration
void Add(AssemblyCatalog assemblyCatalog)
Parameters
Type | Name | Description |
---|---|---|
AssemblyCatalog | assemblyCatalog | AssemblyCatalog to add |
Add(Type)
Add the assembly for the specified type
Declaration
void Add(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The assembly for the type is retrieved add added via the Add(Assembly) method |
AddScanDirectories(IEnumerable<String>)
Add scan directories, which is used by the assembly resolving
Declaration
void AddScanDirectories(IEnumerable<string> directories)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | directories | IEnumerable of string with the directories |
AddScanDirectory(String)
Add a scan directory, which is used by the assembly resolving
Declaration
void AddScanDirectory(string directory)
Parameters
Type | Name | Description |
---|---|---|
System.String | directory | string with the directory |
FindAndLoadAssemblies(IEnumerable<String>, Regex, Boolean)
Find the assemblies (with parts) found in the specified directories, or manifest resources, matching the specified regex.
Declaration
void FindAndLoadAssemblies(IEnumerable<string> directories, Regex pattern, bool loadEmbedded = true)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | directories | Directory to scan |
Regex | pattern | Regex to use for the scan, when null all dlls will be found |
System.Boolean | loadEmbedded | bool specifying if embedded resources should be used. default is true |
FindAndLoadAssemblies(String, Boolean, IEnumerable<String>)
Find the assemblies (with parts) found in default directories, or manifest resources, matching the specified filepattern.
Declaration
void FindAndLoadAssemblies(string pattern = "*", bool loadEmbedded = true, IEnumerable<string> extensions = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | pattern | File-Pattern to use for the scan, default all dlls will be found |
System.Boolean | loadEmbedded | bool specifying if embedded resources should be used. default is true |
IEnumerable<System.String> | extensions | IEnumerable with extensions to look for, defaults will be set if null was passed |
FindAndLoadAssembliesFromDirectory(String, Regex, Boolean)
Find the assemblies (with parts) found in the specified directory, or manifest resources, matching the specified regex.
Declaration
void FindAndLoadAssembliesFromDirectory(string directory, Regex pattern = null, bool loadEmbedded = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | directory | Directory to scan |
Regex | pattern | Regex to use for the scan, when null all dlls will be found |
System.Boolean | loadEmbedded | bool specifying if embedded resources should be used. default is true |
FindAndLoadAssembliesFromDirectory(String, String, Boolean, IEnumerable<String>)
Find the assemblies (with parts) found in the specified directory, or manifest resources, matching the specified filepattern.
Declaration
void FindAndLoadAssembliesFromDirectory(string directory, string pattern = "*", bool loadEmbedded = true, IEnumerable<string> extensions = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | directory | Directory to scan |
System.String | pattern | File-Pattern to use for the scan, default all dlls will be found |
System.Boolean | loadEmbedded | bool specifying if embedded resources should be used. default is true |
IEnumerable<System.String> | extensions | IEnumerable with extensions to look for, defaults will be set if null was passed |
FindAndLoadAssembly(String, IEnumerable<String>)
Find the the assembly with the specified name, and load it. The assembly will be searched in the directories added by AddScanDirectory, and also in the embedded resources.
Declaration
void FindAndLoadAssembly(string assemblyName, IEnumerable<string> extensions = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | assemblyName | string with the assembly name |
IEnumerable<System.String> | extensions | IEnumerable with extensions to look for, defaults will be set if null was passed |