Ejemplo n.º 1
0
 public ProfileFactory(
     ILifetimeScope scope,
     INewestLibraryVersionsVm newestLibraryVersions,
     ILogger logger)
 {
     _scope = scope;
     _newestLibraryVersions = newestLibraryVersions;
     _logger = logger;
 }
Ejemplo n.º 2
0
        public NewestProfileLibraryVersionsVm(
            INewestLibraryVersionsVm newestLibraryVersionsVm,
            IConsiderPrereleasePreference considerPrerelease)
        {
            ConsiderPrerelease = considerPrerelease;

            _newestMutagenVersion = Observable.CombineLatest(
                newestLibraryVersionsVm.WhenAnyValue(x => x.Versions),
                considerPrerelease.ConsiderPrereleases,
                (vers, prereleases) => prereleases ? vers.Prerelease.Mutagen : vers.Normal.Mutagen)
                                    .ToGuiProperty(this, nameof(NewestMutagenVersion), default(string?), deferSubscription: true);
            _newestSynthesisVersion = Observable.CombineLatest(
                newestLibraryVersionsVm.WhenAnyValue(x => x.Versions),
                considerPrerelease.ConsiderPrereleases,
                (vers, prereleases) => prereleases ? vers.Prerelease.Synthesis : vers.Normal.Synthesis)
                                      .ToGuiProperty(this, nameof(NewestSynthesisVersion), default(string?), deferSubscription: true);
        }
Ejemplo n.º 3
0
 public MainVm(
     ActiveRunVm activeRunVm,
     ProfileManagerVm profileManager,
     OpenProfileSettings openProfileSettings,
     OpenGlobalSettings openGlobalSettings,
     IConfirmationPanelControllerVm confirmationControllerVm,
     IProvideCurrentVersions currentVersions,
     ISelectedProfileControllerVm selectedProfile,
     ISaveSignal saveSignal,
     ISettingsSingleton settingsSingleton,
     INewestLibraryVersionsVm libVersionsVm,
     IActivePanelControllerVm activePanelControllerVm,
     IProfileFactory profileFactory,
     ILogger logger)
 {
     logger.Information("Creating MainVM");
     _selectedProfileController = selectedProfile;
     _settingsSingleton         = settingsSingleton;
     _activePanelControllerVm   = activePanelControllerVm;
     _profileFactory            = profileFactory;
     _logger      = logger;
     _activePanel = activePanelControllerVm.WhenAnyValue(x => x.ActivePanel)
                    .ToGuiProperty(this, nameof(ActivePanel), default, deferSubscription: true);