Beispiel #1
0
 public ConsumerMessageHandlerMiddleware(IPipeBuilderFactory pipeBuilderFactory, IPipeContextFactory contextFactory, ConsumeOptions options = null)
 {
     ContextFactory         = contextFactory;
     ConsumeFunc            = options?.ConsumerFunc ?? (context => context.GetConsumer());
     ConsumePipe            = pipeBuilderFactory.Create(options?.Pipe ?? (builder => {}));
     ThrottledExecutionFunc = options?.ThrottleFuncFunc ?? (context => context.GetConsumeThrottleAction());
 }
 public ConsumerMessageHandlerMiddleware(
     IPipeBuilderFactory pipeBuilderFactory,
     IPipeContextFactory contextFactory,
     ILogger <ConsumerMessageHandlerMiddleware> logger,
     ConsumeOptions options = null)
 {
     ContextFactory         = contextFactory ?? throw new ArgumentNullException(nameof(contextFactory));
     Logger                 = logger ?? throw new ArgumentNullException(nameof(logger));
     ConsumeFunc            = options?.ConsumerFunc ?? (context => context.GetConsumer());
     ConsumePipe            = pipeBuilderFactory.Create(options?.Pipe ?? (builder => {}));
     ThrottledExecutionFunc = options?.ThrottleFuncFunc ?? (context => context.GetConsumeThrottleAction());
 }
Beispiel #3
0
 public BusClient(IPipeBuilderFactory pipeBuilderFactory, IPipeContextFactory contextFactory, IChannelFactory factory)
 {
     _pipeBuilderFactory = pipeBuilderFactory;
     _contextFactory     = contextFactory;
 }
 public ClientContextSupervisor(IPipeContextFactory <ClientContext> contextFactory)
     : base(contextFactory)
 {
 }
Beispiel #5
0
 ISendEndpointContextSupervisor CreateContextSupervisor(IPipeContextFactory <SendEndpointContext> contextFactory)
 {
     return(new SendEndpointContextSupervisor(contextFactory));
 }
Beispiel #6
0
 public SendEndpointContextCache(IPipeContextFactory <SendEndpointContext> contextFactory)
     : base(contextFactory)
 {
     _description = "SendEndpointContextCache";
 }
 public SendEndpointContextSupervisor(IPipeContextFactory <SendEndpointContext> contextFactory)
     : base(contextFactory)
 {
 }
Beispiel #8
0
 public ClientCache(Uri inputAddress, IPipeContextFactory <ClientContext> contextFactory)
     : base(contextFactory)
 {
     _description = $"ClientContextCache (input-address: {inputAddress})";
 }
 protected TransportPipeContextSupervisor(IPipeContextFactory <T> factory)
     : base(factory)
 {
     _consumeSupervisor = new Supervisor();
     _sendSupervisor    = new Supervisor();
 }
        /// <summary>
        /// Create the cache
        /// </summary>
        /// <param name="contextFactory">Factory used to create the underlying and active contexts</param>
        public PipeContextSupervisor(IPipeContextFactory <TContext> contextFactory)
        {
            _contextFactory = contextFactory;

            _activeSupervisor = new Supervisor();
        }
Beispiel #11
0
 public FakeClientCache(IPipeContextFactory <ClientContext> contextFactory)
     : base(contextFactory)
 {
 }