Ejemplo n.º 1
0
        private static string ReadError(ResponseReader responseReader)
        {
            var errorMessage = "";

            var errorOperations = responseReader.GetOperationsWithErrors();

            foreach (var errorOperation in errorOperations)
            {
                foreach (var message in errorOperation.Messages)
                {
                    errorMessage += message.Text + "; ";
                }

                // Check for row errors
                var rowErrors = errorOperation.GetRowsWithErrors();

                foreach (var rowError in rowErrors)
                {
                    foreach (var rowErrorMessage in rowError.Messages)
                    {
                        errorMessage += rowErrorMessage.Text + "; ";
                    }
                }
            }

            return(errorMessage);
        }