Ejemplo n.º 1
0
        /// <summary>
        /// Builds Failed Result using command property pass and custom message.
        /// </summary>
        /// <param name="externalErrorCodeInfo">External Error Code Info.</param>
        /// <param name="detailsCodeInfo">Internal Error Code Info.</param>
        /// <param name="errorMessage">Error message.</param>
        /// <returns>FailedResult.</returns>
        public static FailedResult Create(
            ErrorCodeInfo externalErrorCodeInfo,
            ErrorCodeInfo detailsCodeInfo,
            string errorMessage)
        {
            var result = new FailedResult(externalErrorCodeInfo);

            var internalError = new ExecutionError(detailsCodeInfo, null, errorMessage);

            result.AddError(internalError);

            return(result);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Add Error.
 /// </summary>
 /// <param name="errorDetail">Error.</param>
 public void AddError(ExecutionError errorDetail)
 {
     details.Add(errorDetail);
 }