using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FlexJobApi.Core { /// /// 资源特性 /// [AttributeUsage(AttributeTargets.Class)] public class ResourceAttribute : Attribute { public ResourceAttribute(EnumResourceController[] controllers) { Controllers = controllers; } /// /// 资源控制器 /// public EnumResourceController[] Controllers { get; } /// /// 忽略权限 /// public bool AllowAnonymous { get; set; } /// /// 请求方式 /// public EnumResourceMethod Method { get; set; } /// /// 文件上传 /// public bool FileUpload { get; set; } } /// /// 资源控制器特性 /// [AttributeUsage(AttributeTargets.Field)] public class ResourceControllerAttribute : Attribute { /// /// 服务 /// public EnumResourceService Service { get; set; } } /// /// 资源服务特性 /// [AttributeUsage(AttributeTargets.Field)] public class ResourceServiceAttribute : Attribute { /// /// 应用名称 /// public string ApplicationName { get; set; } /// /// 路由区域 /// public string RouteArea { get; set; } /// /// 服务名称 /// public string ServiceName { get; set; } } }