public FeatureTogglesController(
     IEnvironmentService environmentService,
     IFeatureToggleService applicationFeatureToggleService)
 {
     this.environmentService   = environmentService;
     this.featureToggleService = applicationFeatureToggleService;
 }
Exemplo n.º 2
0
 public QRCodeGeneration(ICloudStorage cloudStorage, IConfiguration configuration, ICipherService cipher, IEnvironmentService env)
 {
     _cipher        = cipher;
     _configuration = configuration;
     _cloudStorage  = cloudStorage;
     _env           = env;
 }
 public CashflowStatementConsoleWriterService(
     ILoggerFactory loggerFactory,
     IEnvironmentService environmentService)
 {
     m_logger             = loggerFactory.CreateLogger <CashflowStatementConsoleWriterService>();
     m_environmentService = environmentService;
 }
        public GoogleCloudStorage(IEnvironmentService env)
        {
            var googleCredential = GoogleCredential.FromJson(env.GoogleCredential);

            _storageClient = StorageClient.Create(googleCredential);
            _bucketName    = env.GoogleCloudStorageBucket;
        }
Exemplo n.º 5
0
 public ExceptionPolicyService(
     IEnvironmentService environmentService,
     IAnalyticsService analyticsService)
 {
     _environmentService = environmentService;
     _analyticsService   = analyticsService;
 }
Exemplo n.º 6
0
 public DriveNameService(
     IProcessService processService,
     IEnvironmentService environmentService)
 {
     _processService     = processService;
     _environmentService = environmentService;
 }
 public EnvironmentController(
     IEnvironmentService environmentService,
     IMapper mapper)
 {
     this._environmentService = environmentService;
     this._mapper             = mapper;
 }
 public GoogleCloudStorage(IEnvironmentService env)
 {
     _env             = env;
     googleCredential = GoogleCredential.FromJson(_env.GoogleCredential);
     storageClient    = StorageClient.Create(googleCredential);
     bucketName       = _env.GoogleCloudStorageBucket;
 }
Exemplo n.º 9
0
 public BrowserViewModel(
     IEnvironmentService environmentService,
     IAnalyticsService analyticsService) : base(analyticsService)
 {
     _environmentService = environmentService;
     _analyticsService   = analyticsService;
 }
Exemplo n.º 10
0
 public CloudIntegrationService(IEnvironmentService environmentService, ICloudCallbackFactory cloudCallbackFactory)
 {
     this.environmentService   = environmentService;
     this.cloudCallbackFactory = cloudCallbackFactory;
     httpClient = new HttpClient();
     httpClient.DefaultRequestHeaders.Add("X-Api-Key", environmentService.ApiKey);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TestQueueExecutableService" /> class.
 /// </summary>
 /// <param name="table">The table test data.</param>
 /// <param name="suiteService">The suite service.</param>
 /// <param name="testQueueService">The test queue service.</param>
 /// <param name="mapperFactory">The mapper factory.</param>
 /// <param name="schedulerService">The scheduler service.</param>
 /// <param name="browserService">The browser service.</param>
 /// <param name="actionService">The action service.</param>
 /// <param name="testDataSharedTestDataMapService">The test data shared test data map service.</param>
 /// <param name="sharedTestDataService">The shared test data service.</param>
 /// <param name="apiConncetionService">The API conncetion service.</param>
 /// <param name="schedulerHistoryService">The scheduler history service.</param>
 /// <param name="environmentService">The environment service.</param>
 /// <param name="reportLinkDataService">The report data service.</param>
 public TestQueueExecutableService(
     IRepository <TblTestData> table,
     ISuiteService suiteService,
     ITestQueueService testQueueService,
     IMapperFactory mapperFactory,
     ISchedulerService schedulerService,
     IBrowserService browserService,
     IActionsService actionService,
     ITestDataSharedTestDataMapService testDataSharedTestDataMapService,
     ISharedTestDataService sharedTestDataService,
     IApiConnectionService apiConncetionService,
     ISchedulerHistoryService schedulerHistoryService,
     IEnvironmentService environmentService,
     IReportLinkDataService reportLinkDataService)
 {
     this.table            = table;
     this.suiteService     = suiteService;
     this.mapperFactory    = mapperFactory;
     this.schedulerService = schedulerService;
     this.testQueueService = testQueueService;
     this.browserService   = browserService;
     this.actionService    = actionService;
     this.testDataSharedTestDataMapService = testDataSharedTestDataMapService;
     this.sharedTestDataService            = sharedTestDataService;
     this.apiConncetionService             = apiConncetionService;
     this.schedulerHistoryService          = schedulerHistoryService;
     this.environmentService    = environmentService;
     this.reportLinkDataService = reportLinkDataService;
 }
Exemplo n.º 12
0
 public ModuleController(
     Lazy <ShellService> shellService,
     IEnvironmentService environmentService,
     ISettingsProvider settingsProvider,
     ISharedCookieService cookieService,
     Lazy <ManagerController> managerController,
     Lazy <QueueController> queueController,
     Lazy <DetailsController> detailsController,
     Lazy <CrawlerController> crawlerController,
     Lazy <ShellViewModel> shellViewModel,
     IApplicationUpdateService applicationUpdateService,
     ILogService logService,
     Lazy <IMessageService> messageService)
 {
     _shellService             = shellService;
     _environmentService       = environmentService;
     _settingsProvider         = settingsProvider;
     _cookieService            = cookieService;
     _detailsController        = detailsController;
     _managerController        = managerController;
     _queueController          = queueController;
     _crawlerController        = crawlerController;
     _shellViewModel           = shellViewModel;
     _queueManager             = new QueueManager();
     _applicationUpdateService = applicationUpdateService;
     _logService     = logService;
     _messageService = messageService;
 }
Exemplo n.º 13
0
 public SharpZipFileUnpackService(IFileSystem fileSystem, IEnvironmentService environmentService, IProcessManager processManager, ILog log)
 {
     this.fileSystem         = fileSystem;
     this.environmentService = environmentService;
     this.processManager     = processManager;
     this.log = log;
 }
 public BrokeredAuthenticationService(IApplicationRegisterService applicationRegisterService, IEnvironmentService environmentService)
 {
     this.applicationRegisterService = applicationRegisterService;
     this.environmentService = environmentService;
     settings = SettingsManager.ProviderSettings;
     sessionService = SessionsManager.ProviderSessionService;
 }
Exemplo n.º 15
0
 public ModuleController(
     Lazy <ShellService> shellService,
     IEnvironmentService environmentService,
     IConfirmTumblrPrivacyConsent confirmTumblrPrivacyConsent,
     ISettingsProvider settingsProvider,
     ISharedCookieService cookieService,
     Lazy <ManagerController> managerController,
     Lazy <QueueController> queueController,
     Lazy <DetailsController> detailsController,
     Lazy <CrawlerController> crawlerController,
     Lazy <ShellViewModel> shellViewModel,
     IApplicationUpdateService applicationUpdateService)
 {
     _shellService                = shellService;
     _environmentService          = environmentService;
     _confirmTumblrPrivacyConsent = confirmTumblrPrivacyConsent;
     _settingsProvider            = settingsProvider;
     _cookieService               = cookieService;
     _detailsController           = detailsController;
     _managerController           = managerController;
     _queueController             = queueController;
     _crawlerController           = crawlerController;
     _shellViewModel              = shellViewModel;
     _queueManager                = new QueueManager();
     _applicationUpdateService    = applicationUpdateService;
 }
Exemplo n.º 16
0
 private DeviceProvider(Environment environment, IEnvironmentService service,
     Guid id, string name, string description)
     : base(id, name, description)
 {
     this.environment = environment;
     this.service = service;
 }
Exemplo n.º 17
0
 public TexoCommand(
     IEnvironmentService environment,
     IInputHistoryService history)
 {
     this.environment = new EnvironmentCommand(environment);
     this.history     = new HistoryCommand(history);
 }
        internal static INodeJSService INodeJSServiceFactory(IServiceProvider serviceProvider)
        {
            OutOfProcessNodeJSServiceOptions outOfProcessNodeJSServiceOptions = serviceProvider.GetRequiredService <IOptions <OutOfProcessNodeJSServiceOptions> >().Value;
            IEnvironmentService environmentService = serviceProvider.GetRequiredService <IEnvironmentService>();

            int concurrencyDegree = outOfProcessNodeJSServiceOptions.ConcurrencyDegree;
            int processorCount    = environmentService.ProcessorCount; // TODO to be safe we should ensure that this is >= 1

            if (outOfProcessNodeJSServiceOptions.Concurrency == Concurrency.None ||
                concurrencyDegree == 1 ||                      // MultiProcess mode but only 1 process
                concurrencyDegree <= 0 && processorCount == 1) // Machine has only 1 logical processor
            {
                return(ActivatorUtilities.CreateInstance <HttpNodeJSService>(serviceProvider));
            }
            else
            {
                if (concurrencyDegree <= 0)
                {
                    concurrencyDegree = processorCount;
                }

                var httpNodeJSServices = new HttpNodeJSService[concurrencyDegree];
                for (int i = 0; i < concurrencyDegree; i++)
                {
                    httpNodeJSServices[i] = ActivatorUtilities.CreateInstance <HttpNodeJSService>(serviceProvider);
                }

                return(new HttpNodeJSPoolService(new ReadOnlyCollection <HttpNodeJSService>(httpNodeJSServices)));
            }
        }
Exemplo n.º 19
0
 public BalanceSheetConsoleWriterService(
     ILoggerFactory loggerFactory,
     IEnvironmentService environmentService)
 {
     m_logger             = loggerFactory.CreateLogger <BalanceSheetConsoleWriterService>();
     m_environmentService = environmentService;
 }
Exemplo n.º 20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ThemeService"/> class.
 /// </summary>
 /// <param name="settingsService">A settings service, which can get the current theme.</param>
 /// <param name="environmentService">A environment service, which can get device information.</param>
 public ThemeService(ISettingsService settingsService, IEnvironmentService environmentService)
 {
     _settingsService    = settingsService;
     _environmentService = environmentService;
     Themes = new List <ThemeModel>();
     FillThemes(Themes);
 }
Exemplo n.º 21
0
 public async Task <Environment?> GetEnvironmentByIdAsync(
     [Service] IEnvironmentService environmentService,
     [ID(nameof(Environment))] Guid id,
     CancellationToken cancellationToken)
 {
     return(await environmentService.GetByIdAsync(id, cancellationToken));
 }
Exemplo n.º 22
0
        public ModuleController(IEnvironmentService environmentService, IPresentationService presentationService, ShellService shellService,
                                Lazy <FileController> fileController, Lazy <RichTextDocumentController> richTextDocumentController, Lazy <PrintController> printController,
                                Lazy <ShellViewModel> shellViewModel, Lazy <MainViewModel> mainViewModel, Lazy <StartViewModel> startViewModel)
        {
            // Upgrade the settings from a previous version when the new version starts the first time.
            if (Settings.Default.IsUpgradeNeeded)
            {
                Settings.Default.Upgrade();
                Settings.Default.IsUpgradeNeeded = false;
            }

            // Initializing the cultures must be done first. Therefore, we inject the Controllers and ViewModels lazy.
            InitializeCultures();
            presentationService.InitializeCultures();

            this.environmentService         = environmentService;
            this.fileController             = fileController.Value;
            this.richTextDocumentController = richTextDocumentController.Value;
            this.printController            = printController.Value;
            this.shellViewModel             = shellViewModel.Value;
            this.mainViewModel  = mainViewModel.Value;
            this.startViewModel = startViewModel.Value;

            shellService.ShellView       = this.shellViewModel.View;
            this.shellViewModel.Closing += ShellViewModelClosing;
            exitCommand = new DelegateCommand(Close);
        }
Exemplo n.º 23
0
 public MusicCastHost(IEnvironmentService environmentService)
 {
     _environmentService = environmentService;
     Name       = Environment.MachineName;
     _tags      = new Dictionary <string, string>();
     LocationId = "7345174dcfd44df2834f1d02452cbe3c";
 }
Exemplo n.º 24
0
 public IQueryable <Environment> SearchEnvironments(
     [Service] IEnvironmentService environmentService,
     string?search,
     CancellationToken cancellationToken)
 {
     return(environmentService.SearchAsync(search, cancellationToken));
 }
        public FileController(IMessageService messageService, IFileDialogService fileDialogService, IShellService shellService, IEnvironmentService environmentService,
                              IClipboardService clipboardService, FileService fileService, ExportFactory <SaveChangesViewModel> saveChangesViewModelFactory)
        {
            this.messageService              = messageService;
            this.fileDialogService           = fileDialogService;
            this.shellService                = shellService;
            this.environmentService          = environmentService;
            this.clipboardService            = clipboardService;
            this.fileService                 = fileService;
            this.saveChangesViewModelFactory = saveChangesViewModelFactory;
            closeCommand    = new DelegateCommand(CloseFile, CanCloseFile);
            closeAllCommand = new DelegateCommand(CloseAll, CanCloseAll);
            saveCommand     = new DelegateCommand(SaveFile, CanSaveFile);
            saveAsCommand   = new DelegateCommand(SaveAsFile, CanSaveAsFile);

            this.fileService.NewCSharpCommand                   = new DelegateCommand(NewCSharpFile);
            this.fileService.NewVisualBasicCommand              = new DelegateCommand(NewVisualBasicFile);
            this.fileService.NewCSharpFromClipboardCommand      = new DelegateCommand(NewCSharpFromClipboard, CanNewFromClipboard);
            this.fileService.NewVisualBasicFromClipboardCommand = new DelegateCommand(NewVisualBasicFromClipboard, CanNewFromClipboard);
            this.fileService.OpenCommand     = new DelegateCommand(OpenFile);
            this.fileService.CloseCommand    = closeCommand;
            this.fileService.CloseAllCommand = closeAllCommand;
            this.fileService.SaveCommand     = saveCommand;
            this.fileService.SaveAsCommand   = saveAsCommand;

            cSharpFileType        = new FileType(Resources.CSharpFile, ".cs");
            visualBasicFileType   = new FileType(Resources.VisualBasicFile, ".vb");
            allFilesType          = new FileType(Resources.CodeFile, ".cs;*.vb");
            observedDocumentFiles = new List <DocumentFile>();
            PropertyChangedEventManager.AddHandler(fileService, FileServicePropertyChanged, "");
            shellService.Closing += ShellServiceClosing;
        }
Exemplo n.º 26
0
        public AmazonS3Service(IAmazonS3 amazonS3, IEnvironmentService environmentService)
        {
            _amazonS3 = amazonS3;

            _bucketName = environmentService.GetEnvironmentValue(S3_BUCKET);
            _s3Prefix   = environmentService.GetEnvironmentValue(S3_PREFIX);
        }
Exemplo n.º 27
0
        public ApplicationController(IEnvironmentService environmentService, IPresentationService presentationService, ShellService shellService,
            Lazy<FileController> fileController, Lazy<RichTextDocumentController> richTextDocumentController, Lazy<PrintController> printController,
            Lazy<ShellViewModel> shellViewModel, Lazy<MainViewModel> mainViewModel, Lazy<StartViewModel> startViewModel)
        {
            // Upgrade the settings from a previous version when the new version starts the first time.
            if (Settings.Default.IsUpgradeNeeded)
            {
                Settings.Default.Upgrade();
                Settings.Default.IsUpgradeNeeded = false;
            }

            // Initializing the cultures must be done first. Therefore, we inject the Controllers and ViewModels lazy.
            InitializeCultures();
            presentationService.InitializeCultures();

            this.environmentService = environmentService;
            this.fileController = fileController.Value;
            this.richTextDocumentController = richTextDocumentController.Value;
            this.printController = printController.Value;
            this.shellViewModel = shellViewModel.Value;
            this.mainViewModel = mainViewModel.Value;
            this.startViewModel = startViewModel.Value;

            shellService.ShellView = this.shellViewModel.View;
            this.shellViewModel.Closing += ShellViewModelClosing;
            this.exitCommand = new DelegateCommand(Close);
        }
Exemplo n.º 28
0
 public PluginDataManager(string componentRuntimeId)
 {
     _componentRuntimeId = componentRuntimeId;
     _loggingService     =
         ServicesContainer.ServicesProvider.GetLoggingService(nameof(PluginDataManager));
     _environmentService = ServicesContainer.ServicesProvider.GetEnvironmentService();
 }
 public WaitForMcrImageIngestionCommand(
     ILoggerService loggerService, IMcrStatusClientFactory mcrStatusClientFactory, IEnvironmentService environmentService)
 {
     _loggerService          = loggerService ?? throw new ArgumentNullException(nameof(loggerService));
     _mcrStatusClientFactory = mcrStatusClientFactory ?? throw new ArgumentNullException(nameof(mcrStatusClientFactory));
     _environmentService     = environmentService ?? throw new ArgumentNullException(nameof(environmentService));
 }
Exemplo n.º 30
0
 internal SamplingRecordProvider(Environment environment, IEnvironmentService service,
     IRecordable recordable, int id, bool recordPeriodEnabled, TimeSpan recordPeriod)
     : base(environment, service, recordable, id)
 {
     this.recordPeriodEnabled = recordPeriodEnabled;
     this.recordPeriod = recordPeriod;
 }
Exemplo n.º 31
0
 public BrokeredAuthenticationService(IApplicationRegisterService applicationRegisterService, IEnvironmentService environmentService)
 {
     this.applicationRegisterService = applicationRegisterService;
     this.environmentService         = environmentService;
     settings       = SettingsManager.ProviderSettings;
     sessionService = SessionsManager.ProviderSessionService;
 }
Exemplo n.º 32
0
 /// <summary>
 /// Initializes a new instance of the TimeLeftCalculator class.
 /// </summary>
 /// <param name="environmentService">A reference to an IEnvironmentService.</param>
 /// <param name="frameCount">The total number of frames to encode.</param>
 /// <param name="historyLength">The number of status entries to store. The larger the number, the slower the time left will change. Default is 20.</param>
 public TimeLeftCalculator(IEnvironmentService environmentService, long frameCount, int historyLength = 20)
 {
     this.environment   = environmentService ?? throw new ArgumentNullException(nameof(environmentService));
     this.FrameCount    = frameCount;
     this.HistoryLength = historyLength;
     progressHistory    = new KeyValuePair <DateTime, long> [historyLength];
 }
Exemplo n.º 33
0
 public TestRunnerService(
     IServiceClient <TestRunDto> testRunRepository,
     IServiceClient <TestRunLogDto> testRunLogRepository,
     IProcessProvider processStarter,
     IFileProvider fileProvider,
     IDirectoryProvider directoryProvider,
     IPathProvider pathProvider,
     IConsoleProvider consoleProvider,
     ITestsRunnerTestResultsService testResultsService,
     IJsonSerializer jsonSerializer,
     ITestCasesHistoryService testCasesHistoryService,
     ITaskProvider taskProvider,
     IPluginService pluginService,
     ITestRunLogService testRunLogService,
     IDateTimeProvider dateTimeProvider,
     IEnvironmentService environmentService)
 {
     _testRunRepository       = testRunRepository;
     _testRunLogRepository    = testRunLogRepository;
     _processStarter          = processStarter;
     _fileProvider            = fileProvider;
     _directoryProvider       = directoryProvider;
     _pathProvider            = pathProvider;
     _consoleProvider         = consoleProvider;
     _testResultsService      = testResultsService;
     _jsonSerializer          = jsonSerializer;
     _testCasesHistoryService = testCasesHistoryService;
     _taskProvider            = taskProvider;
     _pluginService           = pluginService;
     _testRunLogService       = testRunLogService;
     _dateTimeProvider        = dateTimeProvider;
     _environmentService      = environmentService;
 }
Exemplo n.º 34
0
        public static void OpenEmail(this IEnvironmentService self, IEnumerable <string> to, string subject, string body,
                                     IEnumerable <string> attachments)
        {
            IEnumerable <string> nostrings = Enumerable.Empty <string> ();

            self.OpenEmail(to, nostrings, nostrings, subject, body, attachments);
        }
Exemplo n.º 35
0
 internal RecordableCommand(Environment environment, IEnvironmentService service,
     Guid id, IRecordType type, string name, string description, bool isAvailable,
     bool isSynchronous)
     : base(environment, service,
           id, type, name, description, isAvailable)
 {
     IsSynchronous = isSynchronous;
 }
Exemplo n.º 36
0
 private Device(Environment environment, IEnvironmentService service,
     Guid id, string name, string description, ISpatialLocation location,
     bool isAvailable, bool isConnected)
     : base(id, name, description, location)
 {
     this.environment = environment;
     this.service = service;
 }
Exemplo n.º 37
0
 internal ValueRecordProvider(Environment environment, IEnvironmentService service,
     IRecordable recordable, int id, bool recordPeriodEnabled, TimeSpan recordPeriod,
     int batchSize, TimeSpan? batchPeriod)
     : base(environment, service, recordable, id, recordPeriodEnabled, recordPeriod)
 {
     this.batchSize = batchSize;
     this.batchPeriod = batchPeriod;
 }
Exemplo n.º 38
0
 internal static async Task<DeviceProvider> Create(Guid id, Environment environment, IEnvironmentService service)
 {
     service.ValidateNonNull(nameof(service));
     var info = await service.DeviceProvider(id);
     var result = new DeviceProvider(environment, service,
         id, info.Name, info.Description);
     await AddDevices(environment, service, info.DeviceIds, result.Devices);
     return result;
 }
Exemplo n.º 39
0
 public ErrorService(IHttpClientService httpClient, IJsonSerializationService jsonSerialization, IEnvironmentService environmentService, IAccountsService accountsService)
 {
     _jsonSerialization = jsonSerialization;
     _environmentService = environmentService;
     _accountsService = accountsService;
     _httpClient = httpClient.Create();
     _httpClient.Timeout = new TimeSpan(0, 0, 10);
     _httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
 }
Exemplo n.º 40
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PolicyService" /> class.
        /// </summary>
        /// <param name="providers">The providers.</param>
        /// <param name="service">The service.</param>
        /// <exception cref="System.ArgumentException">Some providers are required to initialize the Decisions.Application.Services.PolicyService</exception>
        public PolicyService(IEnumerable<IPolicyProvider> providers, IEnvironmentService service)
        {
            if (providers == null || providers.Any() == false) throw new ArgumentException("Some providers are required to initialize the Decisions.Application.Services.PolicyService");

            foreach (var policyList in providers.Select(policyProvider => policyProvider.GetPolicies().ToList()))
            {
                policyList.Where(a => a.Value.Service == null).ToList().ForEach(a => a.Value.Service = service);
                policyList.ForEach(a => policies.AddOrUpdate(a.Key, a.Value, (key, oldValue) => { throw new ArgumentException("A Policy with this key has already been registered.", key); }));
            }
        }
 public EnvironmentsViewModel(IEnvironmentService environmentService)
 {
     _environmentService = environmentService;
     Environments = new ObservableCollection<EnvironmentViewModel>();
     AvailableDatabaseTypes = new ObservableCollection<string>(new []{"none", "sqlserver", "mysql", "sqlite"});
     _repo = new XmlEnvironmentViewerRepo("environments.xml");
     LoadEnvironments();
     AddEnvironmentCommand = new DelegateCommand(AddEnvironment);
     SaveAllEnvironmentsCommand = new DelegateCommand(SaveAllEnvironments);
 }
Exemplo n.º 42
0
 internal static async Task<Device> Create(Guid id, Environment environment, IEnvironmentService service)
 {
     service.ValidateNonNull(nameof(service));
     var info = await service.Device(id);
     var result = new Device(environment, service,
         id, info.Name, info.Description, info.Location,
         info.IsAvailable, info.IsConnected);
     await DeviceProvider.AddDevices(environment, service, info.DeviceIds, result.Devices);
     await AddRecordables(environment, service, info.RecordableIds, result);
     return result;
 }
Exemplo n.º 43
0
 internal static async Task AddDevices(Environment environment, IEnvironmentService service,
     IEnumerable<Guid> deviceIds, INotifyList<IDevice, Guid> devices)
 {
     IEnumerable<IDevice> localDevices = null;
     await Task.Run(() =>
     {
         localDevices = deviceIds.
           AsParallel().AsOrdered().
           Select(did => Device.Create(did, environment, service).Result);
     });
     devices.Add(localDevices);
 }
Exemplo n.º 44
0
 public EnvironmentViewModel(EnvironmentsViewModel environmentsViewModel,
     IEnvironmentService environmentService,
     EnvironmentData environmentData)
 {
     _environmentsViewModel = environmentsViewModel;
     _environmentService = environmentService;
     EnvironmentData = environmentData;
     AddEnvironmentCommand = new DelegateCommand(AddEnvironment);
     RemoveEnvironmentCommand = new DelegateCommand(RemoveEnvironment);
     UpdateStatusCommand = new DelegateCommand(UpdateStatus);
     AvailableDatabaseTypes = _environmentsViewModel.AvailableDatabaseTypes;
     UpdateStatus(null);
 }
Exemplo n.º 45
0
        internal static async Task AddRecordables(Environment environment, IEnvironmentService service,
            IEnumerable<Guid> recordableIds, Device device)
        {
            IEnumerable<IRecordable> recordables = null;
            await Task.Run(() =>
            {
                recordables = recordableIds.
                  AsParallel().AsOrdered().
                  Select(rid => Recordable.Create(rid, environment, service).Result);

            });
            device.Recordables.Add(recordables);
        }
Exemplo n.º 46
0
 public ModuleController(Lazy<ShellService> shellService, IEnvironmentService environmentService, ISettingsProvider settingsProvider, 
     FileController fileController, WorkspaceController workspaceController, IFileService fileService,
     Lazy<ShellViewModel> shellViewModel, ExportFactory<CodeEditorViewModel> codeEditorViewModelFactory, ExportFactory<InfoViewModel> infoViewModelFactory)
 {
     this.shellService = shellService;
     this.environmentService = environmentService;
     this.settingsProvider = settingsProvider;
     this.fileController = fileController;
     this.workspaceController = workspaceController;
     this.shellViewModel = shellViewModel;
     this.codeEditorViewModelFactory = codeEditorViewModelFactory;
     this.infoViewModelFactory = infoViewModelFactory;
     this.infoCommand = new DelegateCommand(ShowInfo);
     this.documentDataModels = new SynchronizingCollection<DocumentDataModel, DocumentFile>(fileService.DocumentFiles, CreateDocumentDataModel);
 }
        public GetLatestController(IVersionControlService versionControlService, IAdeNetExeAdaper adeNetExeAdapter, IBuildEngineService buildEngineService, IDatabaseService databaseService, IEnvironmentService environmentService, IConvention convention, ITextOutputService textOutputService)
        {
            if(versionControlService == null) throw new ArgumentNullException("versionControlService");
            if(adeNetExeAdapter == null) throw new ArgumentNullException("adeNetExeAdapter");
            if(buildEngineService == null) throw new ArgumentNullException("buildEngineService");
            if(databaseService == null) throw new ArgumentNullException("databaseService");
            if(environmentService == null) throw new ArgumentNullException("environmentService");

            this.VersionControl = versionControlService;
            this.AdeNet = adeNetExeAdapter;
            this.BuildEngine = buildEngineService;
            this.Database = databaseService;
            this.Environment = environmentService;
            this.Convention = convention;
            this.TextOutput = textOutputService;
        }
Exemplo n.º 48
0
 public PlayerController(IShellService shellService, IEnvironmentService environmentService, ISelectionService selectionService, PlayerService playerService, 
     Lazy<PlayerViewModel> playerViewModel, ExportFactory<InfoViewModel> infoViewModelFactory)
 {
     this.shellService = shellService;
     this.environmentService = environmentService;
     this.selectionService = selectionService;
     this.playerService = playerService;
     this.playerViewModel = playerViewModel;
     this.infoViewModelFactory = infoViewModelFactory;
     this.playAllCommand = new DelegateCommand(PlayAll, CanPlayAll);
     this.playSelectedCommand = new DelegateCommand(PlaySelected, CanPlaySelected);
     this.enqueueAllCommand = new DelegateCommand(EnqueueAll, CanEnqueueAll);
     this.enqueueSelectedCommand = new DelegateCommand(EnqueueSelected, CanEnqueueSelected);
     this.previousTrackCommand = new DelegateCommand(PreviousTrack, CanPreviousTrack);
     this.nextTrackCommand = new DelegateCommand(NextTrack, CanNextTrack);
     this.infoCommand = new DelegateCommand(ShowInfo);
 }
        public ApplicationController(CompositionContainer container, IEnvironmentService environmentService,
            IPresentationService presentationService, ShellService shellService, FileController fileController)
        {
            InitializeCultures();
            presentationService.InitializeCultures();

            this.environmentService = environmentService;
            this.fileController = fileController;

            this.solutionDocumentController = container.GetExportedValue<SolutionDocumentController>();
            this.shellViewModel = container.GetExportedValue<ShellViewModel>();
            this.mainViewModel = container.GetExportedValue<MainViewModel>();
            this.startViewModel = container.GetExportedValue<StartViewModel>();

            shellService.ShellView = shellViewModel.View;
            this.shellViewModel.Closing += ShellViewModelClosing;
            this.exitCommand = new DelegateCommand(Close);
        }
        public RemoveMappingController(IVersionControlService versionControlService, IAdeNetExeAdaper adeNetExeAdapter, IFileSystemAdapter fileSystemAdapter, IDatabaseService databaseService, IAblageService ablageService, IEnvironmentService environmentService, IConvention convention, ITextOutputService textOutputService)
        {
            if(versionControlService == null) throw new ArgumentNullException("versionControlService");
            if(adeNetExeAdapter == null) throw new ArgumentNullException("adeNetExeAdapter");
            if(fileSystemAdapter == null) throw new ArgumentNullException("fileSystemAdapter");
            if(databaseService == null) throw new ArgumentNullException("databaseService");
            if(ablageService == null) throw new ArgumentNullException("ablageService");
            if(convention == null) throw new ArgumentNullException("convention");

            this.VersionControl = versionControlService;
            this.AdeNetExeAdapter = adeNetExeAdapter;
            this.FileSystem = fileSystemAdapter;
            this.Database = databaseService;
            this.Ablage = ablageService;
            this.Environment = environmentService;
            this.Convention = convention;
            this.TextOutput = textOutputService;
        }
 public PlaylistController(IFileDialogService fileDialogService, IShellService shellService, IEnvironmentService environmentService, 
     IMusicFileContext musicFileContext, IPlayerService playerService, IMusicPropertiesService musicPropertiesService, Lazy<PlaylistViewModel> playlistViewModel)
 {
     this.fileDialogService = fileDialogService;
     this.playlistViewModel = playlistViewModel;
     this.shellService = shellService;
     this.environmentService = environmentService;
     this.musicFileContext = musicFileContext;
     this.playerService = playerService;
     this.musicPropertiesService = musicPropertiesService;
     this.playSelectedCommand = new DelegateCommand(PlaySelected, CanPlaySelected);
     this.removeSelectedCommand = new DelegateCommand(RemoveSelected, CanRemoveSelected);
     this.showMusicPropertiesCommand = new DelegateCommand(ShowMusicProperties);
     this.openListCommand = new DelegateCommand(OpenList);
     this.saveListCommand = new DelegateCommand(SaveList);
     this.clearListCommand = new DelegateCommand(ClearList);
     this.openPlaylistFileType = new FileType(Resources.Playlist, SupportedFileTypes.PlaylistFileExtensions);
     this.savePlaylistFileType = new FileType(Resources.Playlist, SupportedFileTypes.PlaylistFileExtensions.First());
 }
Exemplo n.º 52
0
 public ManagerController(IShellService shellService, IEnvironmentService environmentService, IMusicFileContext musicFileContext, 
     SelectionService selectionService, ManagerStatusService managerStatusService, IFileSystemWatcherService fileSystemWatcherService, 
     Lazy<ManagerViewModel> managerViewModel)
 {
     this.shellService = shellService;
     this.environmentService = environmentService;
     this.musicFileContext = musicFileContext;
     this.selectionService = selectionService;
     this.managerStatusService = managerStatusService;
     this.fileSystemWatcherService = fileSystemWatcherService;
     this.managerViewModel = managerViewModel;
     this.musicFiles = new ObservableCollection<MusicFile>();
     this.updateSubDirectoriesCommand = new DelegateCommand(UpdateSubDirectories);
     this.navigateDirectoryUpCommand = new DelegateCommand(NavigateDirectoryUp, CanNavigateDirectoryUp);
     this.navigateHomeCommand = new DelegateCommand(NavigateHome);
     this.navigatePublicHomeCommand = new DelegateCommand(NavigatePublicHome);
     this.loadRecursiveCommand = new DelegateCommand(LoadRecursive);
     this.navigateToSelectedSubDirectoryCommand = new DelegateCommand(NavigateToSelectedSubDirectory);
     this.showMusicPropertiesCommand = new DelegateCommand(ShowMusicProperties);
 }
Exemplo n.º 53
0
        public FileController(IMessageService messageService, IFileDialogService fileDialogService, IShellService shellService, IEnvironmentService environmentService, 
            IClipboardService clipboardService, FileService fileService, ExportFactory<SaveChangesViewModel> saveChangesViewModelFactory)
        {
            this.messageService = messageService;
            this.fileDialogService = fileDialogService;
            this.shellService = shellService;
            this.environmentService = environmentService;
            this.clipboardService = clipboardService;
            this.fileService = fileService;
            this.saveChangesViewModelFactory = saveChangesViewModelFactory;
            this.newCSharpCommand = new DelegateCommand(NewCSharpFile);
            this.newVisualBasicCommand = new DelegateCommand(NewVisualBasicFile);
            this.newCSharpFromClipboardCommand = new DelegateCommand(NewCSharpFromClipboard, CanNewFromClipboard);
            this.newVisualBasicFromClipboardCommand = new DelegateCommand(NewVisualBasicFromClipboard, CanNewFromClipboard);
            this.openCommand = new DelegateCommand(OpenFile);
            this.closeCommand = new DelegateCommand(CloseFile, CanCloseFile);
            this.closeAllCommand = new DelegateCommand(CloseAll, CanCloseAll);
            this.saveCommand = new DelegateCommand(SaveFile, CanSaveFile);
            this.saveAsCommand = new DelegateCommand(SaveAsFile, CanSaveAsFile);

            this.fileService.NewCSharpCommand = newCSharpCommand;
            this.fileService.NewVisualBasicCommand = newVisualBasicCommand;
            this.fileService.NewCSharpFromClipboardCommand = newCSharpFromClipboardCommand;
            this.fileService.NewVisualBasicFromClipboardCommand = newVisualBasicFromClipboardCommand;
            this.fileService.OpenCommand = openCommand;
            this.fileService.CloseCommand = closeCommand;
            this.fileService.CloseAllCommand = closeAllCommand;
            this.fileService.SaveCommand = saveCommand;
            this.fileService.SaveAsCommand = saveAsCommand;

            this.cSharpFileType = new FileType(Resources.CSharpFile, ".cs");
            this.visualBasicFileType = new FileType(Resources.VisualBasicFile, ".vb");
            this.allFilesType = new FileType(Resources.CodeFile, ".cs;*.vb");
            this.observedDocumentFiles = new List<DocumentFile>();
            PropertyChangedEventManager.AddHandler(fileService, FileServicePropertyChanged, "");
            shellService.Closing += ShellServiceClosing;
        }
Exemplo n.º 54
0
 public DocumentController(IEnvironmentService environmentService)
 {
     this.environmentService = environmentService;
 }
 public CapabilityService()
 {
     _EnvironmentService = DependencyService.Get<IEnvironmentService>();
 }
Exemplo n.º 56
0
 public XNavigationPageView(IOrientationSensor orientationSensor, IEnvironmentService environmentService)
 {
     _orientationSensor = orientationSensor;
     _environmentService = environmentService;
 }
 public DirectAuthenticationService(IApplicationRegisterService applicationRegisterService, IEnvironmentService environmentService)
 {
     this.applicationRegisterService = applicationRegisterService;
     this.environmentService = environmentService;
 }
Exemplo n.º 58
0
 public StyleManager(IEnvironmentService environmentService)
 {
     this.environmentService = environmentService;
     styles = new Lazy<IDictionary<String, FormatDefinitionStyle>>(GetColors);
 }
 public OpenWebController(IEnvironmentService environmentService)
 {
     this.Environment = environmentService;
 }
Exemplo n.º 60
0
 public EnvironmentViewModel(EnvironmentsViewModel environmentsViewModel, IEnvironmentService environmentService)
     : this(environmentsViewModel, environmentService, new EnvironmentData{ Name="Name", Host = "Host" })
 {
 }