示例#1
0
文件: App.xaml.cs 项目: csongysun/JF
        protected override Task OnInitializeAsync(IActivatedEventArgs args)
        {
            resourceLoaderAdaptler = new ResourceLoaderAdapter(new ResourceLoader());
            Container.RegisterInstance<IResourceLoader>(resourceLoaderAdaptler);
            Container.RegisterInstance<ISqlService>(new SqliteService(resourceLoaderAdaptler));

            Container.RegisterType<IOtherControlViewModel, OtherControlViewModel>(new ContainerControlledLifetimeManager());

            //Container.RegisterType<INavigationService,FrameNavigationService>();
            return base.OnInitializeAsync(args);
        }
 private IEnumerable<string> GetOrdinals()
 {
     var loader = new ResourceLoaderAdapter(new ResourceLoader());
     yield return loader.GetString("First");
     yield return loader.GetString("Second");
     yield return loader.GetString("Third");
     yield return loader.GetString("Fourth");
     yield return loader.GetString("Last");
 }
 static ErrorMessagesHelper()
 {
     ResourceLoader = new ResourceLoaderAdapter(new ResourceLoader());    
 }