Ejemplo n.º 1
0
        public VagrantService(ICommandExecutor commandExecutor, IFileSystem fileSystem, IConfigurationSettings configuration)
        {
            _commandExecutor = commandExecutor;
            _fileSystem = fileSystem;
            _configuration = configuration;

            var vagrantFound = false;
            var customVagrantPath = _configuration.PathToVagrant;
            if (!string.IsNullOrWhiteSpace(customVagrantPath))
            {
                if (!_fileSystem.file_exists(customVagrantPath))
                {
                    this.Log().Warn("Unable to find vagrant at the path specified. Using default instance.");
                }
                else
                {
                    this.Log().Warn("Using custom vagrant path at '{0}'.".format_with(customVagrantPath));
                    vagrantFound = true;
                    _vagrantExecutable = customVagrantPath;
                }
            }

            if (!vagrantFound)
            {
                _vagrantExecutable = @"C:\HashiCorp\Vagrant\bin\vagrant.exe";
                if (!_fileSystem.file_exists(_vagrantExecutable))
                {
                    _vagrantExecutable = _fileSystem.get_executable_path("vagrant.exe");
                }
            }

            //use_vagrant_directly();
        }
Ejemplo n.º 2
0
 public SliderCommandService(ISliderService sliderService, IUnitOfWork unitOfWork, ICommandExecutor executor)
 {
   _sliderService = sliderService;
   _unitOfWork = unitOfWork;
   _executor = executor;
   _userSession = new UserSession();
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RemoteWebDriver"/> class
        /// </summary>
        /// <param name="commandExecutor">An <see cref="ICommandExecutor"/> object which executes commands for the driver.</param>
        /// <param name="desiredCapabilities">An <see cref="ICapabilities"/> object containing the desired capabilities of the browser.</param>
        public RemoteWebDriver(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
        {
            this.executor = commandExecutor;
            this.StartClient();
            this.StartSession(desiredCapabilities);
            this.mouse = new RemoteMouse(this);
            this.keyboard = new RemoteKeyboard(this);

            if (this.capabilities.HasCapability(CapabilityType.SupportsApplicationCache))
            {
                object appCacheCapability = this.capabilities.GetCapability(CapabilityType.SupportsApplicationCache);
                if (appCacheCapability is bool && (bool)appCacheCapability)
                {
                    this.appCache = new RemoteApplicationCache(this);
                }
            }

            if (this.capabilities.HasCapability(CapabilityType.SupportsLocationContext))
            {
                object locationContextCapability = this.capabilities.GetCapability(CapabilityType.SupportsLocationContext);
                if (locationContextCapability is bool && (bool)locationContextCapability)
                {
                this.locationContext = new RemoteLocationContext(this);
                }
            }

            if (this.capabilities.HasCapability(CapabilityType.SupportsWebStorage))
            {
                object webContextCapability = this.capabilities.GetCapability(CapabilityType.SupportsWebStorage);
                if (webContextCapability is bool && (bool)webContextCapability)
                {
                    this.storage = new RemoteWebStorage(this);
                }
            }
        }
Ejemplo n.º 4
0
 public CutoffModule(IEpisodeService episodeService, IEpisodeCutoffService episodeCutoffService, ISeriesRepository seriesRepository, ICommandExecutor commandExecutor)
     : base(episodeService, commandExecutor, "wanted/cutoff")
 {
     _episodeCutoffService = episodeCutoffService;
     _seriesRepository = seriesRepository;
     GetResourcePaged = GetCutoffUnmetEpisodes;
 }
 public void Setup()
 {
     _commandExecutor = MockRepository.GenerateMock<ICommandExecutor>();
     _messageManager = MockRepository.GenerateMock<IMessageManager>();
     _referrerProvider = MockRepository.GenerateMock<IReferrerProvider>();
     _controller = new DummyExecuteController( _commandExecutor, _messageManager, _referrerProvider );
 }
Ejemplo n.º 6
0
 public PersonCommandService(IPersonService personService, IUnitOfWork unitOfWork, ICommandExecutor executor)
 {
    _personService = personService;
   _unitOfWork = unitOfWork;
   _executor = executor;
   _userSession = new UserSession();
 }
 public ExchangeRateCommandService(IExchangeRateService exchangeRateService, IUnitOfWork unitOfWork, ICommandExecutor executor)
 {
   _exchangeRateService = exchangeRateService;
   _unitOfWork = unitOfWork;
   _executor = executor;
   _userSession = new UserSession();
 }
Ejemplo n.º 8
0
 public AdbTools(TextBlock context)
 {
     this.Context = context;
     _cmd = new Command();
     _cmds = new List<Command>();
     _executor = new CommandExecutor();
 }
 public OrderingHistoryCommandService(IOrderingHistoryService orderingHistoryService, IUnitOfWork unitOfWork, ICommandExecutor executor)
 {
   _orderingHistoryService = orderingHistoryService;
   _unitOfWork = unitOfWork;
   _executor = executor;
   _userSession = new UserSession();
 }
Ejemplo n.º 10
0
 public TypeMemberCommandService(ITypeMemberService typeMemberService, IUnitOfWork unitOfWork, ICommandExecutor executor)
 {
   _typeMemberService = typeMemberService;
   _unitOfWork = unitOfWork;
   _executor = executor;
   _userSession = new UserSession();
 }
		public CommandExecutorContext(ICommandExecutor executor, CommandLine commandLine, CommandTreeNode commandNode, object parameter) : base(executor, null, commandNode, parameter)
		{
			if(commandLine == null)
				throw new ArgumentNullException("commandLine");

			_commandLine = commandLine;
		}
Ejemplo n.º 12
0
 public WindowsFeatureService(ICommandExecutor commandExecutor, INugetService nugetService, IFileSystem fileSystem)
 {
     _commandExecutor = commandExecutor;
     _nugetService = nugetService;
     _fileSystem = fileSystem;
     set_cmd_args_dictionaries();
 }
 public RedownloadFailedDownloadService(IConfigService configService, IEpisodeService episodeService, ICommandExecutor commandExecutor, Logger logger)
 {
     _configService = configService;
     _episodeService = episodeService;
     _commandExecutor = commandExecutor;
     _logger = logger;
 }
Ejemplo n.º 14
0
 public PersonReportService(ICommandExecutor executor, IRepository<Domain.Entity.User> userRepository, IPersonService personService)
 {
   _executor = executor;
   _personService = personService;
   _userRepository = userRepository;
   _userSession = new UserSession();
 }
Ejemplo n.º 15
0
 public MissingModule(IEpisodeService episodeService, ISeriesRepository seriesRepository, ICommandExecutor commandExecutor)
     : base(episodeService, commandExecutor, "wanted/missing")
 {
     _episodeService = episodeService;
     _seriesRepository = seriesRepository;
     GetResourcePaged = GetMissingEpisodes;
 }
Ejemplo n.º 16
0
   public CommandServicePresenter(IView view, IService service,
 ICommandExecutor executor)
   {
       _view = view;
         _service = service;
         _executor = executor;
   }
 public WebSiteLinkCommandService(IWebSiteLinkService webSiteLinkService, IUnitOfWork unitOfWork, ICommandExecutor executor)
 {
   _webSiteLinkService = webSiteLinkService;
   _unitOfWork = unitOfWork;
   _executor = executor;
   _userSession = new UserSession();
 }
 public ContentMenuCommandService(IContentMenuService contentMenuService, IUnitOfWork unitOfWork, ICommandExecutor executor)
 {
   _contentMenuService = contentMenuService;
   _unitOfWork = unitOfWork;
   _executor = executor;
   _userSession = new UserSession();
 }
Ejemplo n.º 19
0
        public UpdateSummonersWorker(ICommandExecutor commandExecutor, IUpdateSummonerQueue updateSummonerQueue)
        {
            Guard.NotNull(commandExecutor, nameof(commandExecutor));
            Guard.NotNull(updateSummonerQueue, nameof(updateSummonerQueue));

            this._commandExecutor = commandExecutor;
            this._updateSummonerQueue = updateSummonerQueue;
        }
		/*============================================================================*/
		/* Constructor                                                                */
		/*============================================================================*/

		public EventCommandTrigger (IInjector injector, IEventDispatcher dispatcher, Enum type, Type eventClass = null, IEnumerable<CommandMappingList.Processor> processors = null, ILogger logger = null)
		{
			_dispatcher = dispatcher;
			_type = type;
			_eventClass = eventClass;
			_mappings = new CommandMappingList(this, processors, logger);
			_executor = new CommandExecutor(injector, _mappings.RemoveMapping);
		}
Ejemplo n.º 21
0
 public AutomaticUninstallerService(IChocolateyPackageInformationService packageInfoService, IFileSystem fileSystem, IRegistryService registryService, ICommandExecutor commandExecutor)
 {
     _packageInfoService = packageInfoService;
     _fileSystem = fileSystem;
     _registryService = registryService;
     _commandExecutor = commandExecutor;
     WaitForCleanup = true;
 }
 public void ExecuteCommands(ObjectTypeId objectTypeId, ICommandExecutor commandExecutor, CompositeCommandExecutionContext compositeContext)
 {
     foreach (var command in commands)
     {
         var context = compositeContext.GetFor(command.TargetObjectId);
         commandExecutor.Execute(command, context);
     }
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Initializes a new instance of the RemoteWebDriver class
 /// </summary>
 /// <param name="commandExecutor">An <see cref="ICommandExecutor"/> object which executes commands for the driver.</param>
 /// <param name="desiredCapabilities">An <see cref="ICapabilities"/> object containing the desired capabilities of the browser.</param>
 public RemoteWebDriver(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
 {
     this.executor = commandExecutor;
     this.StartClient();
     this.StartSession(desiredCapabilities);
     this.mouse = new RemoteMouse(this);
     this.keyboard = new RemoteKeyboard(this);
 }
Ejemplo n.º 24
0
 public CygwinService(ICommandExecutor commandExecutor, INugetService nugetService, IFileSystem fileSystem, IRegistryService registryService)
 {
     _commandExecutor = commandExecutor;
     _nugetService = nugetService;
     _fileSystem = fileSystem;
     _registryService = registryService;
     set_cmd_args_dictionaries();
 }
Ejemplo n.º 25
0
 public OrderingCommandService(IOrderingService orderingService, IKeyGenerationReportService keyGenerationReportService, IUnitOfWork unitOfWork, ICommandExecutor executor)
 {
   _orderingService = orderingService;
   _unitOfWork = unitOfWork;
   _executor = executor;
   _keyGenerationReportService = keyGenerationReportService;
   _userSession = new UserSession();
 }
Ejemplo n.º 26
0
        public EpisodeModule(ICommandExecutor commandExecutor, IEpisodeService episodeService)
            : base(episodeService, commandExecutor)
        {
            _episodeService = episodeService;

            GetResourceAll = GetEpisodes;
            UpdateResource = SetMonitored;
        }
Ejemplo n.º 27
0
		public CommandContext(ICommandExecutor executor, CommandLine commandLine, CommandTreeNode commandNode, object parameter, IDictionary<string, object> items = null) : base(executor, commandNode, parameter, items)
		{
			_commandLine = commandLine;

			if(commandLine == null)
				_options = new CommandOptionCollection(this.Command);
			else
				_options = new CommandOptionCollection(this.Command, (System.Collections.IDictionary)commandLine.Options);
		}
 public PhonebookManager(
     string defaultCountryCode, 
     IOutputWritter resultReporter, 
     ICommandExecutor commandExecutor)
 {
     this.defaultCountryCode = defaultCountryCode;
     this.resultReporter = resultReporter;
     this.commandExecutor = commandExecutor;
 }
Ejemplo n.º 29
0
 public GameEngine(
     ICommandParser commandParser,
     ICommandExecutor commandExecutor,
     IConsoleOperator consoleOperator)
 {
     this.CommandParser = commandParser;
     this.ConsoleOperator = consoleOperator;
     this.CommandExecutor = commandExecutor;
 }
 public IncrementalCachingSnapshot(ISnapshot parentSnapshot, ICommandExecutor commandExecutor, IChangeSet changeSet)
 {
     this.parentSnapshot = parentSnapshot;
     this.commandExecutor = commandExecutor;
     foreach (var command in changeSet.Commands)
     {
         Load(command);
     }
 }
Ejemplo n.º 31
0
 public SessionService(IMapper mapper, IQueryExecutor queryExecutor, ICommandExecutor commandExecutor)
 {
     _mapper          = mapper;
     _queryExecutor   = queryExecutor;
     _commandExecutor = commandExecutor;
 }
Ejemplo n.º 32
0
 public SignalEventReceivedBuilderImpl(ICommandExecutor commandExecutor, string signalName)
 {
     this.CommandExecutor = commandExecutor;
     this.SignalName      = signalName;
 }
Ejemplo n.º 33
0
 public IngredientService(IQueryExecutor queryExecutor, ICommandExecutor commandExecutor, IIdGenerator idGenerator)
 {
     m_queryExecutor   = queryExecutor;
     m_commandExecutor = commandExecutor;
     m_idGenerator     = idGenerator;
 }
Ejemplo n.º 34
0
 public LinuxCpuStatusProvider(ICommandExecutor commandExecutor, ICommandOutputParser outputParser)
 {
     _commandExecutor = commandExecutor;
     _outputParser    = outputParser;
 }
 public AutomaticUninstallerService(IChocolateyPackageInformationService packageInfoService, IFileSystem fileSystem, IRegistryService registryService, ICommandExecutor commandExecutor)
 {
     _packageInfoService = packageInfoService;
     _fileSystem         = fileSystem;
     _registryService    = registryService;
     _commandExecutor    = commandExecutor;
     WaitForCleanup      = true;
 }
Ejemplo n.º 36
0
 public DeleteInvoiceHandler(ICommandExecutor commandExecutor, IQueryExecutor queryExecutor, IMapper mapper)
 {
     this.commandExecutor = commandExecutor;
     this.queryExecutor   = queryExecutor;
     this.mapper          = mapper;
 }
Ejemplo n.º 37
0
 public new void RegisterExecutor <TCommand>(ICommandExecutor <TCommand> executor) where TCommand : ICommand
 {
     base.RegisterExecutor(executor);
 }
Ejemplo n.º 38
0
 public ICommand PerformGroupRequest(IRequest request, ICommandExecutor executor)
 {
     return(PerformGroupRequest(request, null, executor));
 }
Ejemplo n.º 39
0
        public static TemporaryDirectory DownloadAndApply([NotNull] this DownloadRetrievalMethod retrievalMethod, [NotNull] ITaskHandler handler, [CanBeNull] ICommandExecutor executor = null)
        {
            #region Sanity checks
            if (retrievalMethod == null)
            {
                throw new ArgumentNullException("retrievalMethod");
            }
            if (handler == null)
            {
                throw new ArgumentNullException("handler");
            }
            #endregion

            using (var downloadedFile = retrievalMethod.Download(handler, executor))
            {
                var extractionDir = new TemporaryDirectory("0publish");
                try
                {
                    new PerTypeDispatcher <DownloadRetrievalMethod>(ignoreMissing: false)
                    {
                        // ReSharper disable AccessToDisposedClosure
                        (Archive archive) => archive.Apply(downloadedFile, extractionDir, handler),
                        (SingleFile file) => file.Apply(downloadedFile, extractionDir, handler)
                        // ReSharper restore AccessToDisposedClosure
                    }.Dispatch(retrievalMethod);
                }
                #region Error handling
                catch
                {
                    extractionDir.Dispose();
                    throw;
                }
                #endregion

                return(extractionDir);
            }
        }
Ejemplo n.º 40
0
        public static TemporaryDirectory DownloadAndApply([NotNull] this RetrievalMethod retrievalMethod, [NotNull] ITaskHandler handler, [CanBeNull] ICommandExecutor executor = null)
        {
            #region Sanity checks
            if (retrievalMethod == null)
            {
                throw new ArgumentNullException("retrievalMethod");
            }
            if (handler == null)
            {
                throw new ArgumentNullException("handler");
            }
            #endregion

            var download = retrievalMethod as DownloadRetrievalMethod;
            if (download != null)
            {
                return(download.DownloadAndApply(handler, executor));
            }

            var recipe = retrievalMethod as Recipe;
            if (recipe != null)
            {
                return(recipe.DownloadAndApply(handler, executor));
            }

            throw new NotSupportedException(Resources.UnknownRetrievalMethodType);
        }
Ejemplo n.º 41
0
        public static TemporaryDirectory LocalApply([NotNull] this DownloadRetrievalMethod retrievalMethod, string localPath, [NotNull] ITaskHandler handler, [CanBeNull] ICommandExecutor executor = null)
        {
            #region Sanity checks
            if (retrievalMethod == null)
            {
                throw new ArgumentNullException("retrievalMethod");
            }
            if (string.IsNullOrEmpty(localPath))
            {
                throw new ArgumentNullException("localPath");
            }
            if (handler == null)
            {
                throw new ArgumentNullException("handler");
            }
            #endregion

            if (executor == null)
            {
                executor = new SimpleCommandExecutor();
            }

            // Set local file size
            long newSize = new FileInfo(localPath).Length;
            if (retrievalMethod.Size != newSize)
            {
                executor.Execute(new SetValueCommand <long>(() => retrievalMethod.Size, value => retrievalMethod.Size = value, newSize));
            }

            var extractionDir = new TemporaryDirectory("0publish");
            try
            {
                new PerTypeDispatcher <DownloadRetrievalMethod>(ignoreMissing: true)
                {
                    // ReSharper disable AccessToDisposedClosure
                    (Archive archive) =>
                    {
                        // Guess MIME types now because the file ending is not known later
                        if (string.IsNullOrEmpty(archive.MimeType))
                        {
                            string mimeType = Archive.GuessMimeType(localPath);
                            executor.Execute(new SetValueCommand <string>(() => archive.MimeType, value => archive.MimeType = value, mimeType));
                        }

                        archive.Apply(localPath, extractionDir, handler);
                    },
                    (SingleFile file) =>
                    {
                        // Guess file name based on local path
                        if (string.IsNullOrEmpty(file.Destination))
                        {
                            string destination = Path.GetFileName(localPath);
                            executor.Execute(new SetValueCommand <string>(() => file.Destination, value => file.Destination = value, destination));
                        }

                        file.Apply(localPath, extractionDir, handler);
                    }
                    // ReSharper restore AccessToDisposedClosure
                }.Dispatch(retrievalMethod);
            }
            #region Error handling
            catch
            {
                extractionDir.Dispose();
                throw;
            }
            #endregion

            return(extractionDir);
        }
Ejemplo n.º 42
0
        public static TemporaryFile Download([NotNull] this DownloadRetrievalMethod retrievalMethod, [NotNull] ITaskHandler handler, [CanBeNull] ICommandExecutor executor = null)
        {
            #region Sanity checks
            if (retrievalMethod == null)
            {
                throw new ArgumentNullException("retrievalMethod");
            }
            if (handler == null)
            {
                throw new ArgumentNullException("handler");
            }
            #endregion

            if (executor == null)
            {
                executor = new SimpleCommandExecutor();
            }
            if (retrievalMethod.Href == null)
            {
                throw new ArgumentException(Resources.HrefMissing, "retrievalMethod");
            }
            new PerTypeDispatcher <DownloadRetrievalMethod>(ignoreMissing: false)
            {
                // ReSharper disable AccessToDisposedClosure
                (Archive archive) =>
                {
                    // Guess MIME types now because the file ending is not known later
                    if (string.IsNullOrEmpty(archive.MimeType))
                    {
                        string mimeType = Archive.GuessMimeType(archive.Href.OriginalString);
                        executor.Execute(new SetValueCommand <string>(() => archive.MimeType, value => archive.MimeType = value, mimeType));
                    }
                },
                (SingleFile file) =>
                {
                    // Guess file name based on URL
                    if (string.IsNullOrEmpty(file.Destination))
                    {
                        string destination = file.Href.OriginalString.GetRightPartAtLastOccurrence('/').StripCharacters(Path.GetInvalidFileNameChars());
                        executor.Execute(new SetValueCommand <string>(() => file.Destination, value => file.Destination = value, destination));
                    }
                }
                // ReSharper restore AccessToDisposedClosure
            }.Dispatch(retrievalMethod);

            // Download the file
            var href           = ModelUtils.GetAbsoluteHref(retrievalMethod.Href, string.IsNullOrEmpty(executor.Path) ? null : new FeedUri(executor.Path));
            var downloadedFile = new TemporaryFile("0publish");
            handler.RunTask(new DownloadFile(href, downloadedFile)); // Defer task to handler

            // Set downloaded file size
            long newSize = new FileInfo(downloadedFile).Length;
            if (retrievalMethod.Size != newSize)
            {
                executor.Execute(new SetValueCommand <long>(() => retrievalMethod.Size, value => retrievalMethod.Size = value, newSize));
            }

            return(downloadedFile);
        }
Ejemplo n.º 43
0
 public Engine(IKingdomRepository repo)
 {
     this.repository = repo;
     this.executor   = new CommandExecutor();
 }
Ejemplo n.º 44
0
        protected internal virtual void clearDatabase()
        {
            ICommandExecutor commandExecutor = processEngineConfiguration.CommandExecutorTxRequired;

            commandExecutor.Execute(new CommandAnonymousInnerClass(this));
        }
Ejemplo n.º 45
0
 public AddBreedHandler(ICommandExecutor commandExecutor, IMapper mapper)
 {
     _commandExecutor = commandExecutor;
     _mapper          = mapper;
 }
Ejemplo n.º 46
0
 public PutBoardByIdHandler(IMapper mapper, ICommandExecutor commandExecutor, IQueryExecutor queryExecutor)
 {
     this.mapper          = mapper;
     this.commandExecutor = commandExecutor;
     this.queryExecutor   = queryExecutor;
 }
Ejemplo n.º 47
0
            public MappedCommandExecutorProxy()
            {
                var factory = new AttributeBasedMappingFactory();

                _executor = factory.CreateExecutorForCommand <T>();
            }
Ejemplo n.º 48
0
 public DeploymentQueryImpl(ICommandExecutor commandExecutor) : base(commandExecutor)
 {
 }
Ejemplo n.º 49
0
        public ICommand PerformGroupRequest(IRequest request, IEditor commandProvider, ICommandExecutor executor)
        {
            var cmd = GetGroupCommand(request, commandProvider);

            if (cmd == null)
            {
                return(null);
            }

            commandProvider = commandProvider ?? _editors[0];
            executor        = executor ?? commandProvider.Site.CommandExecutor;
            using (commandProvider.Site.DirtManager.BeginDirty()) {
                executor.Execute(cmd);
            }
            return(cmd);
        }
Ejemplo n.º 50
0
 public UpdatePlayerHandler(IMapper mapper, ICommandExecutor commandExecutor, IQueryExecutor queryExecutor)
 {
     this.mapper          = mapper;
     this.commandExecutor = commandExecutor;
     this.queryExecutor   = queryExecutor;
 }
 public AppiumDriver(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
     : base(commandExecutor, appiumOptions)
 {
     AppiumCommand.Merge(commandExecutor.CommandInfoRepository);
     ElementFactory = CreateElementFactory();
 }
Ejemplo n.º 52
0
 public KeyspaceConnection(ICommandExecutor <IFierceCommand> commandExecutor,
                           string keyspaceName)
 {
     this.commandExecutor = commandExecutor;
     this.keyspaceName    = keyspaceName;
 }
Ejemplo n.º 53
0
 public TaskReportImpl(ICommandExecutor commandExecutor)
 {
     this.commandExecutor = commandExecutor;
 }
Ejemplo n.º 54
0
 public CommandService(ICommandExecutor executor)
 {
     _executor = executor;
 }
Ejemplo n.º 55
0
 public WiniumDriverCommandExecutor(WiniumDriverService driverService, TimeSpan commandTimeout)
 {
     this.service          = driverService;
     this.internalExecutor = CommandExecutorFactory.GetHttpCommandExecutor(driverService.ServiceUrl, commandTimeout);
 }
Ejemplo n.º 56
0
 /// <summary>
 /// 构造Uptime类
 /// </summary>
 /// <param name="device"></param>
 /// <param name="executor"></param>
 public Uptime(IDevice device, ICommandExecutor executor)
 {
     this.device   = device ?? throw new ArgumentNullException(nameof(device));
     this.executor = executor ?? throw new ArgumentNullException(nameof(executor));
 }
Ejemplo n.º 57
0
 /// <summary>
 /// Initializes a new instance of the TizenDriver class
 /// </summary>
 /// <param name="commandExecutor">An <see cref="ICommandExecutor"/> object which executes commands for the driver.</param>
 /// <param name="AppiumOptions">An <see cref="ICapabilities"/> object containing the Appium options.</param>
 public TizenDriver(ICommandExecutor commandExecutor, AppiumOptions AppiumOptions)
     : base(commandExecutor, SetPlatformToCapabilities(AppiumOptions, Platform))
 {
 }
Ejemplo n.º 58
0
 public UserSuggestionService(IQueryExecutor queryExecutor, ICommandExecutor commandExecutor)
 {
     m_queryExecutor   = queryExecutor;
     m_commandExecutor = commandExecutor;
 }
Ejemplo n.º 59
0
 public DroidDriver(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) : base(commandExecutor, desiredCapabilities)
 {
     TouchScreen = new RemoteTouchScreen(this);
 }
Ejemplo n.º 60
0
        public static TemporaryDirectory DownloadAndApply([NotNull] this Recipe recipe, [NotNull] ITaskHandler handler, [CanBeNull] ICommandExecutor executor = null)
        {
            #region Sanity checks
            if (recipe == null)
            {
                throw new ArgumentNullException("recipe");
            }
            if (handler == null)
            {
                throw new ArgumentNullException("handler");
            }
            #endregion

            var downloadedFiles = new List <TemporaryFile>();
            try
            {
                foreach (var step in recipe.Steps.OfType <DownloadRetrievalMethod>())
                {
                    downloadedFiles.Add(step.Download(handler, executor));
                }

                // Apply the recipe
                return(recipe.Apply(downloadedFiles, handler));
            }
            finally
            {
                // Clean up temporary archive files
                foreach (var downloadedFile in downloadedFiles)
                {
                    downloadedFile.Dispose();
                }
            }
        }