internal static ActorInterface Of(ActorPath path) { var type = ActorType.Registered(path.Code); var @interface = cache.Find(type); if (@interface == null) { throw new InvalidOperationException( $"Can't find interface for path '{path}'." + "Make sure you've registered assembly containing this type"); } return(@interface); }
public static IActorEndpoint Proxy(ActorPath path) { var type = ActorType.Registered(path.Code); var factory = factories.Find(type); if (factory == null) { throw new InvalidOperationException( $"Path '{path}' is not registered as an Actor or Worker." + "Make sure you've registered assembly containing this type"); } return((IActorEndpoint)factory(path.Serialize())); }
internal static ActorPrototype Of(string code) => Of(ActorType.Registered(code));
public static Actor Activate(this IActorActivator activator, ActorPath path, IActorRuntime runtime) { var type = ActorType.Registered(path.Code); return(activator.Activate(type.Implementation, path.Id, runtime)); }