private async Task BootstrapAsync() { this.builder.Register(c => this.RootFrame).Named <Frame>("Root"); this.builder.RegisterModule <MvvmModule>(); this.SetUp(this.RootFrame); // HACK: Register the current container Autofac.IContainer ioc = null; Func <Autofac.IContainer> factory = () => ioc; this.builder.RegisterInstance(factory); //////////////////////////////////////////////// ioc = this.builder.Build(); this.container = ioc.Resolve <IContainer>(); await this.OnStartingAsync(this.container); }
protected virtual Task OnClosingAsync(IContainer container) { return(Task.Factory.StartNew(() => { })); }