/// <summary> /// Adds the next middleware in the execution chain. /// </summary> /// <param name="nextMiddleware"></param> public void Use(AbstractMiddleware <TContext> nextMiddleware) { if (ReferenceEquals(null, nextMiddleware)) { throw new ArgumentNullException(nameof(nextMiddleware), "Who are you?"); } ExecutionChain.Append(nextMiddleware); }
public void Append(AbstractMiddleware <TContext> next) { executionQueue.Enqueue(next); }