-
Notifications
You must be signed in to change notification settings - Fork 1
Downstream communication
This is where a middleware places an interface implementation into the OWIN context where is can be picked up by another middleware further down the OWIN pipeline.
The OWIN Framework contains an extension method for IOwinContext called SetFeature<T>() that middleware can use to store these downstream communication objects in the IOwinContext. Similarly there is a GetFeature<T>() extension method that can be used by the downstream middleware to retrieve this interface implementation.
When a middleware implements IMiddleware<T> it makes a promise to store type T in IOwinContext during request processing. Any middleware that declares a dependency on T will be placed in the OWIN pipeline downstream of the middleware that implements IMiddleware<T> so that T will be available in the OWIN context.