Ejemplo n.º 1
0
        public static BusinessException NotSupported(string name = null)
        {
            var msg = string.Format(Resources.RuleViolated_NotSupported, name ?? "");
            var ex = new BusinessException(msg, (int) RuleViolatedType.NotSupported);

            return ex;
        }
Ejemplo n.º 2
0
 public static BusinessException ObjectNotFound(string name = null)
 {
     var msg = string.Format(Resources.RuleViolated_ObjectNotFound, name ?? "");
     var ex = new BusinessException(msg, (int) RuleViolatedType.ObjectNotFound);
     return ex;
 }
Ejemplo n.º 3
0
 public static BusinessException ArgumentNull(string name = null)
 {
     var msg = string.Format(Resources.RuleViolated_ArgumentNull, name ?? "");
     var ex = new BusinessException(msg, (int) RuleViolatedType.ArgumentNull);
     return ex;
 }
Ejemplo n.º 4
0
 public static BusinessException NotAuthenticated()
 {
     var ex = new BusinessException(Resources.RuleViolated_NotAuthenticated,
                                        (int) RuleViolatedType.NotAuthenticated);
     return ex;
 }
Ejemplo n.º 5
0
 public static BusinessException NotAuthorized(string userName = null)
 {
     var msg = string.Format(Resources.RuleViolated_NotAuthorized, userName ?? "");
     var ex = new BusinessException(msg, (int) RuleViolatedType.NotAuthorizaed);
     return ex;
 }