fix incorrect check which might break when registering an endpoint class that contains no endpoints

This commit is contained in:
GHXX 2024-07-25 04:00:06 +02:00
parent a4ae359df0
commit 29eecc7887

View File

@ -87,7 +87,7 @@ public sealed class HttpServer {
private readonly Dictionary<(string path, string rType), EndpointInvocationInfo> simpleEndpointMethodInfos = new();
private static readonly Type[] expectedEndpointParameterTypes = new[] { typeof(RequestContext) };
public void RegisterEndpointsFromType<T>() {
if (simpleEndpointMethodInfos.Count == 0)
if (stringToTypeParameterConverters.Count == 0)
RegisterDefaultConverters();
var t = typeof(T);