Class ActorSystem
Syntax
Constructors
ActorSystem(Scheduler)
Declaration
public ActorSystem(Scheduler scheduler)
Parameters
Fields
RefToComponents
Small hack to track components not referenced directly by actors so the GC does not collect them.
This will be removed in the future when a common base class can be inherited (ReflectActor) instead of IActor and IAsyncActor
Declaration
public Dictionary<ActorHandle, Dictionary<Type, object>> RefToComponents
Field Value
Properties
Dependencies
Declaration
public Dictionary<Type, object> Dependencies { set; }
Property Value
PlayerClient
Declaration
public IPlayerClient PlayerClient { get; set; }
Property Value
Type |
Description |
IPlayerClient |
|
Token
Declaration
public CancellationToken Token { get; }
Property Value
Methods
Add<TState>(Actor<TState>, Dictionary<Type, Object>)
Declaration
public void Add<TState>(Actor<TState> actor, Dictionary<Type, object> components)
where TState : class
Parameters
Type Parameters
DisposeDependencies()
Declaration
public void DisposeDependencies()
GetActorHandle<TState>()
Gets the first matching actor handle for the actor state .
Declaration
public ActorHandle GetActorHandle<TState>()
where TState : class
Returns
Type Parameters
Name |
Description |
TState |
The type of the actor state.
|
Exceptions
GetActorState<TState>()
Gets the first matching actor for type and returns its internal state.
Declaration
public TState GetActorState<TState>()
where TState : class
Returns
Type |
Description |
TState |
The state of the actor.
|
Type Parameters
Exceptions
PreStop()
Declaration
Remove(ActorHandle)
Declaration
public void Remove(ActorHandle handle)
Parameters
Shutdown()
Declaration
Start()
Declaration
Stop()
Declaration
TryGetActorHandle<TState>(out ActorHandle)
Gets the first matching actor handle for the actor state .
Declaration
public bool TryGetActorHandle<TState>(out ActorHandle handle)
where TState : class
Parameters
Returns
Type |
Description |
Boolean |
True if there is a match; otherwise, false.
|
Type Parameters
TryGetActorState<TState>(out TState)
Gets the first matching actor for type and returns its internal state.
Declaration
public bool TryGetActorState<TState>(out TState state)
where TState : class
Parameters
Type |
Name |
Description |
TState |
state |
|
Returns
Type Parameters