///<summary>
 /// Constructor for ExpectedResultException
 ///</summary>
 ///<param name="errorInfo">Error context information</param>
 public ExpectedResultException(ErrorContextInformation errorInfo)
     : base(message: errorInfo.ErrorDescription, innerException: errorInfo.InnerException)
 {
     this.errorContextInformation = errorInfo;
     Message = errorInfo.ErrorDescription;
     Code = errorInfo.ErrorCode;
 }
 ///<summary>
 /// Constructor for ExpectedResultException
 ///</summary>
 ///<param name="errorInfo">Error context information</param>
 public ServiceCallFailedException(ErrorContextInformation errorInfo)
     : base(message: errorInfo.ErrorDescription, innerException: errorInfo.InnerException)
 {
     this.errorContextInformation = errorInfo;
     Message = errorInfo.ErrorDescription;
     Code = errorInfo.ErrorCode;
 }
 /// <summary>
 /// Constructor for ExpectedResultException
 /// </summary>
 /// <param name="code">Exception Code</param>
 /// <param name="message">Exception Message</param>
 /// <param name="innerException">Inner exception to attach to the business exception</param>
 public ExpectedResultException(string code, string message, Exception innerException)
     : base(message, innerException)
 {
     errorContextInformation = ErrorFactory.CreateAndLogError((Errors.Errors)Enum.Parse(typeof(Errors.Errors), code), this.Source, null, this, new[] { Message = message });
     this.Code = code;
     this.Message = message;
 }
Exemple #4
0
 /// <summary>
 /// Constructor for the Business Exception
 /// </summary>
 /// <param name="code">Exception Code</param>
 /// <param name="message">Exception Message</param>
 public ValidationException(string code, string message) : base(message)
 {
     
     errorContextInformation = ErrorFactory.CreateAndLogError((Errors.Errors)Enum.Parse(typeof(Errors.Errors), code), this.Source, null, this, new[] { Message = message });
     this.Code = code;
     this.Message = message;
 }
 ///<summary>
 /// Constructor for Business Exception
 ///</summary>
 ///<param name="errorInfo">Error context information</param>
 public PrimaryKeyNotSetException(ErrorContextInformation errorInfo)
     : base(message: errorInfo.ErrorDescription, innerException: errorInfo.InnerException)
 {
     this.errorContextInformation = errorInfo;
     Message = errorInfo.ErrorDescription;
     Code = errorInfo.ErrorCode;
 }
 /// <summary>
 /// Constructor for ExpectedResultException
 /// </summary>
 /// <param name="code">Exception Code</param>
 public ExpectedResultException(string code)
 {
     errorContextInformation = ErrorFactory.CreateAndLogError((Errors.Errors)Enum.Parse(typeof(Errors.Errors), code), this.Source, null, this);
     this.Code = code;
 }
 /// <summary>
 /// Constructor for ExpectedResultException
 /// </summary>
 /// <param name="code">Exception Code</param>
 public ServiceCallFailedException(string code)
 {
     errorContextInformation = ErrorFactory.CreateAndLogError((Errors.Errors)Enum.Parse(typeof(Errors.Errors), code), this.Source, null, this);
     this.Code = code;
 }
 ///<summary>
 /// Constructor for Access Denied Exception
 ///</summary>
 ///<param name="errorInfo">Error context information</param>
 public AccessDeniedException(ErrorContextInformation errorInfo) : base(message:errorInfo.ErrorDescription, innerException: errorInfo.InnerException)
 {
     this.ErrorContextInfo = errorInfo;
     Code = errorInfo.ErrorCode;
     Message = errorInfo.ErrorDescription;
 }