Exemplo n.º 1
0
        public static async Task <RpcHelper> Create(Channel channel, int maxConcurrentCalls, ConsumeMode mode, int?timeoutInMs)
        {
            var instance = new RpcHelper(channel, maxConcurrentCalls, mode, timeoutInMs);
            await instance.Setup().ConfigureAwait(false);

            return(instance);
        }
Exemplo n.º 2
0
        public static async Task <RpcHelper> Create(Channel channel, int maxConcurrentCalls, ConsumeMode mode,
                                                    bool captureContext = false, int?timeoutInMs = null)
        {
            var instance = new RpcHelper(channel, maxConcurrentCalls, mode, timeoutInMs)
            {
                CaptureContext = captureContext
            };
            await instance.Setup().ConfigureAwait(captureContext);

            return(instance);
        }
Exemplo n.º 3
0
        public async Task <RpcHelper> CreateRpcHelper(ConsumeMode mode, int maxConcurrentCalls = 500)
        {
            if (_confirmationKeeper != null)
            {
                throw new Exception("This channel is set up for confirmations");
            }

            var helper = new RpcHelper(this, maxConcurrentCalls, mode);
            await helper.Setup();

            return(helper);
        }