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); }); }
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(); }); }
protected override void PreStart() { pageNavigate = PageNavigate.Create <Views.RepoResultsForm, ViewModels.RepoResultsForm>(); base.PreStart(); }