using SimpleHttpServer.Internal; namespace SimpleHttpServer; [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] public class HttpRoute : Attribute where T : IAuthorizer { public HttpRequestType RequestMethod { get; private set; } public string Location { get; private set; } public Type Authorizer { get; private set; } public HttpRoute(HttpRequestType requestMethod, string location) { RequestMethod = requestMethod; Location = location; Authorizer = typeof(T); } } [AttributeUsage(AttributeTargets.Method)] public class HttpEndpoint : HttpRoute { public HttpEndpoint(HttpRequestType type, string location) : base(type, location) { } }