Class ExportFactory<TService, TMetadata>
An export factory with metadata.
Inheritance
System.Object
ExportFactory<TService, TMetadata>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Kephas.Composition.ExportFactories
Assembly: Kephas.Core.dll
Syntax
public class ExportFactory<TService, TMetadata> : IExportFactory<TService, TMetadata>, IExportFactory<TService>, IExportFactory
Type Parameters
Name | Description |
---|---|
TService | Type of the service. |
TMetadata | Type of the metadata. |
Constructors
| Improve this Doc View SourceExportFactory(Func<TService>, TMetadata)
Initializes a new instance of the ExportFactory<TService, TMetadata> class.
Declaration
public ExportFactory(Func<TService> factory, TMetadata metadata)
Parameters
Type | Name | Description |
---|---|---|
System.Func<TService> | factory | The factory. |
TMetadata | metadata | The metadata. |
Properties
| Improve this Doc View SourceMetadata
Gets or sets the metadata associated with the export.
Declaration
public TMetadata Metadata { get; set; }
Property Value
Type | Description |
---|---|
TMetadata | The metadata associated with the export. |
Methods
| Improve this Doc View SourceCreateExport()
Create an instance of the exported part.
Declaration
public IExport<TService, TMetadata> CreateExport()
Returns
Type | Description |
---|---|
IExport<TService, TMetadata> | A handle allowing the created part to be accessed then released. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents the current object. |
Overrides
System.Object.ToString()
Explicit Interface Implementations
| Improve this Doc View SourceIExportFactory.CreateExport()
Create an instance of the exported part.
Declaration
IExport IExportFactory.CreateExport()
Returns
Type | Description |
---|---|
IExport | A handle allowing the created part to be accessed then released. |
IExportFactory<TService>.CreateExport()
Creates the export.
Declaration
IExport<TService> IExportFactory<TService>.CreateExport()
Returns
Type | Description |
---|---|
IExport<TService> | The new export. |