Click or drag to resize

DefaultValueParameterCanSupplyValue Method

Returns true if the parameter is able to provide a value to a particular site.

Namespace:  Autofac.Core.Activators.Reflection
Assembly:  Autofac (in Autofac.dll) Version: 6.0.0+39696a967e8826f7f1ebc8c1ff4523c9dd75abe0
Syntax
public override bool CanSupplyValue(
	ParameterInfo pi,
	IComponentContext context,
	out Func<Object> valueProvider
)

Parameters

pi
Type: System.ReflectionParameterInfo
Constructor, method, or property-mutator parameter.
context
Type: AutofacIComponentContext
The component context in which the value is being provided.
valueProvider
Type: SystemFuncObject
If the result is true, the valueProvider parameter will be set to a function that will lazily retrieve the parameter value. If the result is , will be set to .

Return Value

Type: Boolean
if a value can be supplied; otherwise, .
Exceptions
ExceptionCondition
ArgumentNullException Thrown if pi is .
See Also