async Task Activate(ActorPath path) { var system = ClusterActorSystem.Current; actor = Activator.Activate(path.Type); actor.Initialize(path.Id, system, this, ActorPrototype.Of(path.Type)); await actor.OnActivate(); }
public static void Reset() { ResetThis(); ActorInterface.Reset(); ActorPrototype.Reset(); ActorEndpointFactory.Reset(); StreamProvider.Reset(); Ref.Reset(); }
static void Register(Type actor) { var type = RegisterThis(actor); ActorInterface.Register(type); ActorPrototype.Register(type); ActorEndpointFactory.Register(type); StreamProvider.Register(type); Ref.Register(type); }
public static void Reset() { ResetThis(); ActorInterface.Reset(); ActorPrototype.Reset(); ActorEndpointFactory.Reset(); Ref.Reset(); StreamSubscriptionMatcher.Reset(); }
static void Register(Type actor) { var type = RegisterThis(actor); ActorInterface.Register(type); ActorPrototype.Register(type); ActorEndpointFactory.Register(type); Ref.Register(type); StreamSubscriptionMatcher.Register(type); }
async Task Activate(ActorPath path) { var system = ClusterActorSystem.Current; var runtime = new ActorRuntime(system, this); var prototype = ActorPrototype.Of(path.Type); actor = Activator.Activate(path.Type, path.Id, runtime); actor.Initialize(path.Id, runtime, prototype); await actor.OnActivate(); }
static void Register(Assembly assembly) { var actors = assembly .GetTypes() .Where(x => !x.IsAbstract && typeof(Actor).IsAssignableFrom(x)); foreach (var type in actors) { ActorTypeCode.Register(type); ActorPrototype.Register(type); ActorEndpointDynamicFactory.Register(type); } }
public static void Reset() { ActorTypeCode.Reset(); ActorPrototype.Reset(); ActorEndpointDynamicFactory.Reset(); }