0% found this document useful (0 votes)
22 views5 pages

3 Ways of Creating Middlewares

Uploaded by

Mano Haran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views5 pages

3 Ways of Creating Middlewares

Uploaded by

Mano Haran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Middleware

3 ways to create them in .NET

Pavle Davitkovic
Request delegate
Simplest way directly in request
pipeline

*Pass the HttpContext to the next function which


will save 2 per-request allocations

Pavle Davitkovic
Convention based
Encapsulated logic in custom class

Pavle Davitkovic
Factory based
Extensibility point for middleware
activation

Pavle Davitkovic
Want to learn more?

FOLLOW ME

Find this useful?


REPOST

You might also like