C# ExpressiveAnnotations:在RequiredIfAttribute中翻译全局_defaultErrorMessage
我想对C# ExpressiveAnnotations:在RequiredIfAttribute中翻译全局_defaultErrorMessage,c#,translation,expressiveannotations,C#,Translation,Expressiveannotations,我想对assertthattattribute和RequiredIfAttribute使用继承,但不可能,因为这两个类都是密封的类 public sealed class RequiredIfAttribute : ExpressiveAttribute public sealed class AssertThatAttribute : ExpressiveAttribute 是否有其他可能翻译全局udefaultErrorMessage 例如: private const string _d
assertthattattribute
和RequiredIfAttribute
使用继承,但不可能,因为这两个类都是密封的
类
public sealed class RequiredIfAttribute : ExpressiveAttribute
public sealed class AssertThatAttribute : ExpressiveAttribute
是否有其他可能翻译全局udefaultErrorMessage
例如:
private const string _defaultErrorMessage = "Assertion for {0} field is not satisfied by the following logic: {1}";
我想为整个项目进行全球翻译。有可能吗?可能您已经看到了这一点以及相关的pull请求,最简单的解决方案是在上面提供的链接下释放所需的RediftTribute。我刚刚添加了一个
ExpressiveAttribute
继承的示例(还需要一些额外的步骤来连接它).作为一个评论,我可以接受它只是为了提供信息。代码以前是有效的,但新版本后我不能再使用翻译消息了。现在总是用英语。为什么?发生了什么变化?