public HttpTransport(string name, CancellationToken cancellationToken) { _cancellationToken = cancellationToken; _bus = new HttpTransportBus(name); _sender = new HttpTransportSender(name, _bus, cancellationToken); }
public HttpTransportSender(string name, TimeSpan shortOperationsTimeout, HttpTransportBus bus, CancellationToken cancellationToken) { _bus = bus; _cancellationToken = cancellationToken; _log = LogManager.GetLogger(GetType().Name + "." + name); _shortOperationsTimeout = shortOperationsTimeout; }
public HttpTransport(string name, TimeSpan shortOperationsTimeout, CancellationToken parentToken) { _linkedTokenSource = CancellationTokenSource.CreateLinkedTokenSource(parentToken); _bus = new HttpTransportBus(name); _sender = new HttpTransportSender(name, shortOperationsTimeout, _bus, _linkedTokenSource.Token); }
public override async Task<HttpResponseMessage> ExecuteAsync(HttpControllerContext controllerContext, CancellationToken cancellationToken) { _bus = (HttpTransportBus) controllerContext.Configuration.Properties[typeof (HttpTransportBus)]; var sp = Stopwatch.StartNew(); var msg = await base.ExecuteAsync(controllerContext, cancellationToken); if (_bus.Log.IsDebugEnabled) { _bus.Log.Debug("{0} {1} {2} in {3:#,#;;0} ms", msg.StatusCode, controllerContext.Request.Method, controllerContext.Request.RequestUri, sp.ElapsedMilliseconds); } return msg; }
public override async Task <HttpResponseMessage> ExecuteAsync(HttpControllerContext controllerContext, CancellationToken cancellationToken) { _bus = (HttpTransportBus)controllerContext.Configuration.Properties[typeof(HttpTransportBus)]; var sp = Stopwatch.StartNew(); var msg = await base.ExecuteAsync(controllerContext, cancellationToken); if (_bus.Log.IsDebugEnabled) { _bus.Log.Debug("{0} {1} {2} in {3:#,#;;0} ms", msg.StatusCode, controllerContext.Request.Method, controllerContext.Request.RequestUri, sp.ElapsedMilliseconds); } return(msg); }
public HttpTransportSender(string name, HttpTransportBus bus) { _bus = bus; _log = LogManager.GetLogger(GetType().Name + "." + name); }
public HttpTransportSender(string name, HttpTransportBus bus, CancellationToken cancellationToken) { _bus = bus; _cancellationToken = cancellationToken; _log = LogManager.GetLogger(GetType().Name + "." + name); }
public HttpTransport(string name) { _bus = new HttpTransportBus(name); _sender = new HttpTransportSender(name, _bus); }
public HttpTransportMessageContext(TaskCompletionSource<HttpResponseMessage> tcs, HttpTransportBus parent) { _tcs = tcs; sent = tcs == null; _parent = parent; }
public HttpTransport(string name) { _bus = new HttpTransportBus(name); _sender = new HttpTransportSender(name,_bus); }
public HttpTransportMessageContext(TaskCompletionSource <HttpResponseMessage> tcs, HttpTransportBus parent) { _tcs = tcs; sent = tcs == null; _parent = parent; }