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; }
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; }
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; }
public static BusinessException NotAuthenticated() { var ex = new BusinessException(Resources.RuleViolated_NotAuthenticated, (int) RuleViolatedType.NotAuthenticated); return ex; }
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; }