コード例 #1
0
        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);
        }
コード例 #2
0
 public RoutingDelegatingHandler(TransportHandlerFactory transportHandlerFactory, IotHubConnectionString iotHubConnectionString, ITransportSettings[] transportSettings)
 {
     this.transportHandlerFactory = transportHandlerFactory;
     this.iotHubConnectionString = iotHubConnectionString;
     this.transportSettings = transportSettings;
 }