コード例 #1
0
        /// <summary>
        /// Will execute a PowerShell command on remote server.
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public static IOfferRemoteExecution PowerShell(this IOfferRemoteExecution execute, string command)
        {
            var psProvider = new RemotePowerShellHostOperation(command);

            Configure.Operation(execute, psProvider);
            return(execute);
        }
コード例 #2
0
        /// <summary>
        /// Will execute a PowerShell command on remote server with provided options.
        /// </summary>
        /// <param name="command"></param>
        /// <param name="powerShellOptions"></param>
        /// <returns></returns>
        public static IOfferRemoteExecution PowerShell(this IOfferRemoteExecution execute, FileInfo scriptFile)
        {
            var psProvider = new RemotePowerShellHostOperation(scriptFile);

            Configure.Operation(execute, psProvider);
            return(execute);
        }
コード例 #3
0
        /// <summary>
        /// Will execute a DOS command using cmd.exe on remote server.
        /// </summary>
        /// <param name="cmd"></param>
        /// <returns></returns>
        public static IOfferRemoteExecution DosCommand(this IOfferRemoteExecution execute, string cmd)
        {
            var runCmdOperation = new RunCmdPsOperation(cmd);

            Configure.Operation(execute, runCmdOperation);
            return(execute);
        }
コード例 #4
0
        /// <summary>
        /// Will execute a PowerShell command on remote server with provided options.
        /// </summary>
        /// <param name="command"></param>
        /// <param name="powerShellOptions"></param>
        /// <returns></returns>
        public static IOfferRemoteExecution PowerShell(this IOfferRemoteExecution execute, FileInfo scriptFile)
        {
            var psProvider = new PowerShellOperation(scriptFile);

            OperationExecutor.Execute((RemoteBuilder)execute, psProvider);
            return(execute);
        }
コード例 #5
0
        /// <summary>
        /// Will execute a PowerShell command on remote server.
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public static IOfferRemoteExecution PowerShell(this IOfferRemoteExecution execute, string command)
        {
            var psProvider = new PowerShellOperation(command);

            OperationExecutor.Execute((RemoteBuilder)execute, psProvider);
            return(execute);
        }
コード例 #6
0
        /// <summary>
        /// Will execute a DOS command using cmd.exe on remote server.
        /// </summary>
        /// <param name="execute"></param>
        /// <param name="cmd"></param>
        /// <returns></returns>
        public static IOfferRemoteExecution DosCommand(this IOfferRemoteExecution execute, string cmd)
        {
            var runCmdOperation = new RunCmdPsOperation(cmd);

            OperationExecutor.Execute((RemoteBuilder)execute, runCmdOperation);
            return(execute);
        }
コード例 #7
0
        /// <summary>
        /// Will deploy and execute provided PowerShell script on remote server with provided options.
        /// </summary>
        /// <param name="scriptFile"></param>
        /// <param name="powerShellOptions"></param>
        /// <returns></returns>
        public static IOfferRemoteExecution PowerShell(this IOfferRemoteExecution execute, FileInfo scriptFile, Action <IOfferPowerShellOptions> powerShellOptions)
        {
            var options = new PowerShellOptions();

            powerShellOptions(options);
            var operation = new RemotePowerShellHostOperation(scriptFile, options.Values);

            Configure.Operation(execute, operation);
            return(execute);
        }
コード例 #8
0
        /// <summary>
        /// Will deploy and execute provided PowerShell script on remote server.
        /// </summary>
        /// <param name="scriptFile"></param>
        /// <returns></returns>
        public static IOfferRemoteExecution PowerShell(this IOfferRemoteExecution execute, string command, Action <IOfferPowerShellOptions> powerShellOptions)
        {
            var options = new PowerShellOptions();

            powerShellOptions(options);
            var operation = new RemotePowerShellHostOperation(command, options.Values);

            Configure.Operation(execute, operation);
            return(execute);
        }
コード例 #9
0
        /// <summary>
        /// Will execute a DOS command using cmd.exe on remote server with provided options.
        /// </summary>
        /// <param name="cmd"></param>
        /// <param name="runCmdOptions"></param>
        /// <returns></returns>
        public static IOfferRemoteExecution DosCommand(this IOfferRemoteExecution execute, string cmd, Action <IOfferRunCmdOptions> runCmdOptions)
        {
            var options = new RunCmdOptions();

            runCmdOptions(options);
            var runCmdOperation = new RunCmdPsOperation(cmd, options.Values);

            Configure.Operation(execute, runCmdOperation);
            return(execute);
        }
コード例 #10
0
        /// <summary>
        /// Will deploy and execute provided PowerShell script on remote server with provided options.
        /// </summary>
        /// <param name="scriptFile"></param>
        /// <param name="powerShellOptions"></param>
        /// <returns></returns>
        public static IOfferRemoteExecution PowerShell(this IOfferRemoteExecution execute, FileInfo scriptFile, Action <IOfferPowerShellOptions> powerShellOptions)
        {
            var options = new PowerShellOptions();

            powerShellOptions(options);
            var operation = new PowerShellOperation(scriptFile, options.Values);

            OperationExecutor.Execute((RemoteBuilder)execute, operation);
            return(execute);
        }
コード例 #11
0
        /// <summary>
        /// Will deploy and execute provided PowerShell script on remote server.
        /// </summary>
        /// <param name="scriptFile"></param>
        /// <returns></returns>
        public static IOfferRemoteExecution PowerShell(this IOfferRemoteExecution execute, string command, Action <IOfferPowerShellOptions> powerShellOptions)
        {
            var options = new PowerShellOptions();

            powerShellOptions(options);
            var operation = new PowerShellOperation(command, options.Values);

            OperationExecutor.Execute((RemoteBuilder)execute, operation);
            return(execute);
        }
コード例 #12
0
ファイル: Configure.cs プロジェクト: peteraglen/condep-dsl
 public static void Operation(IOfferRemoteExecution executor, RemoteCompositeOperation operation)
 {
     var seqContainer = executor as RemoteExecutionBuilder;
     seqContainer.AddOperation(operation);
 }
コード例 #13
0
ファイル: Configure.cs プロジェクト: peteraglen/condep-dsl
 public static void Operation(IOfferRemoteExecution executor, IExecuteRemotely operation)
 {
     var seqContainer = executor as RemoteExecutionBuilder;
     seqContainer.AddOperation(operation);
 }
コード例 #14
0
        public static void Operation(IOfferRemoteExecution executor, RemoteCompositeOperation operation)
        {
            var seqContainer = executor as RemoteExecutionBuilder;

            seqContainer.AddOperation(operation);
        }
コード例 #15
0
        public static void Operation(IOfferRemoteExecution executor, IExecuteRemotely operation)
        {
            var seqContainer = executor as RemoteExecutionBuilder;

            seqContainer.AddOperation(operation);
        }