expose registerhandler method with attribute parameter

This commit is contained in:
Pilzinsel64
2025-03-18 15:09:40 +01:00
parent 5c636597d2
commit ca06ed3da6
2 changed files with 9 additions and 0 deletions

View File

@@ -190,6 +190,13 @@ public class ApiServer : IApiServer
return;
}
RegisterHandler(handler, attribute, throwOnError);
}
public virtual void RegisterHandler(Delegate handler, ApiMessageHandlerAttribute attribute, bool throwOnError)
{
var method = handler.Method;
// Resolves parameters
var url = attribute.Route;
var useRegEx = false;

View File

@@ -28,4 +28,6 @@ public interface IApiServer
void RegisterHandler(Delegate handler);
void RegisterHandler(Delegate handler, bool throwOnError);
void RegisterHandler(Delegate handler, ApiMessageHandlerAttribute attribute, bool throwOnError);
}