Exemple #1
0
        internal HttpErrorSetInfo(ServiceErrorSetInfo errorSetInfo)
        {
            ServiceErrorSet = errorSetInfo;

            var httpParameter = errorSetInfo.GetHttpParameters().FirstOrDefault();

            if (httpParameter != null)
            {
                throw httpParameter.CreateInvalidHttpParameterException();
            }

            Errors = errorSetInfo.Errors.Select(x => new HttpErrorInfo(x)).ToList();
        }
        internal HttpErrorSetInfo(ServiceErrorSetInfo errorSetInfo)
        {
            ServiceErrorSet = errorSetInfo;

            var parameter = GetHttpParameters(errorSetInfo).FirstOrDefault();

            if (parameter != null)
            {
                AddInvalidHttpParameterError(parameter);
            }

            Errors = errorSetInfo.Errors.Select(x => new HttpErrorInfo(x)).ToList();
        }
Exemple #3
0
 public static string GetErrorSetName(ServiceErrorSetInfo errorSetInfo) => CodeGenUtility.Capitalize(errorSetInfo.Name);