AutofacServiceExtensionsRegisterStatefulServiceTService Method |
Registers a stateful service with the container.
Namespace:
Autofac.Integration.ServiceFabric
Assembly:
Autofac.Integration.ServiceFabric (in Autofac.Integration.ServiceFabric.dll) Version: 4.0.0+53f7ca733a9fa0f3ab85fdb93561bfb2dbae108b
Syntaxpublic static IRegistrationBuilder<TService, ConcreteReflectionActivatorData, SingleRegistrationStyle> RegisterStatefulService<TService>(
this ContainerBuilder builder,
string serviceTypeName,
Object lifetimeScopeTag = null
)
where TService : StatefulServiceBase
<ExtensionAttribute>
Public Shared Function RegisterStatefulService(Of TService As StatefulServiceBase) (
builder As ContainerBuilder,
serviceTypeName As String,
Optional lifetimeScopeTag As Object = Nothing
) As IRegistrationBuilder(Of TService, ConcreteReflectionActivatorData, SingleRegistrationStyle)
Parameters
- builder
- Type: AutofacContainerBuilder
The container builder. - serviceTypeName
- Type: SystemString
ServiceTypeName as provided in service manifest. - lifetimeScopeTag (Optional)
- Type: SystemObject
The tag applied to the ILifetimeScope in which the stateful service is hosted.
Type Parameters
- TService
- The type of the stateful service to register.
Return Value
Type:
IRegistrationBuilderTService,
ConcreteReflectionActivatorData,
SingleRegistrationStyleA 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).
Exceptions
RemarksThe service will be wrapped in a dynamic proxy and must be public and not sealed.
See Also