有没有办法将静态资源用作属性的 Argumentos?
想象一下
[IsSecured("Secured","Here must be a description of the class")]
public class Secured
{
}
我需要第二个参数是静态资源。像这样的东西
[IsSecured("Secured",ClassNames.SecuredClassNameDescription)]
public class Secured
{
[Allowed("Secured",ClassNames.SecuredMymethodDescription)]
public string Mymethod()
{
}
}
ClassNames是一个.resx文件,它包含一个SecuredClassNameDescription
和SecuredMymethodDescription
文本资源