NullCodeException.cs 435 B

12345678910111213141516171819
  1. using System;
  2. namespace InABox.Core
  3. {
  4. public class NullCodeException : Exception
  5. {
  6. private readonly string _property;
  7. private readonly Type _type;
  8. public NullCodeException(Type type, string property)
  9. {
  10. _type = type;
  11. _property = property;
  12. }
  13. public override string Message => string.Format("{0}: {1} may not be blank", _type.Name, _property);
  14. }
  15. }