private static IDeviceClientPipelineBuilder BuildPipeline() { var transporthandlerFactory = new TransportHandlerFactory(); IDeviceClientPipelineBuilder pipelineBuilder = new DeviceClientPipelineBuilder() .With((ctx, innerHandler) => new RetryDelegatingHandler(ctx, innerHandler)) .With((ctx, innerHandler) => new ErrorDelegatingHandler(ctx, innerHandler)) .With((ctx, innerHandler) => new ProtocolRoutingDelegatingHandler(ctx, innerHandler)) .With((ctx, innerHandler) => transporthandlerFactory.Create(ctx)); return(pipelineBuilder); }
public RoutingDelegatingHandler(TransportHandlerFactory transportHandlerFactory, IotHubConnectionString iotHubConnectionString, ITransportSettings[] transportSettings) { this.transportHandlerFactory = transportHandlerFactory; this.iotHubConnectionString = iotHubConnectionString; this.transportSettings = transportSettings; }