Click or drag to resize

WithKeyAttributeResolveParameter Method

Resolves a constructor parameter based on keyed service requirements.

Namespace:  Autofac.Extras.AttributeMetadata
Assembly:  Autofac.Extras.AttributeMetadata (in Autofac.Extras.AttributeMetadata.dll) Version: 4.0.1-CI-226
Syntax
public override Object ResolveParameter(
	ParameterInfo parameter,
	IComponentContext context
)

Parameters

parameter
Type: System.ReflectionParameterInfo
The specific parameter being resolved that is marked with this attribute.
context
Type: AutofacIComponentContext
The component context under which the parameter is being resolved.

Return Value

Type: Object
The instance of the object that should be used for the parameter value.
Exceptions
ExceptionCondition
ArgumentNullException Thrown if parameter or context is .
See Also