Interface IServiceExporter
This interface is one of many which the Dapplo.Addon CompositionBootstrapper (ApplicationBootstrapper) implements. The Bootstrapper will automatically export itself as IServiceExporter, so framework code can specify what exports are available A IServiceExporter should only be used for cases where a simple export can't work.
Namespace:Dapplo.Addons
Assembly:Dapplo.Addons.dll
Syntax
public interface IServiceExporter
Properties
| Improve this Doc View SourceExportProviders
The list of export providers used when an export cannot be found, these need to be added before the bootstrapper is started
Declaration
IList<ExportProvider> ExportProviders { get; }
Property Value
| Type | Description |
|---|---|
| IList<ExportProvider> |
Methods
| Improve this Doc View SourceExport(Type, Object, IDictionary<String, Object>)
Export an object
Declaration
ComposablePart Export(Type type, object obj, IDictionary<string, object> metadata = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | Type to export |
| System.Object | obj | object to add |
| IDictionary<System.String, System.Object> | metadata | Metadata for the export |
Returns
| Type | Description |
|---|---|
| ComposablePart | ComposablePart, this can be used to remove the export later |
Export(Type, String, Object, IDictionary<String, Object>)
Export an object
Declaration
ComposablePart Export(Type type, string contractName, object obj, IDictionary<string, object> metadata = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | Type to export |
| System.String | contractName | contractName under which the object of Type T is registered |
| System.Object | obj | object to add |
| IDictionary<System.String, System.Object> | metadata | Metadata for the export |
Returns
| Type | Description |
|---|---|
| ComposablePart | ComposablePart, this can be used to remove the export later |
Export<T>(T, IDictionary<String, Object>)
Export an object
Declaration
ComposablePart Export<T>(T obj, IDictionary<string, object> metadata = null)
Parameters
| Type | Name | Description |
|---|---|---|
| T | obj | object to add |
| IDictionary<System.String, System.Object> | metadata | Metadata for the export |
Returns
| Type | Description |
|---|---|
| ComposablePart | ComposablePart, this can be used to remove the export later |
Type Parameters
| Name | Description |
|---|---|
| T | Type to export |
Export<T>(String, T, IDictionary<String, Object>)
Export an object
Declaration
ComposablePart Export<T>(string contractName, T obj, IDictionary<string, object> metadata = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | contractName | contractName under which the object of Type T is registered |
| T | obj | object to add |
| IDictionary<System.String, System.Object> | metadata | Metadata for the export |
Returns
| Type | Description |
|---|---|
| ComposablePart | ComposablePart, this can be used to remove the export later |
Type Parameters
| Name | Description |
|---|---|
| T | Type to export |
Release(ComposablePart)
Release an export which was previously added with the Export method
Declaration
void Release(ComposablePart part)
Parameters
| Type | Name | Description |
|---|---|---|
| ComposablePart | part | ComposablePart from Export call |