예제 #1
0
        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);
        }
예제 #2
0
 protected virtual Task OnClosingAsync(IContainer container)
 {
     return(Task.Factory.StartNew(() => { }));
 }