Exemple #1
0
        protected Actor(string id, IActorRuntime runtime, Dispatcher dispatcher = null) : this()
        {
            Requires.NotNull(runtime, nameof(runtime));
            Requires.NotNullOrWhitespace(id, nameof(id));

            Runtime    = runtime;
            Dispatcher = dispatcher ?? ActorType.Dispatcher(GetType());
            Path       = GetType().ToActorPath(id);
        }
Exemple #2
0
 /// <summary>
 /// Provided only for unit-testing purposes
 /// </summary>
 protected Actor(string id = null, IActorRuntime runtime = null, Dispatcher dispatcher = null) : this()
 {
     Runtime    = runtime;
     Dispatcher = dispatcher ?? ActorType.Dispatcher(GetType());
     Path       = GetType().ToActorPath(id ?? Guid.NewGuid().ToString("N"));
 }