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