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); } }
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)); }
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)); } } }
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."); } }); }
public static void Operation(IOfferRemoteInstallation installation, IExecuteRemotely operation) { var seqContainer = installation as RemoteInstallationBuilder; seqContainer.AddOperation(operation); }
public static void Operation(IOfferRemoteConfiguration remoteConfiguration, IExecuteRemotely operation) { var seqContainer = remoteConfiguration as RemoteConfigurationBuilder; seqContainer.AddOperation(operation); }
public static void Operation(IOfferRemoteDeployment deployment, IExecuteRemotely operation) { var seqContainer = deployment as RemoteDeploymentBuilder; seqContainer.AddOperation(operation); }
public void AddOperation(IExecuteRemotely operation) { _remoteSequence.Add(operation); }
public static void Operation(IOfferRemoteExecution executor, IExecuteRemotely operation) { var seqContainer = executor as RemoteExecutionBuilder; seqContainer.AddOperation(operation); }