Пример #1
0
        public InitializerActor()
        {
            ActorPathPrinter.Print(Self);

            Receive <Initialize>(_ =>
            {
                System.Console.WriteLine("Initialize");

                App.UIActors
                .ActorSelection(ActorPaths.DispatcherCoordinator)
                .Tell(PageNavigate.Create <Views.GithubAuth, ViewModels.GithubAuth>("Sign in to GitHub"));

                Become(Initialized);
            });
        }
Пример #2
0
        private void Initializing()
        {
            Receive <ValidateRepo>(repo => ((IWithUnboundedStash)this).Stash.Stash());

            Receive <AuthenticationSuccess>(auth =>
            {
                App.UIActors
                .ActorSelection(ActorPaths.DispatcherCoordinator)
                .Tell(PageNavigate.Create <Views.LauncherForm, ViewModels.LauncherForm>(
                          "Who Starred This Repo?", true));

                var githubClientFactor = GithubClientFactory.GetClientFactory(auth.Token);

                repoValidatorActor = App.GithubActors.ActorOf(
                    Props.Create <GetHubRepoValidatorActor>(githubClientFactor),
                    ActorNames.RepoValidator);

                githubCommanderActor = App.GithubActors.ActorOf(
                    Props.Create <GithubCommanderActor>(githubClientFactor),
                    ActorNames.GithubCommander);

                BecomeReady();
            });
        }
Пример #3
0
        protected override void PreStart()
        {
            pageNavigate = PageNavigate.Create <Views.RepoResultsForm, ViewModels.RepoResultsForm>();

            base.PreStart();
        }