Beispiel #1
0
        public ShellViewModel(HomeViewModel home, SettingsViewModel settings, ConversationsViewModel convos, IActorRefFactory system)
        {
            _screens.Add(Screens.Home, home);
            _screens.Add(Screens.Settings, settings);
            _screens.Add(Screens.Conversations, convos);

            system.ActorSelection(ClientActorPaths.ErrorDialogActor.Path)
                .Tell(new ErrorDialogActor.RegisterShell(this));

            _shellViewModelActor = system.ActorOf(Props.Create(() => new ShellViewModelActor(this)),
                ClientActorPaths.ShellViewModelActor.Name);
        }
 public ProductsActorProvider(IActorRefFactory actorSystem, IProductsService productsService)
 {
     _productsActor = actorSystem.ActorOf(Props.Create <ProductsActor>(productsService), Name);
 }
 public static IActorRef ActorOf <TActor>(this IActorRefFactory factory, string name = null) where TActor : ActorBase, new()
 {
     return(factory.ActorOf(Props.Create <TActor>(), name: name));
 }
Beispiel #4
0
 public CreateModel(IActorRefFactory actorRefFactory, IHostingEnvironment hostingEnvironment)
 {
     _queryRootActor     = actorRefFactory.ActorOf <QueryRootActor>();
     _commandRootActor   = actorRefFactory.ActorOf <CommandRootActor>();
     _hostingEnvironment = hostingEnvironment;
 }
Beispiel #5
0
 public IActorRef CreateActor(IActorRefFactory actorRefFactory, object id, object[] args)
 {
     return(actorRefFactory.ActorOf(Props.Create(() =>
                                                 new BotActor(_clusterContext, "bot" + (long)id, (string)args[0], (Type)args[1]))));
 }
 public static Reporter CreateReporter(IActorRefFactory factory, string?name = "Reporter")
 => new Reporter(factory.ActorOf(Props.Create(() => new ReporterActor()).WithSupervisorStrategy(SupervisorStrategy.StoppingStrategy), name));
        public IActorRef CreateActor(IActorRefFactory actorRefFactory, object id, object[] args)
        {
            var param = (CreateGameParam)args[0];

            var gameActor = actorRefFactory.ActorOf(Props.Create(
                () => new GameActor(_clusterContext, (long)id, param)));

            if (param.WithBot)
            {
                actorRefFactory.ActorOf(Props.Create(
                    () => new GameBotActor(_clusterContext, gameActor.Cast<GameRef>(), 0, "bot")));
            }

            return gameActor;
        }
Beispiel #8
0
 public CreateModel(IActorRefFactory actorRefFactory)
 {
     _commandRootActor = actorRefFactory.ActorOf <CommandRootActor>();
 }
Beispiel #9
0
 public static RepositoryManager CreateInstance(IActorRefFactory factory, string connectionString, DataTransferManager tranferManager)
 => new RepositoryManager(factory.ActorOf(Props.Create(() => new RepositoryManagerImpl(new MongoClient(connectionString), tranferManager))));
Beispiel #10
0
 public IActorRef CreateActor(IActorRefFactory actorRefFactory, object id, object[] args)
 {
     return actorRefFactory.ActorOf(Props.Create(() => new UserActor(_clusterContext, (long)id)));
 }
Beispiel #11
0
        public SettingsViewModel(IActorRefFactory system)
        {
            DisplayName = "Settings";

            _vmActor = system.ActorOf(Props.Create(() => new SettingsViewModelActor(this)), ClientActorPaths.SettingsViewModelActor.Name);
        }
Beispiel #12
0
 public static TypedActorReference <TMessage> ActorOf <TMessage>(this IActorRefFactory actorReferenceFactory, Props <TMessage> props, string name) =>
 new TypedActorReference <TMessage>(actorReferenceFactory.ActorOf(props.Underlying, name));
Beispiel #13
0
 public CustomerActorProvider(IActorRefFactory actorSystem, ICustomerRepository repo)
 {
     CustomersActor = actorSystem.ActorOf(Props.Create <CustomersActor>(repo), "customers");
 }
Beispiel #14
0
 public AkkaViewModel(IActorRefFactory actorSystem, IActorRef targetActor) : this()
 {
     Actor = actorSystem.ActorOf(AkkaModelViewActor.Props(this, targetActor));
 }
 public WeatherService(IActorRefFactory actorSystem, IdentifierGenerator identifierGenerator)
 {
     _weatherManager      = actorSystem.ActorOf(WeatherManager.Props());
     _identifierGenerator = identifierGenerator;
 }
Beispiel #16
0
 public ConstructionSystem(EntityManager entityManager, IActorRefFactory actorRefFactory) : base(entityManager)
 {
     Actor = actorRefFactory.ActorOf(SystemActor.Props(this), "ConstructionSystem");
 }
 public BasketManagerActorProvider(IActorRefFactory system, ProductActorProvider productActorProvider)
 {
     _basketManagerRef = system.ActorOf(BasketManagerActor.Props(productActorProvider.Get()), "basket-manager");
 }
Beispiel #18
0
 public IActorRef CreateActor(IActorRefFactory actorRefFactory, object id, object[] args)
 {
     return(actorRefFactory.ActorOf(Props.Create(() => new UserActor(_clusterContext, (string)id, (IUserEventObserver)args[0]))));
 }
Beispiel #19
0
 public static DeploymentManager CreateInstance(IActorRefFactory factory, string connectionString, DataTransferManager manager, RepositoryApi api)
 => new DeploymentManager(factory.ActorOf(Props.Create(() => new DeploymentServerImpl(new MongoClient(connectionString), manager, api)), DeploymentApi.DeploymentPath));
 public Maybe <IActorRef> Init(IActorRefFactory superviser, Maybe <TWorkspace> workspace)
 {
     Workspace = workspace;
     return(superviser.ActorOf(() => new InternalRuleActor(ActorConstruct), Name));
 }
 public static TypedActorRef InterfacedActorOf(this IActorRefFactory factory, Props props, string name = null)
 {
     return(new TypedActorRef {
         Actor = factory.ActorOf(props, name), Type = props.Type
     });
 }
 public static IActorRef CreateListner(IActorRefFactory factory, Action <string> listner, Action <IOperationResult> onCompled, TimeSpan timeout, string?name = "LogListner")
 => factory.ActorOf(Props.Create(() => new Listner(listner, onCompled, timeout)).WithSupervisorStrategy(SupervisorStrategy.StoppingStrategy), name);
Beispiel #23
0
 public Task <Written> WriteEvents(long from, IImmutableList <IPersistentRepresentation> events) => factory
 .ActorOf(Props.Create(() => new EventWriterActor(persistenceId, journalRef)))
 .Ask <Written>(new Write(events.ToImmutableList(), from), Timeout);
 public IActorRef CreateActor(IActorRefFactory actorRefFactory, object id, object[] args)
 {
     return(actorRefFactory.ActorOf(Props.Create(() => new UserActor(_clusterContext, (long)id))));
 }
Beispiel #25
0
 public Task <Replayed> ReplayEvents(long from, long max) => factory
 .ActorOf(Props.Create(() => new EventReplayerActor(persistenceId, journalRef)))
 .Ask <Replayed>(new Replay(from, max), Timeout);
 public ProductActorProvider(IActorRefFactory system, IProductsDataSource productsDataSource)
 {
     _productActorRef = system.ActorOf(ProductActor.Props(productsDataSource), "products");
 }
Beispiel #27
0
 public IndexModel(IActorRefFactory actorRefFactory)
 {
     _queryRootActor = actorRefFactory.ActorOf <QueryRootActor>();
 }
Beispiel #28
0
 public static IActorRef ActorOf(this IActorRefFactory factory, Action <IActorDsl, IActorContext> config, string name = null)
 {
     return(factory.ActorOf(Props.Create(() => new Act(config)), name));
 }
 public static IActorRef CategoryQueryAggregate(this IActorRefFactory system)
 {
     return(system.ActorOf(Props.Create <CategoryQueryActor>(), SystemData.CategoryQueryActor.Name));
 }
Beispiel #30
0
 public AkkaViewModel(IActorRefFactory actorSystem) : this()
 {
     Actor = actorSystem.ActorOf(AkkaModelViewActor.Props(this));
 }
 public static IActorRef ActorOf <TActor>(this IActorRefFactory fac, Expression <Func <TActor> > creator,
                                          string?name = null) where TActor : ActorBase => fac.ActorOf(Props.Create(creator), name);
Beispiel #32
0
 public IActorRef CreateActor(IActorRefFactory actorRefFactory, object id, object[] args)
 => actorRefFactory.ActorOf(Props.Create <TActor>(args), id.ToString());
Beispiel #33
0
 public static IActorRef RunAsUnsupervisedActor <T>(this Action <T> action, IActorRefFactory actorRefFactory)
 {
     return(actorRefFactory.ActorOf(Props.Create(() => new FunctorActor <T>(action))));
 }
Beispiel #34
0
        public HomeViewModel(IActorRefFactory system)
        {
            DisplayName = "Home screen";

            _homeViewModelActor = system.ActorOf(Props.Create(() => new HomeViewModelActor(this)), ClientActorPaths.HomeViewModelActor.Name);
        }
Beispiel #35
0
 public EmployeeActorProvider(IActorRefFactory actorSystem, ICustomerRepository repo)
 {
     EmployeeActor = actorSystem.ActorOf(Props.Create <CustomersActor>(repo), "employees");
 }