extended LoginProvider with additional data
This commit is contained in:
1 parent
05b722e513
commit
8d95693c02
11 files changed
+311
-14
No files matched your search
@@ -1,5 +1,6 @@
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using SimpleHttpServer.Internal;
|
||||
|
||||
namespace SimpleHttpServer;
|
||||
|
||||
@@ -34,6 +35,9 @@ public sealed class HttpServer {
|
||||
PrintErrorOrThrow(error, endpoint, throwOnInvalidEndpoint, "HttpEndpointAttribute is only valid on static methods!");
|
||||
continue;
|
||||
}
|
||||
if (!endpoint.IsPublic) {
|
||||
PrintErrorOrThrow(error, endpoint, throwOnInvalidEndpoint, $"{GetFancyMethodName(endpoint)} needs to be public!");
|
||||
}
|
||||
var myParams = endpoint.GetParameters();
|
||||
if (myParams.Length <= 0 || !myParams[0].GetType().IsAssignableFrom(typeof(HttpListenerContext))) {
|
||||
PrintErrorOrThrow(error, endpoint, throwOnInvalidEndpoint, $"{GetFancyMethodName(endpoint)} needs to have a HttpListenerContext as its first argument!");
|
||||
|
||||
Reference in new issue
Block a user