public ValuesController(IValuesService valuesService, IActionExecutionContext executionContext, IMetricsService metricsService) : base(metricsService) { _executionContext = executionContext; _valuesService = valuesService; }
public Log4NetLoggerService( IStatusNotificationService statusNotificationService, IActionExecutionContext executionContext) { _statusNotificationService = statusNotificationService; ExecutionContext = executionContext; ExecutionContextTyped = (IActionExecutionContext)ExecutionContext; }
/// <summary>Asynchronously performs check-in to source control.</summary> /// <param name="context">The <see cref="IActionExecutionContext"/> that represents execution context.</param> /// <returns><see cref="Task"/></returns> public Task ExecuteAsync(IActionExecutionContext context) { var t = new Task(() => this.SourceControl.Commit(this.CheckinComment, this.OverridePolicyComment)); t.Start(); return t; }
/// <summary>The execute async.</summary> /// <param name="context">The context.</param> /// <returns>The <see cref="Task"/></returns> public Task ExecuteAsync(IActionExecutionContext context) { var task = new Task(() => this.PropertyNoSetter = "FakeActionResult"); task.Start(); return task; }
public void AttachClient(IClient client) { this.client = client; this.client.SendCallback = this.OnSendCallback; this.client.ReceiveCallback = this.OnReceiveCallback; this.actionExecutionContext = this.triggerHandler.CreateContext(this); this.bus.Publish(new ClientAttachedToProcessEvent(this.Id, this.client.Id)); this.Start(); }
public override void Execute(IActionExecutionContext context) { var message = (MessageBody)this.messageType.GetInstanceDynamic(this.parameters); if (message == null) { return; } context.Send(message); }
public override void Execute(IActionExecutionContext context) { var message = (MessageBody)this.messageType.GetInstanceDynamic(this.parameters); if (message == null) { return; } context.Send(message); }
/// <summary>Asynchronously establishes connection to source control subsystem.</summary> /// <param name="context">The <see cref="IActionExecutionContext"/> that represents execution context.</param> /// <returns>The <see cref="Task"/>.</returns> public Task ExecuteAsync(IActionExecutionContext context) { var t = new Task( () => { this.SourceControl = new SourceControlWrapper(this.Collection, this.TeamProject); this.SourceControl.CreateWorkspace(); }); t.Start(); return t; }
public void ExecuteTriggerActions(MessageBody message, Action resumeHook, IActionExecutionContext context) { var triggersToHandle = from trigger in context.Triggers.OfType <IMessageTrigger>() where this.handleMessageTrigger.MeetsCriteria(trigger, message) select trigger; var triggersToExecute = triggersToHandle.ToArray(); foreach (var messageTrigger in triggersToExecute) { messageTrigger.ExecuteBefore(context); } resumeHook(); foreach (var messageTrigger in triggersToExecute) { messageTrigger.ExecuteAfter(context); } }
public void ExecuteTriggerActions(MessageBody message, Action resumeHook, IActionExecutionContext context) { var triggersToHandle = from trigger in context.Triggers.OfType<IMessageTrigger>() where this.handleMessageTrigger.MeetsCriteria(trigger, message) select trigger; var triggersToExecute = triggersToHandle.ToArray(); foreach (var messageTrigger in triggersToExecute) { messageTrigger.ExecuteBefore(context); } resumeHook(); foreach (var messageTrigger in triggersToExecute) { messageTrigger.ExecuteAfter(context); } }
public static void ResolveActionExecutionContext(string[] args, IActionExecutionContext context) { //context.IdentityName = WindowsIdentity.GetCurrent().Name; context.SessionIdentifier = Guid.NewGuid(); if (args == null) { return; } foreach (var arg in args) { var tmp = arg; if (arg.StartsWith("-", StringComparison.OrdinalIgnoreCase)) { tmp = arg.Substring(1); } context.IsNotificationDisabled = false; context.IsVerboseLoggingDisabled = false; string[] tokens = tmp.Split(':'); if (string.CompareOrdinal(tokens[0], "disableNotifications") == 0) { if (tokens.Length == 1) { context.IsNotificationDisabled = true; continue; } context.IsNotificationDisabled = (string.CompareOrdinal(tokens[1].ToLower(), "y") == 0); } else if (string.CompareOrdinal(tokens[0], "disableNotifications") == 0) { if (tokens.Length == 1) { context.IsVerboseLoggingDisabled = true; continue; } context.IsVerboseLoggingDisabled = (string.CompareOrdinal(tokens[1].ToLower(), "y") == 0); } } }
protected ApplicationServiceBase(IActionExecutionContext executionContext, ILoggerService logger) { ExecutionContext = executionContext; ExecutionContextTyped = (IActionExecutionContext)ExecutionContext; Logger = logger; }
public void Execute(IActionExecutionContext context) { throw new NotImplementedException(); }
public void ExecuteTriggerActions(MessageBody message, Action resumeHook, IActionExecutionContext context) { Contract.Requires<ArgumentNullException>(message != null); Contract.Requires<ArgumentNullException>(resumeHook != null); Contract.Requires<ArgumentNullException>(context != null); }
/// <summary>The execute async.</summary> /// <param name="context">The context.</param> /// <returns>The <see cref="Task"/></returns> public Task ExecuteAsync(IActionExecutionContext context) { Task t = new Task(() => SourceControl.CreateFolder(this.FolderPath, this.OnlyCreateLastFolderInPath)); t.Start(); return t; }
public void Execute(IActionExecutionContext context) { Contract.Requires <ArgumentNullException>(context != null); throw new NotImplementedException(); }
/// <summary>The execute async.</summary> /// <param name="context">The context.</param> /// <returns>The System.Threading.Tasks.Task.</returns> /// <exception cref="NotImplementedException"></exception> public Task ExecuteAsync(IActionExecutionContext context) { Task t = new Task(() => SourceControl.CreateBranch(this.BranchSource, this.BranchTarget)); t.Start(); return t; }
public void ExecuteAfter(IActionExecutionContext context) { this.actionsAfter.ForEach(a => a.Execute(context)); }
public void ExecuteAfter(IActionExecutionContext context) { this.actionsAfter.ForEach(a => a.Execute(context)); }
public void AttachClient(IClient client) { this.client = client; this.client.SendCallback = this.OnSendCallback; this.client.ReceiveCallback = this.OnReceiveCallback; this.actionExecutionContext = this.triggerHandler.CreateContext(this); this.bus.Publish(new ClientAttachedToProcessEvent(this.Id, this.client.Id)); this.Start(); }
public ValuesService(IActionExecutionContext context, ILoggerService logger, IMetricsService metrics) : base(context, logger) { _metrics = metrics; }
public abstract void Execute(IActionExecutionContext context);
public void Execute(IActionExecutionContext context) { Contract.Requires<ArgumentNullException>(context != null); throw new NotImplementedException(); }
public static void ResolveActionExecutionContext(this HttpActionContext httpContext, ApiActionQueryOptions options, IActionExecutionContext context) { context.IdentityName = httpContext.RequestContext.Principal.Identity.Name; context.SessionIdentifier = Guid.NewGuid(); if (options == null) { return; } context.ApiKey = options.apiKey; context.IsVerboseLoggingDisabled = !string.IsNullOrEmpty(options.disableVerboseLogging) && !string.IsNullOrWhiteSpace(options.disableVerboseLogging) && string.Compare(options.disableVerboseLogging.ToLower(), "y", CultureInfo.CurrentCulture, CompareOptions.IgnoreCase) == 0; context.IsNotificationDisabled = !string.IsNullOrEmpty(options.disableNotifications) && !string.IsNullOrWhiteSpace(options.disableNotifications) && string.Compare(options.disableNotifications.ToLower(), "y", CultureInfo.CurrentCulture, CompareOptions.IgnoreCase) == 0; }
public abstract void Execute(IActionExecutionContext context);
public void ExecuteBefore(IActionExecutionContext context) { this.actionsBefore.ForEach(a => a.Execute(context)); }
/// <summary>The execute async.</summary> /// <param name="context">The context.</param> /// <returns>The <see cref="Task"/></returns> public Task ExecuteAsync(IActionExecutionContext context) { Task t = new Task(() => this.Result = SourceControl.FolderExist(this.FolderPath)); t.Start(); return t; }
public void ExecuteBefore(IActionExecutionContext context) { this.actionsBefore.ForEach(a => a.Execute(context)); }
public void ExecuteTriggerActions(MessageBody message, Action resumeHook, IActionExecutionContext context) { Contract.Requires <ArgumentNullException>(message != null); Contract.Requires <ArgumentNullException>(resumeHook != null); Contract.Requires <ArgumentNullException>(context != null); }