Click or drag to resize

AutofacServiceExtensionsRegisterStatelessServiceTService Method

Registers a stateless service with the container.

Namespace:  Autofac.Integration.ServiceFabric
Assembly:  Autofac.Integration.ServiceFabric (in Autofac.Integration.ServiceFabric.dll) Version: 4.0.0+53f7ca733a9fa0f3ab85fdb93561bfb2dbae108b
public static IRegistrationBuilder<TService, ConcreteReflectionActivatorData, SingleRegistrationStyle> RegisterStatelessService<TService>(
	this ContainerBuilder builder,
	string serviceTypeName,
	Object lifetimeScopeTag = null
where TService : StatelessService


Type: AutofacContainerBuilder
The container builder.
Type: SystemString
ServiceTypeName as provided in service manifest.
lifetimeScopeTag (Optional)
Type: SystemObject
The tag applied to the ILifetimeScope in which the stateless service is hosted.

Type Parameters

The type of the stateless service to register.

Return Value

Type: IRegistrationBuilderTService, ConcreteReflectionActivatorData, SingleRegistrationStyle
A registration builder allowing further configuration of the component.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ContainerBuilder. 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).
ArgumentExceptionThrown when TService is not a valid service type.
The service will be wrapped in a dynamic proxy and must be public and not sealed.
See Also