Click or drag to resize

ServiceHostExtensionsAddDependencyInjectionBehaviorT Method (ServiceHostBase, ILifetimeScope, IEnumerableParameter)

Adds the custom service behavior required for dependency injection.

Namespace:  Autofac.Integration.Wcf
Assembly:  Autofac.Integration.Wcf (in Autofac.Integration.Wcf.dll) Version: 6.0.0+691de191498a27e1db2c331d318e19150e41288c
Syntax
public static void AddDependencyInjectionBehavior<T>(
	this ServiceHostBase serviceHost,
	ILifetimeScope container,
	IEnumerable<Parameter> parameters
)

Parameters

serviceHost
Type: System.ServiceModelServiceHostBase
The service host.
container
Type: AutofacILifetimeScope
The container.
parameters
Type: System.Collections.GenericIEnumerableParameter
Parameters for the instance.

Type Parameters

T
The web service contract type.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ServiceHostBase. 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