Files
Pilz/Pilz.Net/Api/ApiMessageHandlerAttribute.cs
2024-11-29 11:33:17 +01:00

16 lines
450 B
C#

namespace Pilz.Net.Api;
[AttributeUsage(AttributeTargets.Method)]
public class ApiMessageHandlerAttribute(string route, params string[] methods) : Attribute
{
public ApiMessageHandlerAttribute(string route)
: this(route, HttpMethod.Post.Method)
{
}
public string Route { get; } = route;
public string[] Methods { get; } = methods;
public Type? Serializer { get; set; }
public bool RequiesAuth { get; set; }
}