|
|
using System; using System.Collections.Generic; using System.Text;
namespace Apewer.Web {
#region 路由
/// <summary></summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] public sealed class RoutePrefixAttribute : Attribute {
string _path;
/// <summary></summary>
public string Path { get { return _path; } }
/// <summary></summary>
/// <param name="path"></param>
public RoutePrefixAttribute(string path) { _path = path; }
}
/// <summary></summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)] public sealed class RouteAttribute : Attribute {
string _path;
/// <summary></summary>
public string Path { get { return _path; } }
/// <summary></summary>
public RouteAttribute(string path) { _path = path; }
}
#endregion
#region 方法
/// <summary></summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public sealed class HttpConnectAttribute : Attribute { }
/// <summary></summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public sealed class HttpDeleteAttribute : Attribute { }
/// <summary></summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public sealed class HttpGetAttribute : Attribute { }
/// <summary></summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public sealed class HttpHeadAttribute : Attribute { }
/// <summary></summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public sealed class HttpOptionsAttribute : Attribute { }
/// <summary></summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public sealed class HttpPatchAttribute : Attribute { }
/// <summary></summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public sealed class HttpPostAttribute : Attribute { }
/// <summary></summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public sealed class HttpPutAttribute : Attribute { }
/// <summary></summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public sealed class HttpTraceAttribute : Attribute { }
#endregion
#region 参数
/// <summary></summary>
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] public sealed class FromBodyAttribute : Attribute { }
/// <summary></summary>
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] public sealed class FromUriAttribute : Attribute { }
#endregion
}
|