/// <summary> /// Builds a GetSessions business exception. /// </summary> private GetSessionsBusinessException BuildGetSessionsBusinessException(GetSessionsBusinessException.ErrorCodes errorCode, object erroneousValue) { // Build an Error business exception element. GetSessionsBusinessException.ErrorBusinessExceptionElement errorBusinessExceptionElement = new GetSessionsBusinessException.ErrorBusinessExceptionElement(); errorBusinessExceptionElement.ErrorCode = errorCode; errorBusinessExceptionElement.ErroneousValue = erroneousValue; // Build the business exception. GetSessionsBusinessException businessException = this.BuildGetSessionsBusinessException(new GetSessionsBusinessException.ErrorBusinessExceptionElement[] { errorBusinessExceptionElement }); // Return the business exception. return businessException; }
/// <summary> /// Validates the specified GetSessions business request property. /// </summary> private void ValidateGetSessionsRequestProperty(object businessRequestElement, string propertyName, object propertyValue, GetSessionsBusinessException.ErrorCodes errorCode, List<GetSessionsBusinessException.ErrorBusinessExceptionElement> errorBusinessExceptionElements) { // Check if the property is valid. if (ValidatorHelper.ValidateProperty(businessRequestElement, propertyName, propertyValue)) { return; } // Build the Error business exception element. GetSessionsBusinessException.ErrorBusinessExceptionElement errorBusinessExceptionElement = new GetSessionsBusinessException.ErrorBusinessExceptionElement(); errorBusinessExceptionElement.ErrorCode = errorCode; errorBusinessExceptionElement.ErroneousValue = propertyValue; // Add the Error business exception element to the list. errorBusinessExceptionElements.Add(errorBusinessExceptionElement); }