2

I want to use inheritance for AssertThatAttribute and RequiredIfAttribute but is not possible because both classes are sealed classes

public sealed class RequiredIfAttribute : ExpressiveAttribute
public sealed class AssertThatAttribute : ExpressiveAttribute

Is any other possibility to translate global _defaultErrorMessage

For example:

private const string _defaultErrorMessage = "Assertion for {0} field is not satisfied by the following logic: {1}";

I would like to translate it globally for whole project. Is it possible to do it?

senzacionale
  • 20,448
  • 67
  • 204
  • 316
  • probably you already saw this https://github.com/JaroslawWaliszko/ExpressiveAnnotations/issues/70 and the related pull request, the simpliest solution is fork and free the RequiredIfAttribute – ale Aug 31 '15 at 09:21
  • 1
    Under the link provided above I've just added an example of`ExpressiveAttribute` inheritance (with a few additional steps required to wire it up). – jwaliszko Aug 31 '15 at 09:59
  • make it as a comment that i can accept it – senzacionale Aug 31 '15 at 10:20
  • Just for info. Code works before, but after new version I can not use translation message any more. Now is always in english. Why? What has changed? – senzacionale Dec 10 '15 at 21:12

0 Answers0