Click or drag to resize

AutofacActorExtensionsRegisterActorTActor Method

Registers an actor service with the container.

Namespace:  Autofac.Integration.ServiceFabric
Assembly:  Autofac.Integration.ServiceFabric (in Autofac.Integration.ServiceFabric.dll) Version: 4.0.0+53f7ca733a9fa0f3ab85fdb93561bfb2dbae108b
Syntax
public static IRegistrationBuilder<TActor, ConcreteReflectionActivatorData, SingleRegistrationStyle> RegisterActor<TActor>(
	this ContainerBuilder builder,
	Type actorServiceType = null,
	Func<ActorBase, IActorStateProvider, IActorStateManager> stateManagerFactory = null,
	IActorStateProvider stateProvider = null,
	ActorServiceSettings settings = null,
	Object lifetimeScopeTag = null
)
where TActor : ActorBase

Parameters

builder
Type: AutofacContainerBuilder
The container builder.
actorServiceType (Optional)
Type: SystemType
Type of the actor service to create (defaults to ActorService).
stateManagerFactory (Optional)
Type: SystemFuncActorBase, IActorStateProvider, IActorStateManager
A factory method to create IActorStateManager.
stateProvider (Optional)
Type: IActorStateProvider
State provider to store the state for actor objects.
settings (Optional)
Type: ActorServiceSettings
/// Settings to configures behavior of Actor Service.
lifetimeScopeTag (Optional)
Type: SystemObject
The tag applied to the ILifetimeScope in which the actor service is hosted.

Type Parameters

TActor
The type of the actor to register.

Return Value

Type: IRegistrationBuilderTActor, 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).
Exceptions
ExceptionCondition
ArgumentExceptionThrown when TActor is not a valid actor type.
Remarks
The actor will be wrapped in a dynamic proxy and must be public and not sealed.
See Also