Beispiel #1
0
        protected override Task <IChannel> ProcessAsyncInternal(IContext context, RecordConfiguration configuration, IChannel channel, ProcessAsyncDelegate nextAsync, CancellationToken cancellationToken)
        {
            Task <IChannel> newChannelTask;

            if ((object)context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            if ((object)configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            if ((object)channel == null)
            {
                throw new ArgumentNullException(nameof(channel));
            }

            //Func<IEnumerable<IMessage>, IEnumerable<IMessage>> reshapeRecords = (r) => this.ReshapeRecords(context, r);

            // simply wrap
            //channel.ApplyWrap(reshapeRecords);


            if ((object)nextAsync != null)
            {
                newChannelTask = nextAsync(context, configuration, channel, cancellationToken);
            }
            else
            {
                newChannelTask = Task.FromResult(channel);
            }

            return(newChannelTask);
        }
Beispiel #2
0
        protected override Task <IChannel> ProcessAsyncInternal(IContext context, RecordConfiguration configuration, IChannel channel, ProcessAsyncDelegate nextAsync, CancellationToken cancellationToken)
        {
            Task <IChannel> newChannelTask;

            if ((object)context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            if ((object)configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            if ((object)channel == null)
            {
                throw new ArgumentNullException(nameof(channel));
            }

            // simply wrap
            //channel.ApplyWrap(this.OxymoronEngine.GetObfuscatedValues);

            if ((object)nextAsync != null)
            {
                newChannelTask = nextAsync(context, configuration, channel, cancellationToken);
            }
            else
            {
                newChannelTask = Task.FromResult(channel);
            }

            return(newChannelTask);
        }