Example #1
0
 public void DryRun()
 {
     foreach (var item in _sequence)
     {
         IExecuteRemotely item1 = item;
         Logger.WithLogSection(item.Name, item1.DryRun);
     }
 }
 public void Add(IExecuteRemotely operation, bool addFirst = false)
 {
     if (addFirst)
     {
         _sequence.Insert(0, operation);
     }
     else
     {
         _sequence.Add(operation);
     }
 }
Example #3
0
 public void Add(IExecuteRemotely operation, bool addFirst = false)
 {
     if (addFirst)
     {
         _sequence.Insert(0, operation);
     }
     else
     {
         _sequence.Add(operation);
     }
 }
Example #4
0
 public static void Operation(IOfferRemoteOperations remote, IExecuteRemotely operation)
 {
     if (remote is RemoteOperationsBuilder)
     {
         var seqContainer = remote as RemoteOperationsBuilder;
         seqContainer.AddOperation(operation);
         return;
     }
     if (remote is RemoteCompositeBuilder)
     {
         var seqContainer = remote as RemoteCompositeBuilder;
         seqContainer.CompositeSequence.Add(operation);
         return;
     }
     throw new Exception(string.Format("Type {0} not currently supported.", remote.GetType().Name));
 }
Example #5
0
 public static void Operation(IOfferRemoteOperations remote, IExecuteRemotely operation)
 {
     if (remote is RemoteOperationsBuilder)
     {
         var seqContainer = remote as RemoteOperationsBuilder;
         seqContainer.AddOperation(operation);
         return;
     }
     if (remote is RemoteCompositeBuilder)
     {
         var seqContainer = remote as RemoteCompositeBuilder;
         seqContainer.CompositeSequence.Add(operation);
         return;
     }
     throw new Exception(string.Format("Type {0} not currently supported.", remote.GetType().Name));
 }
Example #6
0
        public virtual void Execute(ServerConfig server, IReportStatus status, ConDepSettings settings, CancellationToken token)
        {
            foreach (var element in _sequence)
            {
                token.ThrowIfCancellationRequested();

                IExecuteRemotely elementToExecute = element;
                if (element is CompositeSequence)
                {
                    elementToExecute.Execute(server, status, settings, token);
                }
                else
                {
                    Logger.WithLogSection(element.Name, () => elementToExecute.Execute(server, status, settings, token));
                }
            }
        }
Example #7
0
 public override void Execute(ServerConfig server, IReportStatus status, ConDepSettings settings, CancellationToken token)
 {
     Logger.WithLogSection(Name, () =>
     {
         if (ConditionFulfilled(server))
         {
             foreach (var element in _sequence)
             {
                 IExecuteRemotely elementToExecute = element;
                 Logger.WithLogSection("Condition True, executing " + element.Name, () => elementToExecute.Execute(server, status, settings, token));
             }
         }
         else
         {
             Logger.Info("Condition evaluated to false. Will not execute.");
         }
     });
 }
Example #8
0
        public static void Operation(IOfferRemoteInstallation installation, IExecuteRemotely operation)
        {
            var seqContainer = installation as RemoteInstallationBuilder;

            seqContainer.AddOperation(operation);
        }
Example #9
0
 public static void Operation(IOfferRemoteInstallation installation, IExecuteRemotely operation)
 {
     var seqContainer = installation as RemoteInstallationBuilder;
     seqContainer.AddOperation(operation);
 }
Example #10
0
 public static void Operation(IOfferRemoteConfiguration remoteConfiguration, IExecuteRemotely operation)
 {
     var seqContainer = remoteConfiguration as RemoteConfigurationBuilder;
     seqContainer.AddOperation(operation);
 }
Example #11
0
 public static void Operation(IOfferRemoteDeployment deployment, IExecuteRemotely operation)
 {
     var seqContainer = deployment as RemoteDeploymentBuilder;
     seqContainer.AddOperation(operation);
 }
 public void AddOperation(IExecuteRemotely operation)
 {
     _remoteSequence.Add(operation);
 }
Example #13
0
 public static void Operation(IOfferRemoteExecution executor, IExecuteRemotely operation)
 {
     var seqContainer = executor as RemoteExecutionBuilder;
     seqContainer.AddOperation(operation);
 }
Example #14
0
        public static void Operation(IOfferRemoteConfiguration remoteConfiguration, IExecuteRemotely operation)
        {
            var seqContainer = remoteConfiguration as RemoteConfigurationBuilder;

            seqContainer.AddOperation(operation);
        }
Example #15
0
 public void AddOperation(IExecuteRemotely operation)
 {
     _remoteSequence.Add(operation);
 }
Example #16
0
        public static void Operation(IOfferRemoteExecution executor, IExecuteRemotely operation)
        {
            var seqContainer = executor as RemoteExecutionBuilder;

            seqContainer.AddOperation(operation);
        }
Example #17
0
        public static void Operation(IOfferRemoteDeployment deployment, IExecuteRemotely operation)
        {
            var seqContainer = deployment as RemoteDeploymentBuilder;

            seqContainer.AddOperation(operation);
        }