예제 #1
0
 protected void Initialize([NotNull] IMvvmApplication application, [NotNull] IIocContainer iocContainer,
                           PlatformInfo platform, params Assembly[] assemblies)
 {
     Should.NotBeNull(application, nameof(application));
     Should.NotBeNull(iocContainer, nameof(iocContainer));
     application.Initialize(platform ?? PlatformInfo.UnitTest, iocContainer, assemblies, DataContext.Empty);
     if (ViewModelProvider == null)
     {
         IViewModelProvider viewModelProvider;
         ViewModelProvider = iocContainer.TryGet(out viewModelProvider) ? viewModelProvider : new ViewModelProvider(iocContainer);
     }
 }
예제 #2
0
 protected void Initialize([NotNull] IMvvmApplication application, [NotNull] IIocContainer iocContainer,
                           PlatformInfo platform, params Assembly[] assemblies)
 {
     Should.NotBeNull(application, "application");
     Should.NotBeNull(iocContainer, "iocContainer");
     ServiceProvider.DesignTimeManager = new DesignTimeManagerImpl(platform);
     application.Initialize(platform ?? PlatformInfo.UnitTest, iocContainer, assemblies, DataContext.Empty);
     if (ViewModelProvider == null)
     {
         IViewModelProvider viewModelProvider;
         ViewModelProvider = iocContainer.TryGet(out viewModelProvider) ? viewModelProvider : new ViewModelProvider(iocContainer);
     }
 }