Show / Hide Table of Contents

Class AutofacConventionsBuilder

An Autofac conventions builder.

Inheritance
System.Object
AutofacConventionsBuilder
Implements
IConventionsBuilder
IAutofacContainerBuilderProvider
IAutofacContainerBuilder
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)
System.Object.ToString()
Namespace: Kephas.Composition.Autofac.Conventions
Assembly: Kephas.Composition.Autofac.dll
Syntax
public class AutofacConventionsBuilder : IConventionsBuilder, IAutofacContainerBuilderProvider, IAutofacContainerBuilder

Constructors

| Improve this Doc View Source

AutofacConventionsBuilder()

Initializes a new instance of the AutofacConventionsBuilder class.

Declaration
public AutofacConventionsBuilder()
| Improve this Doc View Source

AutofacConventionsBuilder(ContainerBuilder)

Initializes a new instance of the AutofacConventionsBuilder class.

Declaration
public AutofacConventionsBuilder(ContainerBuilder containerBuilder)
Parameters
Type Name Description
Autofac.ContainerBuilder containerBuilder

The container builder.

Methods

| Improve this Doc View Source

ForInstance(Type, Object)

Defines a registration for the specified type and its singleton instance.

Declaration
public IPartBuilder ForInstance(Type type, object instance)
Parameters
Type Name Description
System.Type type

The registered service type.

System.Object instance

The instance.

Returns
Type Description
IPartBuilder

An IPartBuilder.

| Improve this Doc View Source

ForInstanceFactory(Type, Func<ICompositionContext, Object>)

Defines a registration for the specified type and its instance factory.

Declaration
public IPartBuilder ForInstanceFactory(Type type, Func<ICompositionContext, object> factory)
Parameters
Type Name Description
System.Type type

The registered service type.

System.Func<ICompositionContext, System.Object> factory

The service factory.

Returns
Type Description
IPartBuilder

A IPartBuilder to further configure the rule.

| Improve this Doc View Source

ForType(Type)

Define a rule that will apply to the specified type.

Declaration
public IPartConventionsBuilder ForType(Type type)
Parameters
Type Name Description
System.Type type

The type from which matching types derive.

Returns
Type Description
IPartConventionsBuilder

A IPartConventionsBuilder that must be used to specify the rule.

| Improve this Doc View Source

ForTypesDerivedFrom(Type)

Define a rule that will apply to all types that derive from (or implement) the specified type.

Declaration
public IPartConventionsBuilder ForTypesDerivedFrom(Type type)
Parameters
Type Name Description
System.Type type

The type from which matching types derive.

Returns
Type Description
IPartConventionsBuilder

A IPartConventionsBuilder that must be used to specify the rule.

| Improve this Doc View Source

ForTypesMatching(Predicate<Type>)

Define a rule that will apply to all types that derive from (or implement) the specified type.

Declaration
public IPartConventionsBuilder ForTypesMatching(Predicate<Type> typePredicate)
Parameters
Type Name Description
System.Predicate<System.Type> typePredicate

The type predicate.

Returns
Type Description
IPartConventionsBuilder

A IPartConventionsBuilder that must be used to specify the rule.

| Improve this Doc View Source

GetContainerBuilder()

Gets the container builder.

Declaration
public ContainerBuilder GetContainerBuilder()
Returns
Type Description
Autofac.ContainerBuilder

The container builder.

| Improve this Doc View Source

GetContainerBuilder(IEnumerable<Type>)

Configures the container builder with the given parts.

Declaration
public ContainerBuilder GetContainerBuilder(IEnumerable<Type> parts)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Type> parts

The parts.

Returns
Type Description
Autofac.ContainerBuilder

The container builder.

Implements

IConventionsBuilder
IAutofacContainerBuilderProvider
IAutofacContainerBuilder

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