public static AsyncProcessDelegate GetMiddlewareChain(AsyncProcessToNextDelegate asyncProcessToNext, AsyncProcessDelegate asyncNext) { if ((object)asyncProcessToNext == null) { throw new ArgumentNullException(nameof(asyncProcessToNext)); } if ((object)asyncNext == null) { throw new ArgumentNullException(nameof(asyncNext)); } return(new AsyncProcessorClosure(asyncProcessToNext, asyncNext).TransformAsync); }
private AsyncProcessorClosure(AsyncProcessToNextDelegate asyncProcessToNext, AsyncProcessDelegate asyncNext) { if ((object)asyncProcessToNext == null) { throw new ArgumentNullException(nameof(asyncProcessToNext)); } if ((object)asyncNext == null) { throw new ArgumentNullException(nameof(asyncNext)); } this.asyncProcessToNext = asyncProcessToNext; this.asyncNext = asyncNext; }