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()); }
public BusClient(IPipeBuilderFactory pipeBuilderFactory, IPipeContextFactory contextFactory, IChannelFactory factory) { _pipeBuilderFactory = pipeBuilderFactory; _contextFactory = contextFactory; }
public ClientContextSupervisor(IPipeContextFactory <ClientContext> contextFactory) : base(contextFactory) { }
ISendEndpointContextSupervisor CreateContextSupervisor(IPipeContextFactory <SendEndpointContext> contextFactory) { return(new SendEndpointContextSupervisor(contextFactory)); }
public SendEndpointContextCache(IPipeContextFactory <SendEndpointContext> contextFactory) : base(contextFactory) { _description = "SendEndpointContextCache"; }
public SendEndpointContextSupervisor(IPipeContextFactory <SendEndpointContext> contextFactory) : base(contextFactory) { }
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(); }
public FakeClientCache(IPipeContextFactory <ClientContext> contextFactory) : base(contextFactory) { }