BehaviorDeprecationExtensionsBuildExpression Method

Simple Injector

Note: This API is now obsolete.

This interface method has been removed. Please call GetInstanceProducerFor instead.

Namespace:  SimpleInjector.Advanced
Assembly:  SimpleInjector (in SimpleInjector.dll) Version: 4.10.2

[ObsoleteAttribute("This interface method has been removed. Please call GetInstanceProducer instead. In case you need to change the expression while need to return an InstanceProducer, use the InstanceProducer.FromExpression method to wrap the expression.This method will be removed in version 5.0.", 
public static Expression BuildExpression(
	this IDependencyInjectionBehavior behavior,
	InjectionConsumerInfo consumer


Type: SimpleInjector.AdvancedIDependencyInjectionBehavior
The behavior.
Type: SimpleInjectorInjectionConsumerInfo
The consumer.

Return Value

Type: Expression
Throws an exception.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDependencyInjectionBehavior. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also