Files
Hua.Todo/src/TodoList.Application/DynamicApi/HttpAttributes.cs
T
ShaoHua ceb77e624e feat:基础功能实现
feat: 重构 TodoList 架构,新增动态 API 与 MAUI 内嵌 Web 服务
feat:优化交互逻辑,优化发布流程
2026-04-05 00:53:42 +08:00

77 lines
1.4 KiB
C#

namespace TodoList.Application.DynamicApi;
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class HttpGetAttribute : Attribute
{
public string? Route { get; set; }
public HttpGetAttribute()
{
}
public HttpGetAttribute(string route)
{
Route = route;
}
}
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class HttpPostAttribute : Attribute
{
public string? Route { get; set; }
public HttpPostAttribute()
{
}
public HttpPostAttribute(string route)
{
Route = route;
}
}
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class HttpPutAttribute : Attribute
{
public string? Route { get; set; }
public HttpPutAttribute()
{
}
public HttpPutAttribute(string route)
{
Route = route;
}
}
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class HttpDeleteAttribute : Attribute
{
public string? Route { get; set; }
public HttpDeleteAttribute()
{
}
public HttpDeleteAttribute(string route)
{
Route = route;
}
}
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class HttpPatchAttribute : Attribute
{
public string? Route { get; set; }
public HttpPatchAttribute()
{
}
public HttpPatchAttribute(string route)
{
Route = route;
}
}