public async Task InvokeAsync(ContextInvoker context, BatchUrlManager urlManager, Guid?parentSessionId) { var batchActionProvider = _batchActionFactory.getProvider(urlManager); string response = await batchActionProvider.InvokeAsync(urlManager, context); response = $"{context.SessionId.ToString()} - {response}"; await context.Response.Body.WriteAsync(Encoding.UTF8.GetBytes(response), 0, response.Length); }
public async Task InvokeAsync(ContextInvoker context, BatchUrlManager urlManager) { var contextInvoker = context; contextInvoker.BatchName = urlManager.RequestBatchName; contextInvoker.ActionName = urlManager.RequestBatchAction; contextInvoker.SessionId = Guid.NewGuid(); contextInvoker.ActionDescriptor = null; await InvokeAsync(contextInvoker, urlManager, context.SessionId); }
public async Task InvokeAsync(HttpContext context, BatchUrlManager urlManager, Guid?parentSessionId) { var contextInvoker = ContextInvoker.Create(context); contextInvoker.BatchName = urlManager.RequestBatchName; contextInvoker.ActionName = urlManager.RequestBatchAction; contextInvoker.ActionDescriptor = null; contextInvoker.ParentSessionId = parentSessionId; await InvokeAsync(contextInvoker, urlManager, parentSessionId); }
public async Task InvokeAsync(HttpContext context) { BatchUrlManager urlManager = new BatchUrlManager(context.Request.Path); if (urlManager.isBatch) { await InvokeAsync(context, urlManager); } else { throw new BatchNotFoundException(urlManager.RequestBatchName); } }
public async Task InvokeAsync(HttpContext context, BatchUrlManager urlManager) { await InvokeAsync(context, urlManager, null); }