public static OutOfProcessReportGenerationController CreateController(IOutOfProcessConfiguration configuration, IProcessFactory processFactory)
 {
     return CreateController(configuration, processFactory,
         //new ReportQueueStatusWCFService()  moony
         new ReportQueueStatusDBService()
         );
 }
Ejemplo n.º 2
0
 /// <summary>
 /// A configurable application is a generic application that can be started using a given exe and exe args.
 /// </summary>
 /// <param name="path">The path of the directory where the exe is located</param>
 /// <param name="appConfig">exe name, args, etc.</param>
 /// <param name="processFactory">A factory to create a process to run the exe</param>
 /// <param name="processStopper">Used to stop a process</param>
 public ConfigurableApplication(string path, ApplicationConfig appConfig, IProcessFactory processFactory, IProcessStopper processStopper) 
     : base(appConfig.Identity, path)
 {
     _appConfig = appConfig;
     _processFactory = processFactory;
     _processStopper = processStopper;
 }
        protected override void Because()
        {
            factory = MockRepository.GenerateMock<IProcessFactory>();
            factory.Expect(x => x.GetProcess("cmd", "foo", "bar")).Return(new StubProcess());

            runner = new CommandLineRunner(factory);
            runner.RunCommand("cmd", "foo", "bar");
        }
 /// <summary>
 /// Initializes a new instance of the OutOfProcessReportGenerationController class
 /// </summary>
 /// <param name="configuration">The configuration.</param>
 /// <param name="processFactory">The process factory.</param>
 /// <param name="reportQueueStatusService">The report queue status service.</param>
 public OutOfProcessReportGenerationController(
     IOutOfProcessConfiguration configuration,
     IProcessFactory processFactory,
     IReportQueueStatusService reportQueueStatusService)
     : base(configuration, reportQueueStatusService)
 {
     this._Configuration = configuration;
     this._ProcessFactory = processFactory;
 }
Ejemplo n.º 5
0
    public ConsoleManager(IProcessFactory processFactory)
    {
      if (processFactory == null)
        throw new ArgumentNullException(nameof(processFactory));

      _processFactory = processFactory;

      Output = new ObservableCollection<string>();
      History = new List<string>();
    }
 public static OutOfProcessReportGenerationController CreateController(
     IOutOfProcessConfiguration configuration,
     IProcessFactory processFactory,
     IReportQueueStatusService statusService)
 {
     var controller = new OutOfProcessReportGenerationController(configuration, processFactory,
         statusService);
     controller.RunProcess = true;
     controller.DatabaseQueuePollInterval = 500;
     return controller;
 }
 public void SetUp()
 {
     target = new VSTestExecutorImpl();
     processStartInfoFactory = Stub<IProcessStartInfoFactory>();
     processFactory = Stub<IProcessFactory>();
     processOutputReaderFactory = Stub<IProcessOutputReaderFactory>();
     fileHelper = Stub<IVSTestFileHelper>();
     target.ProcessStartInfoFactory = processStartInfoFactory;
     target.ProcessFactory = processFactory;
     target.ProcessOutputReaderFactory = processOutputReaderFactory;
     target.FileHelper = fileHelper;
 }
Ejemplo n.º 8
0
        public PackageBuilder(IGet get, IProcessFactory processFactory, ICommandArgs commandArgs)
        {
            if (get == null)
            {
                throw new ArgumentNullException("get");
            }

            if (processFactory == null)
            {
                throw new ArgumentNullException("processFactory");
            }

            if (commandArgs == null)
            {
                throw new ArgumentNullException("commandArgs");
            }

            this.get = get;
            this.processFactory = processFactory;
            this.commandArgs = commandArgs;
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ApiEntryPoint" /> class.
        /// </summary>
        /// <param name="logger">The logger.</param>
        /// <param name="sessionManager">The session manager.</param>
        /// <param name="config">The configuration.</param>
        /// <param name="fileSystem">The file system.</param>
        /// <param name="mediaSourceManager">The media source manager.</param>
        public ApiEntryPoint(
            ILogger logger,
            ISessionManager sessionManager,
            IServerConfigurationManager config,
            IFileSystem fileSystem,
            IMediaSourceManager mediaSourceManager,
            IProcessFactory processFactory,
            IHttpResultFactory resultFactory)
        {
            Logger              = logger;
            _sessionManager     = sessionManager;
            _config             = config;
            _fileSystem         = fileSystem;
            _mediaSourceManager = mediaSourceManager;
            ProcessFactory      = processFactory;
            ResultFactory       = resultFactory;

            _sessionManager.PlaybackProgress += _sessionManager_PlaybackProgress;
            _sessionManager.PlaybackStart    += _sessionManager_PlaybackStart;

            Instance = this;
        }
Ejemplo n.º 10
0
 public MediaEncoder(
     ILoggerFactory loggerFactory,
     IJsonSerializer jsonSerializer,
     string startupOptionsFFmpegPath,
     IServerConfigurationManager configurationManager,
     IFileSystem fileSystem,
     Func <ISubtitleEncoder> subtitleEncoder,
     Func <IMediaSourceManager> mediaSourceManager,
     IProcessFactory processFactory,
     int defaultImageExtractionTimeoutMs,
     ILocalizationManager localization)
 {
     _logger                         = loggerFactory.CreateLogger(nameof(MediaEncoder));
     _jsonSerializer                 = jsonSerializer;
     StartupOptionFFmpegPath         = startupOptionsFFmpegPath;
     ConfigurationManager            = configurationManager;
     FileSystem                      = fileSystem;
     SubtitleEncoder                 = subtitleEncoder;
     _processFactory                 = processFactory;
     DefaultImageExtractionTimeoutMs = defaultImageExtractionTimeoutMs;
     _localization                   = localization;
 }
Ejemplo n.º 11
0
        /// <summary>
        /// Constructor method.
        /// </summary>
        public ConsolesPanelViewModel(
            IAppState appState                          = null,
            IProcessFactory processFactory              = null,
            IProcessesTracker processesTracker          = null,
            IProcessRepository processesRepository      = null,
            IProcessesInteropAgent consolesInteropAgent = null,
            ISnackbarMessageQueue snackbarMessageQueue  = null)
        {
            _appState             = appState ?? Locator.CurrentMutable.GetService <IAppState>();
            _processFactory       = processFactory ?? Locator.CurrentMutable.GetService <IProcessFactory>();
            _processesTracker     = processesTracker ?? Locator.CurrentMutable.GetService <IProcessesTracker>();
            _processesRepository  = processesRepository ?? Locator.CurrentMutable.GetService <IProcessRepository>();
            _consolesInteropAgent = consolesInteropAgent ?? Locator.CurrentMutable.GetService <IProcessesInteropAgent>();
            _snackbarMessageQueue = snackbarMessageQueue ?? Locator.CurrentMutable.GetService <ISnackbarMessageQueue>();

            // Lists
            _consoleProcessEntities = new ReactiveList <ProcessEntity>()
            {
                ChangeTrackingEnabled = false
            };
            _consolesList = _consoleProcessEntities.CreateDerivedCollection(
                selector: process => Mapper.Map <IProcessViewModel>(process)
                );

            // Load Processess
            _loadConsolesCommand = ReactiveCommand.CreateFromTask(async() => await LoadConsolesCommandAction());
            _loadConsolesCommand.IsExecuting.BindTo(this, @this => @this.IsLoadingConsoles);
            _loadConsolesCommand.Subscribe(entities => LoadConsolesCommandHandler(entities));

            // Create Instances
            _startConsoleProcessCommandFactory = () =>
            {
                var command = ReactiveCommand.CreateFromTask <IProcessViewModel, IProcessInstanceViewModel>(async(option) => await StartConsoleProcessCommandAction(option));
                command.ThrownExceptions.Subscribe(@exception => StartConsoleProcessCommandError(@exception));
                command.Subscribe(instance => StartConsoleProcessCommandHandler(instance));
                return(command);
            };
        }
Ejemplo n.º 12
0
        protected BaseEncoder(MediaEncoder mediaEncoder,
                              ILogger logger,
                              IServerConfigurationManager configurationManager,
                              IFileSystem fileSystem,
                              IIsoManager isoManager,
                              ILibraryManager libraryManager,
                              ISessionManager sessionManager,
                              ISubtitleEncoder subtitleEncoder,
                              IMediaSourceManager mediaSourceManager, IProcessFactory processFactory)
        {
            MediaEncoder         = mediaEncoder;
            Logger               = logger;
            ConfigurationManager = configurationManager;
            FileSystem           = fileSystem;
            IsoManager           = isoManager;
            LibraryManager       = libraryManager;
            SessionManager       = sessionManager;
            SubtitleEncoder      = subtitleEncoder;
            MediaSourceManager   = mediaSourceManager;
            ProcessFactory       = processFactory;

            EncodingHelper = new EncodingHelper(MediaEncoder, FileSystem, SubtitleEncoder);
        }
Ejemplo n.º 13
0
        public QueueWorkerMonitor(IProcessFactory processFactory, IQueueConfigLoader queueConfigLoader, ITriggersCatalog triggersCatalog, IChildProcessTracker childProcessTracker)
        {
            _childProcessTracker = childProcessTracker;
            _processFactory      = processFactory;
            _queueConfigLoader   = queueConfigLoader;

            triggersCatalog.OnChanged += (triggerId) =>
            {
                try
                {
                    var configs = _queueConfigLoader.Configs;
                    var config  = configs.First(o => o.Id == triggerId);
                    WorkerRestart(config);
                }
                catch (Exception e)
                {
                    Dev2Logger.Warn(e.Message, "");
                }
            };

            triggersCatalog.OnDeleted += WorkerDeleted;
            triggersCatalog.OnCreated += WorkerCreated;
        }
Ejemplo n.º 14
0
 public SubtitleEncoder(
     ILibraryManager libraryManager,
     ILogger logger,
     IApplicationPaths appPaths,
     IFileSystem fileSystem,
     IMediaEncoder mediaEncoder,
     IJsonSerializer json,
     IHttpClient httpClient,
     IMediaSourceManager mediaSourceManager,
     IProcessFactory processFactory,
     ITextEncoding textEncoding)
 {
     _libraryManager     = libraryManager;
     _logger             = logger;
     _appPaths           = appPaths;
     _fileSystem         = fileSystem;
     _mediaEncoder       = mediaEncoder;
     _json               = json;
     _httpClient         = httpClient;
     _mediaSourceManager = mediaSourceManager;
     _processFactory     = processFactory;
     _textEncoding       = textEncoding;
 }
Ejemplo n.º 15
0
        public MediaEncoder(ILogger logger, IJsonSerializer jsonSerializer, string ffMpegPath, string ffProbePath, bool hasExternalEncoder, IServerConfigurationManager configurationManager, IFileSystem fileSystem, ILiveTvManager liveTvManager, IIsoManager isoManager, ILibraryManager libraryManager, IChannelManager channelManager, ISessionManager sessionManager, Func <ISubtitleEncoder> subtitleEncoder, Func <IMediaSourceManager> mediaSourceManager, IHttpClient httpClient, IZipClient zipClient, IMemoryStreamFactory memoryStreamProvider, IProcessFactory processFactory,
                            int defaultImageExtractionTimeoutMs,
                            bool enableEncoderFontFile, IEnvironmentInfo environmentInfo)
        {
            if (jsonSerializer == null)
            {
                throw new ArgumentNullException("jsonSerializer");
            }

            _logger                         = logger;
            _jsonSerializer                 = jsonSerializer;
            ConfigurationManager            = configurationManager;
            FileSystem                      = fileSystem;
            LiveTvManager                   = liveTvManager;
            IsoManager                      = isoManager;
            LibraryManager                  = libraryManager;
            ChannelManager                  = channelManager;
            SessionManager                  = sessionManager;
            SubtitleEncoder                 = subtitleEncoder;
            MediaSourceManager              = mediaSourceManager;
            _httpClient                     = httpClient;
            _zipClient                      = zipClient;
            _memoryStreamProvider           = memoryStreamProvider;
            _processFactory                 = processFactory;
            DefaultImageExtractionTimeoutMs = defaultImageExtractionTimeoutMs;
            EnableEncoderFontFile           = enableEncoderFontFile;
            _environmentInfo                = environmentInfo;
            FFProbePath                     = ffProbePath;
            FFMpegPath                      = ffMpegPath;
            _originalFFProbePath            = ffProbePath;
            _originalFFMpegPath             = ffMpegPath;

            _hasExternalEncoder = hasExternalEncoder;

            SetEnvironmentVariable();
        }
Ejemplo n.º 16
0
 public QueueProcessThreadList(IChildProcessTracker childProcessTracker, IProcessFactory processFactory, IJobConfig config)
     : base(config)
 {
     _childProcessTracker = childProcessTracker;
     _processFactory      = processFactory;
 }
Ejemplo n.º 17
0
 public ApplicationMonitor(int interval_ms, ILogger logger, INativeMethods nativeMethods, IProcessFactory processFactory)
 {
     this.blacklist      = new List <BlacklistApplication>();
     this.logger         = logger;
     this.nativeMethods  = nativeMethods;
     this.processes      = new List <IProcess>();
     this.processFactory = processFactory;
     this.timer          = new Timer(interval_ms);
     this.whitelist      = new List <WhitelistApplication>();
 }
Ejemplo n.º 18
0
 public BashRunner(IProcessFactory process)
 {
     _process = process;
 }
Ejemplo n.º 19
0
 public RakeRunner(IProcessFactory processFactory, IFileSystem fileSystem)
 {
     _processFactory = processFactory;
     _fileSystem = fileSystem;
 }
Ejemplo n.º 20
0
 public CloneGitRepository(IProcessFactory processFactory)
 {
     _processFactory = processFactory;
 }
 public ConfigurableApplicationFactory(IApplicationConfigParser appConfigParser, IProcessFactory processFactory, IProcessStopper processStopper)
 {
     _appConfigParser = appConfigParser;
     _processFactory = processFactory;
     _processStopper = processStopper;
 }
Ejemplo n.º 22
0
        protected virtual void ProcessBuild(IPackageTree packageTree, IProcessFactory processFactory, string pathToBuildTool, string cmdLineArguments)
        {
            IProcess process = processFactory.GetProcess(pathToBuildTool, cmdLineArguments, packageTree.WorkingDirectory.FullName);

            while (true)
            {
                string line = process.GetLineOrOutput();

                if (line == null)
                    break;

                log.Info(line);
            }

            try
            {
                process.WaitForExit();
            }
            catch (ProcessFailedException)
            {
                throw new BuildFailedException(string.Format("The build tool {0} failed building the {1} package", packageTree.BuildMetaData.BuildEngine.BuildTool, packageTree.Name));
            }
        }
Ejemplo n.º 23
0
        public virtual void GenerateKeyFile(IProcessFactory processFactory, IPackageTree packageTree)
        {
            string strongKey = Path.Combine(packageTree.WorkingDirectory.FullName,
                                            string.Format("{0}.snk", packageTree.Name));

            string cmdLineArguments = string.Format("-k {0}", strongKey.QuotePath());

            var PSI = new ProcessStartInfo("cmd.exe")
                                       {
                                           RedirectStandardInput = true,
                                           RedirectStandardOutput = true,
                                           RedirectStandardError = true,
                                           UseShellExecute = false
                                       };

            var sn = GetSnExe(packageTree);

            IProcess process = processFactory.GetProcess(sn.ToString().QuotePath(), cmdLineArguments, packageTree.WorkingDirectory.FullName);

            while (true)
            {
                string line = process.GetLineOrOutput();

                if (line == null)
                    break;

                log.Info(line);
            }

            process.WaitForExit();
        }
Ejemplo n.º 24
0
        public virtual BuildEngine Build(IProcessFactory processFactory, IPackageTree packageTree, string mode)
        {
            if (builtPackages.ContainsKey(packageTree.Name))
                return this;

            SetBuildMode( mode );

            string pathToBuildFile = string.Format("{0}", GetBuildFilePath(packageTree).QuotePath());

            log.InfoFormat("Path to build file is {0}.", pathToBuildFile);

            if (GenerateStrongKey)
                GenerateKeyFile(processFactory, packageTree);

            CopyDependenciesTo(packageTree);

            var cmdLineArguments = BuildTool.CommandLineArguments(pathToBuildFile, this, packageTree, Version);

            var pathToBuildTool = string.Format("{0}", BuildTool.PathToBuildTool(packageTree, Version).QuotePath());

            ProcessBuild(packageTree, processFactory, pathToBuildTool, cmdLineArguments);

            CopyArtifactsToBuildDirectory(packageTree);

            builtPackages.Add(packageTree.Name, packageTree.Name);

            return this;
        }
Ejemplo n.º 25
0
 public virtual BuildEngine Build( IProcessFactory processFactory, IPackageTree packageTree )
 {
     return Build( processFactory, packageTree, DefaultModeName );
 }
Ejemplo n.º 26
0
 public LongRunningExecutor(IProcessFactory processFactory, IOutputProcessExecutor outputProcessExecutor)
 {
     _processFactory = processFactory;
     _executor = outputProcessExecutor;
 }
Ejemplo n.º 27
0
        //public ProcessWorker() : this(new MediaConfig(), new ProcessFactory(), null) { }

        public ProcessWorker(IMediaConfig config, IProcessFactory processFactory, ProcessOptions?options = null)
        {
            Config   = config ?? throw new ArgumentNullException(nameof(config));
            _factory = processFactory ?? throw new ArgumentNullException(nameof(processFactory));
            Options  = options ?? new ProcessOptions();
        }
Ejemplo n.º 28
0
 public CommandLineRunner(IProcessFactory processFactory)
 {
     this.processFactory = processFactory;
 }
Ejemplo n.º 29
0
 public BackgroundAction(ProcessPipeLineTask processPipeLineTask, IProcessFactory processFactory)
 {
     _processPipeLineTask = processPipeLineTask;
     _processFactory      = processFactory;
 }
Ejemplo n.º 30
0
 public PackageBuilderStub(IGet get, IProcessFactory processFactory, ICommandArgs commandArgs)
     : base(get, processFactory, commandArgs)
 {
 }
Ejemplo n.º 31
0
 public PackageBuilderStub(IGet get, IProcessFactory processFactory, ICommandArgs commandArgs)
     : base(get, processFactory, commandArgs)
 {
 }
Ejemplo n.º 32
0
 protected override void ProcessBuild(Horn.Core.PackageStructure.IPackageTree packageTree, IProcessFactory processFactory, string pathToBuildTool, string cmdLineArguments)
 {
     Console.WriteLine("Processing Build");
 }
Ejemplo n.º 33
0
 public ConfigurableApplicationFactory(IApplicationConfigParser appConfigParser, IProcessFactory processFactory, IProcessStopper processStopper)
 {
     _appConfigParser = appConfigParser;
     _processFactory  = processFactory;
     _processStopper  = processStopper;
 }
Ejemplo n.º 34
0
 public static async Task <IProcess> RunAsync(this IProcessFactory processFactory, IProcessSpecification processSpecification)
 {
     return(await processFactory.RunAsync(processSpecification, TimeSpan.FromMinutes(1)));
 }
Ejemplo n.º 35
0
 public ExternalProcessExecutor(IProcessFactory processWrapper)
 {
     _processWrapper = processWrapper;
 }
Ejemplo n.º 36
0
 public CSharpTaskRunner(ICompiler compiler, IInputWriter inpWriter, IOutputReader outReader, IFileWriter fileWriter, IProcessFactory processFactory, ITempFileProvider tempFileProvider)
     : base(inpWriter, outReader, fileWriter, processFactory, tempFileProvider)
 {
     _compiler = compiler;
 }
Ejemplo n.º 37
0
 public VideoEncoder(MediaEncoder mediaEncoder, ILogger logger, IServerConfigurationManager configurationManager, IFileSystem fileSystem, IIsoManager isoManager, ILibraryManager libraryManager, ISessionManager sessionManager, ISubtitleEncoder subtitleEncoder, IMediaSourceManager mediaSourceManager, IProcessFactory processFactory) : base(mediaEncoder, logger, configurationManager, fileSystem, isoManager, libraryManager, sessionManager, subtitleEncoder, mediaSourceManager, processFactory)
 {
 }
Ejemplo n.º 38
0
 public EncodedRecorder(ILogger logger, IFileSystem fileSystem, IMediaEncoder mediaEncoder, IServerApplicationPaths appPaths, IJsonSerializer json, LiveTvOptions liveTvOptions, IHttpClient httpClient, IProcessFactory processFactory)
 {
     _logger         = logger;
     _fileSystem     = fileSystem;
     _mediaEncoder   = mediaEncoder;
     _appPaths       = appPaths;
     _json           = json;
     _liveTvOptions  = liveTvOptions;
     _httpClient     = httpClient;
     _processFactory = processFactory;
 }
 public LongRunningExecutor(IProcessFactory processFactory, IOutputProcessExecutor outputProcessExecutor)
 {
     _processFactory = processFactory;
     _executor       = outputProcessExecutor;
 }
Ejemplo n.º 40
0
 public RunRakeFile(IProcessFactory processFactory, IFileSystem fileSystem)
 {
     _processFactory = processFactory;
     _fileSystem = fileSystem;
 }
Ejemplo n.º 41
0
 public ProcessWorkerFactory(IMediaConfig config, IUserInterfaceManager?uiManager, IFileInfoParserFactory parserFactory, IProcessFactory processFactory, IFileSystemService fileSystemService)
 {
     Config             = config ?? throw new ArgumentNullException(nameof(config));
     UiManager          = uiManager;
     _parserFactory     = parserFactory ?? throw new ArgumentNullException(nameof(parserFactory));
     _processFactory    = processFactory ?? throw new ArgumentNullException(nameof(processFactory));
     _fileSystemService = fileSystemService ?? throw new ArgumentNullException(nameof(fileSystemService));
 }
Ejemplo n.º 42
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ApiEntryPoint" /> class.
        /// </summary>
        /// <param name="logger">The logger.</param>
        /// <param name="sessionManager">The session manager.</param>
        /// <param name="config">The configuration.</param>
        /// <param name="fileSystem">The file system.</param>
        /// <param name="mediaSourceManager">The media source manager.</param>
        public ApiEntryPoint(ILogger logger, ISessionManager sessionManager, IServerConfigurationManager config, IFileSystem fileSystem, IMediaSourceManager mediaSourceManager, ITimerFactory timerFactory, IProcessFactory processFactory, IHttpResultFactory resultFactory)
        {
            Logger              = logger;
            _sessionManager     = sessionManager;
            _config             = config;
            _fileSystem         = fileSystem;
            _mediaSourceManager = mediaSourceManager;
            TimerFactory        = timerFactory;
            ProcessFactory      = processFactory;
            ResultFactory       = resultFactory;

            Instance = this;
        }
Ejemplo n.º 43
0
 public QueueProcessThread(IChildProcessTracker childProcessTracker, IProcessFactory processFactory, IJobConfig config)
     : base(childProcessTracker, processFactory, config)
 {
 }
Ejemplo n.º 44
0
 public ProcessManagerFactory(IFFmpegConfig config, IFFmpegParser ffmpegParser, IProcessFactory processFactory, IFileSystemService fileSystemService)
 {
     this.Config            = config ?? new FFmpegConfig();
     this.Parser            = ffmpegParser ?? new FFmpegParser();
     this.ProcessFactory    = processFactory ?? new ProcessFactory();
     this.FileSystemService = fileSystemService ?? new FileSystemService();
 }
Ejemplo n.º 45
0
 public CloneGitRepository(IProcessFactory processFactory, IFileSystem fileSystem)
 {
     _processFactory = processFactory;
     _fileSystem = fileSystem;
 }
Ejemplo n.º 46
0
 public PackageBuilder(IGet get, IProcessFactory processFactory, ICommandArgs commandArgs)
 {
     this.get = get;
     this.processFactory = processFactory;
     this.commandArgs = commandArgs;
 }
Ejemplo n.º 47
0
        public LinuxIsoManager(ILogger logger, IFileSystem fileSystem, IEnvironmentInfo environment, IProcessFactory processFactory)
        {
            EnvironmentInfo = environment;
            FileSystem      = fileSystem;
            _logger         = logger;
            ProcessFactory  = processFactory;

            MountPointRoot = Path.DirectorySeparatorChar + "tmp" + Path.DirectorySeparatorChar + "Emby";

            _logger.LogDebug(
                "[{0}] System PATH is currently set to [{1}].",
                Name,
                Environment.GetEnvironmentVariable("PATH") ?? ""
                );

            _logger.LogDebug(
                "[{0}] System path separator is [{1}].",
                Name,
                Path.PathSeparator
                );

            _logger.LogDebug(
                "[{0}] Mount point root is [{1}].",
                Name,
                MountPointRoot
                );

            //
            // Get the location of the executables we need to support mounting/unmounting ISO images.
            //

            SudoCommand = GetFullPathForExecutable("sudo");

            _logger.LogInformation(
                "[{0}] Using version of [sudo] located at [{1}].",
                Name,
                SudoCommand
                );

            MountCommand = GetFullPathForExecutable("mount");

            _logger.LogInformation(
                "[{0}] Using version of [mount] located at [{1}].",
                Name,
                MountCommand
                );

            UmountCommand = GetFullPathForExecutable("umount");

            _logger.LogInformation(
                "[{0}] Using version of [umount] located at [{1}].",
                Name,
                UmountCommand
                );

            if (!string.IsNullOrEmpty(SudoCommand) && !string.IsNullOrEmpty(MountCommand) && !string.IsNullOrEmpty(UmountCommand))
            {
                ExecutablesAvailable = true;
            }
            else
            {
                ExecutablesAvailable = false;
            }
        }
Ejemplo n.º 48
0
 public static IProcess Create(this IProcessFactory factory, int id)
 => Create(factory, new ProcessArguments(id));
Ejemplo n.º 49
0
 public ProcessThreadForTesting(ProcessStartInfo processStartInfo, IChildProcessTracker childProcessTracker, IProcessFactory processFactory, IJobConfig config)
     : base(childProcessTracker, processFactory, config)
 {
     _testProcessInfo = processStartInfo;
 }
Ejemplo n.º 50
0
 public EncoderValidator(ILogger logger, IProcessFactory processFactory)
 {
     _logger         = logger;
     _processFactory = processFactory;
 }
Ejemplo n.º 51
0
 public PythonTaskRunner(string interpreterPath, IInputWriter inpWriter, IOutputReader outReader, IFileWriter fileWriter, IProcessFactory processFactory, ITempFileProvider tempFileProvider)
     : base(inpWriter, outReader, fileWriter, processFactory, tempFileProvider)
 {
     _pyInterpreterPath = interpreterPath;
 }
 public PackageBuilderWithOnlyPrebuildStub(IGet get, IProcessFactory processFactory, ICommandArgs commandArgs, IBuildMetaData buildMetaData)
     : base(get, processFactory, commandArgs)
 {
     this.buildMetaData = buildMetaData;
 }
 public ProcessWorkerFactory(IMediaConfig config, IFileInfoParserFactory parserFactory, IProcessFactory processFactory, IFileSystemService fileSystemService)
 {
     this.Config            = config ?? throw new ArgumentNullException(nameof(config));
     this.ParserFactory     = parserFactory ?? throw new ArgumentNullException(nameof(parserFactory));
     this.ProcessFactory    = processFactory ?? throw new ArgumentNullException(nameof(processFactory));
     this.FileSystemService = fileSystemService ?? throw new ArgumentNullException(nameof(fileSystemService));
 }
Ejemplo n.º 54
0
 public FinishingProcessExecutor(IOutputProcessExecutor executor, IProcessFactory processFactory)
 {
     _executor = executor;
     _processFactory = processFactory;
 }