Beispiel #1
0
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await ConfigureWithEnvironmentServicesAsync(cancellationToken);

            XmlConfigurator.Configure(new FileInfo(Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName + @"\Log4Net.Config"));
            _outputLoggerService = new OutputLoggerService(JoinableTaskFactory, new LogWatcher());
            _outputLoggerService.StartLogger();

            await MutationExplorerWindowCommand.InitializeAsync(this, _bootstrapper.Container.Resolve <UserNotificationService>());

            await SelectProjectFileCommand.InitializeAsync(this, _bootstrapper.Container.Resolve <MutationFilterItemCreatorService>(), _bootstrapper.Container.Resolve <UserNotificationService>());

            await MutationConfigWindowCommand.InitializeAsync(this, _bootstrapper.Container.Resolve <UserNotificationService>(), _bootstrapper.Container.Resolve <EnvironmentService>(), _bootstrapper.Container.Resolve <SolutionInfoService>());

            await SelectLineCommand.InitializeAsync(this, _bootstrapper.Container.Resolve <MutationFilterItemCreatorService>(), _bootstrapper.Container.Resolve <UserNotificationService>());
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MainControlViewModel"/> class.
        /// </summary>
        /// <param name="organizationService">The organization service.</param>
        /// <param name="settings">The settings.</param>
        /// <param name="connectionDetailOriginalUrl">The connection detail original URL.</param>
        public MainControlViewModel(IOrganizationService organizationService, Settings settings,
                                    ConnectionDetail connectionDetailOriginalUrl)
        {
            _settings                     = settings;
            _connectionDetail             = connectionDetailOriginalUrl;
            _outputLoggerService          = new OutputLoggerService(this);
            _metadataRepository           = new MetadataRepository(organizationService);
            _crmVersionRepository         = new CrmVersionRepository(organizationService);
            _earlyBoundSettingsRepository = new EarlyBoundSettingsRepository();
            _generationService            = new GenerationService(_metadataRepository);
            SettingsPath                  = settings.CurrentSettingsPath;

            CreateSettingPathIfNotExist();
            CheckVersion();
            LoadSettings();
            RefreshEntities();
        }