Show / Hide Table of Contents

Interface IPartConventionsBuilder

Contract for part conventions builders.

Namespace: Kephas.Composition.Conventions
Assembly: Kephas.Core.dll
Syntax
public interface IPartConventionsBuilder

Methods

| Improve this Doc View Source

AllowMultiple(Boolean)

Indicates that this service allows multiple registrations.

Declaration
IPartConventionsBuilder AllowMultiple(bool value)
Parameters
Type Name Description
System.Boolean value

True if multiple service registrations are allowed, false otherwise.

Returns
Type Description
IPartConventionsBuilder

A part builder allowing further configuration of the part.

| Improve this Doc View Source

AsServiceType(Type)

Indicates the declared service type. Typically this is the same as the contract type, but this may get overwritten, for example when declaring generic type services for collecting metadata.

Declaration
IPartConventionsBuilder AsServiceType(Type serviceType)
Parameters
Type Name Description
System.Type serviceType

Type of the service.

Returns
Type Description
IPartConventionsBuilder

A part builder allowing further configuration of the part.

| Improve this Doc View Source

Export(Action<IExportConventionsBuilder>)

Exports the part using the specified conventions builder.

Declaration
IPartConventionsBuilder Export(Action<IExportConventionsBuilder> conventionsBuilder = null)
Parameters
Type Name Description
System.Action<IExportConventionsBuilder> conventionsBuilder

The conventions builder.

Returns
Type Description
IPartConventionsBuilder

A part builder allowing further configuration of the part.

| Improve this Doc View Source

ExportInterface(Type, Action<Type, IExportConventionsBuilder>)

Select the interface on the part type that will be exported.

Declaration
IPartConventionsBuilder ExportInterface(Type exportInterface, Action<Type, IExportConventionsBuilder> exportConfiguration = null)
Parameters
Type Name Description
System.Type exportInterface

The interface to export.

System.Action<System.Type, IExportConventionsBuilder> exportConfiguration

The export configuration.

Returns
Type Description
IPartConventionsBuilder

A part builder allowing further configuration of the part.

| Improve this Doc View Source

Scoped()

Mark the part as being shared within the scope.

Declaration
IPartConventionsBuilder Scoped()
Returns
Type Description
IPartConventionsBuilder

A part builder allowing further configuration of the part.

| Improve this Doc View Source

SelectConstructor(Func<IEnumerable<ConstructorInfo>, ConstructorInfo>, Action<ParameterInfo, IImportConventionsBuilder>)

Select which of the available constructors will be used to instantiate the part.

Declaration
IPartConventionsBuilder SelectConstructor(Func<IEnumerable<ConstructorInfo>, ConstructorInfo> constructorSelector, Action<ParameterInfo, IImportConventionsBuilder> importConfiguration = null)
Parameters
Type Name Description
System.Func<System.Collections.Generic.IEnumerable<System.Reflection.ConstructorInfo>, System.Reflection.ConstructorInfo> constructorSelector

Filter that selects a single constructor.

System.Action<System.Reflection.ParameterInfo, IImportConventionsBuilder> importConfiguration

Action configuring the parameters of the selected constructor.

Returns
Type Description
IPartConventionsBuilder

A part builder allowing further configuration of the part.

| Improve this Doc View Source

Singleton()

Mark the part as being shared within the entire composition.

Declaration
IPartConventionsBuilder Singleton()
Returns
Type Description
IPartConventionsBuilder

A part builder allowing further configuration of the part.

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>)
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