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