Table of Contents

Method RegisterAdapter

Namespace
Autofac
Assembly
Autofac.dll

RegisterAdapter<TFrom, TTo>(ContainerBuilder, Func<IComponentContext, IEnumerable<Parameter>, TFrom, TTo>)

public static IRegistrationBuilder<TTo, LightweightAdapterActivatorData, DynamicRegistrationStyle> RegisterAdapter<TFrom, TTo>(this ContainerBuilder builder, Func<IComponentContext, IEnumerable<Parameter>, TFrom, TTo> adapter) where TFrom : notnull where TTo : notnull

Parameters

builder ContainerBuilder
adapter Func<IComponentContext, IEnumerable<Parameter>, TFrom, TTo>

Returns

IRegistrationBuilder<TTo, LightweightAdapterActivatorData, DynamicRegistrationStyle>

Type Parameters

TFrom
TTo

RegisterAdapter<TFrom, TTo>(ContainerBuilder, Func<IComponentContext, TFrom, TTo>)

public static IRegistrationBuilder<TTo, LightweightAdapterActivatorData, DynamicRegistrationStyle> RegisterAdapter<TFrom, TTo>(this ContainerBuilder builder, Func<IComponentContext, TFrom, TTo> adapter) where TFrom : notnull where TTo : notnull

Parameters

builder ContainerBuilder
adapter Func<IComponentContext, TFrom, TTo>

Returns

IRegistrationBuilder<TTo, LightweightAdapterActivatorData, DynamicRegistrationStyle>

Type Parameters

TFrom
TTo

RegisterAdapter<TFrom, TTo>(ContainerBuilder, Func<TFrom, TTo>)

public static IRegistrationBuilder<TTo, LightweightAdapterActivatorData, DynamicRegistrationStyle> RegisterAdapter<TFrom, TTo>(this ContainerBuilder builder, Func<TFrom, TTo> adapter) where TFrom : notnull where TTo : notnull

Parameters

builder ContainerBuilder
adapter Func<TFrom, TTo>

Returns

IRegistrationBuilder<TTo, LightweightAdapterActivatorData, DynamicRegistrationStyle>

Type Parameters

TFrom
TTo