You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Usual "classes over interfaces" comment.// Definitely do not make a public interface that the library doesn't already provide at least three different implementations of (non-public ones count), otherwise we don't have confidence in the shape.publicinterfaceIInvocationResult{voidApply(InvocationContextcontext);}// Where does this cancellation token come from?publicSystem.Threading.CancellationTokenGetCancellationToken();}// Even with a renamed concept of "middleware", I'm not sure a delegate feels like the right thing.// And what should a middleware do with "next"? (Was the return type of the delegate supposed to be Task?)// I'm afraid this whole thing needs a full redesign (or, preferably, to be cut).publicdelegatevoidInvocationMiddleware(InvocationContextcontext,Func<InvocationContext,Task>next);// You are aware that callers can pass any value between int.MinValue and int.MaxValue, inclusive, right?publicenumMiddlewareOrder{Default=0,ErrorReporting=1000,ExceptionHandler=-2000,Configuration=-1000,}}
The text was updated successfully, but these errors were encountered:
jonsequitur
changed the title
Consider using Action<InvocationContext> instead of an interface
Consider using Action<InvocationContext> and removing IInvocationResultNov 2, 2022
The text was updated successfully, but these errors were encountered: