Table of Contents

Method ResolveOptionalKeyed

Namespace
Autofac
Assembly
Autofac.dll

ResolveOptionalKeyed<TService>(IComponentContext, object)

public static TService? ResolveOptionalKeyed<TService>(this IComponentContext context, object serviceKey) where TService : struct

Parameters

context IComponentContext
serviceKey object

Returns

TService?

Type Parameters

TService

ResolveOptionalKeyed<TService>(IComponentContext, object, IEnumerable<Parameter>)

public static TService? ResolveOptionalKeyed<TService>(this IComponentContext context, object serviceKey, IEnumerable<Parameter> parameters) where TService : struct

Parameters

context IComponentContext
serviceKey object
parameters IEnumerable<Parameter>

Returns

TService?

Type Parameters

TService

ResolveOptionalKeyed<TService>(IComponentContext, object, params Parameter[])

public static TService? ResolveOptionalKeyed<TService>(this IComponentContext context, object serviceKey, params Parameter[] parameters) where TService : struct

Parameters

context IComponentContext
serviceKey object
parameters Parameter[]

Returns

TService?

Type Parameters

TService