public virtual async Task <TModule> AddPageAsync <TModule, TActivation>(TActivation activation) where TActivation : PageModuleToken <TModule> where TModule : SimpleModule { var module = await _activator.ActivateAsync(activation); Attach(module, activation); return((TModule)module); }
private void ActivateContent(PageControllerToken token) { var tabControllerToken = new TabControllerToken(); if (token.Content == null) { _activator.ActivateAsync(tabControllerToken) .ToObservable() .ObserveOnDispatcher(DispatcherPriority.Background) .Subscribe(module => { _host = module.Injector.Locate <TabPageHost>(); this.CentralControl = module.GetEntryComponent(); _host.AddPageAsync(token.ContentToken); }); } else { var tabModule = _activator.Activate(tabControllerToken); _host = tabModule.Injector.Locate <TabPageHost>(); this.CentralControl = tabModule.GetEntryComponent(); // _host.Attach(token.Content); } }