using CZFW.Core; using System; namespace CZFW.Framework.Attributes { [AttributeUsage(AttributeTargets.Property,AllowMultiple =true, Inherited =true)] public class DictSrcAttribute:Attribute { public string SrcUrl { get; set; } public string Mark { get; set; } public int DictId { get; set; } public string GetSrcUrl() { if (!string.IsNullOrWhiteSpace(SrcUrl)) return SrcUrl; if(!string.IsNullOrWhiteSpace(Mark)) { SrcUrl = ConfigHelper.Configs["Framework:DictSrcBase"] +"/Get?Mark="+Mark; return SrcUrl; } if(DictId!=0) { SrcUrl = ConfigHelper.Configs["Framework:DictSrcBase"] + "/GetDictItemsById?Id=" + DictId; return SrcUrl; } return null; } } }