Example #1
0
        private ApiRowErrors(int row, ApiErrorCollection errors)
        {
            if (errors == null)
            {
                throw new ArgumentNullException(nameof(errors));
            }

            Row    = row;
            Errors = errors;
        }
Example #2
0
        internal static ApiRowErrors FromJson(JObject row)
        {
            if (row == null)
            {
                throw new ArgumentNullException(nameof(row));
            }

            return(new ApiRowErrors(
                       (int)row["row"],
                       ApiErrorCollection.FromJson((JArray)row["errors"])
                       ));
        }
Example #3
0
        public static ApiErrorCollection FromJson(JArray errors)
        {
            if (errors == null)
            {
                throw new ArgumentNullException(nameof(errors));
            }

            var result = new ApiErrorCollection();

            foreach (var error in errors)
            {
                result.Add(ApiError.FromJson(error));
            }

            return(result);
        }