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); }
/// <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")); }