Interface ICompositionContext
Public interface for the composition context.
Inherited Members
Namespace: Kephas.Composition
Assembly: Kephas.Core.dll
Syntax
public interface ICompositionContext : IDisposable
Methods
| Improve this Doc View SourceCreateScopedContext()
Creates a new scoped composition context.
Declaration
ICompositionContext CreateScopedContext()
Returns
Type | Description |
---|---|
ICompositionContext | The new scoped context. |
GetExport(Type, String)
Resolves the specified contract type.
Declaration
object GetExport(Type contractType, string serviceName = null)
Parameters
Type | Name | Description |
---|---|---|
System.Type | contractType | Type of the contract. |
System.String | serviceName | The service name. |
Returns
Type | Description |
---|---|
System.Object | An object implementing |
GetExport<T>(String)
Resolves the specified contract type.
Declaration
T GetExport<T>(string serviceName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | serviceName | The service name. |
Returns
Type | Description |
---|---|
T | An object implementing |
Type Parameters
Name | Description |
---|---|
T | The service type. |
GetExports(Type)
Resolves the specified contract type returning multiple instances.
Declaration
IEnumerable<object> GetExports(Type contractType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | contractType | Type of the contract. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> | An enumeration of objects implementing |
GetExports<T>()
Resolves the specified contract type returning multiple instances.
Declaration
IEnumerable<T> GetExports<T>()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | An enumeration of objects implementing |
Type Parameters
Name | Description |
---|---|
T | The service type. |
TryGetExport(Type, String)
Tries to resolve the specified contract type.
Declaration
object TryGetExport(Type contractType, string serviceName = null)
Parameters
Type | Name | Description |
---|---|---|
System.Type | contractType | Type of the contract. |
System.String | serviceName | The service name. |
Returns
Type | Description |
---|---|
System.Object | An object implementing |
TryGetExport<T>(String)
Tries to resolve the specified contract type.
Declaration
T TryGetExport<T>(string serviceName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | serviceName | The service name. |
Returns
Type | Description |
---|---|
T | An object implementing |
Type Parameters
Name | Description |
---|---|
T | The service type. |