I understand the source Asp.Net met the following construction
public class OAuthMiddleware<TOptions> : AuthenticationMiddleware<TOptions> where TOptions : OAuthOptions, new() { public OAuthMiddleware() { //code here... } } The OAuthMiddleware class inherits the AuthenticationMiddleware class and new() There are three questions.
- Is
new()an anonymous class? - Why in this anonymous class constructor
OAuthMiddleware - What is this design used for? What is the design pattern, if it is known that others are inherited from this class?