ServiceHostExtensionsAddDependencyInjectionBehaviorT Method (ServiceHostBase, ILifetimeScope) |
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
)
<ExtensionAttribute>
Public Shared Sub AddDependencyInjectionBehavior(Of T) (
serviceHost As ServiceHostBase,
container As ILifetimeScope
)
Parameters
- serviceHost
- Type: System.ServiceModelServiceHostBase
The service host. - container
- Type: AutofacILifetimeScope
The container.
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