mirror of
https://github.com/C9Glax/tranga.git
synced 2025-05-10 00:42:10 +02:00
19 lines
610 B
C#
19 lines
610 B
C#
using System.Net;
|
|
using System.Text.RegularExpressions;
|
|
|
|
namespace Tranga.Server;
|
|
|
|
internal struct RequestPath
|
|
{
|
|
internal readonly string HttpMethod;
|
|
internal readonly string RegexStr;
|
|
internal readonly Func<GroupCollection, Dictionary<string, string>, ValueTuple<HttpStatusCode, object?>> Method;
|
|
|
|
public RequestPath(string httpHttpMethod, string regexStr,
|
|
Func<GroupCollection, Dictionary<string, string>, ValueTuple<HttpStatusCode, object?>> method)
|
|
{
|
|
this.HttpMethod = httpHttpMethod;
|
|
this.RegexStr = regexStr + "(?:/?)";
|
|
this.Method = method;
|
|
}
|
|
} |