Show / Hide Table of Contents

Interface ICompositionContext

Public interface for the composition context.

Inherited Members
System.IDisposable.Dispose()
Namespace: Kephas.Composition
Assembly: Kephas.Core.dll
Syntax
public interface ICompositionContext : IDisposable

Methods

| Improve this Doc View Source

CreateScopedContext()

Creates a new scoped composition context.

Declaration
ICompositionContext CreateScopedContext()
Returns
Type Description
ICompositionContext

The new scoped context.

| Improve this Doc View Source

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 contractType.

| Improve this Doc View Source

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 T.

Type Parameters
Name Description
T

The service type.

| Improve this Doc View Source

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 contractType.

| Improve this Doc View Source

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 T.

Type Parameters
Name Description
T

The service type.

| Improve this Doc View Source

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 contractType, or null if a service with the provided contract was not found.

| Improve this Doc View Source

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 T, or null if a service with the provided contract was not found.

Type Parameters
Name Description
T

The service type.

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
CompositionContextExtensions.GetLogger(ICompositionContext, String)
CompositionContextExtensions.GetLogger(ICompositionContext, Type)
CompositionContextExtensions.GetLogger<T>(ICompositionContext)
CompositionContextExtensions.ToServiceProvider(ICompositionContext)
CompositionContextExtensions.GetExportFactory<T>(ICompositionContext)
CompositionContextExtensions.GetExportFactory<T, TMetadata>(ICompositionContext)
CompositionContextExtensions.GetExportFactories<T>(ICompositionContext)
CompositionContextExtensions.GetExportFactories<T, TMetadata>(ICompositionContext)
CompositionContextExtensions.TryGetExportFactory<T>(ICompositionContext)
CompositionContextExtensions.TryGetExportFactory<T, TMetadata>(ICompositionContext)
CompositionContextExtensions.GetExportFactory(ICompositionContext, Type)
CompositionContextExtensions.GetExportFactory(ICompositionContext, Type, Type)
CompositionContextExtensions.GetExportFactories(ICompositionContext, Type)
CompositionContextExtensions.GetExportFactories(ICompositionContext, Type, Type)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX