示例#1
0
        private void TransformLoop(XmlNodeContext parentContext)
        {
            foreach (XmlNode node in parentContext.Node.ChildNodes)
            {
                var element = node as XmlElement;
                if (element == null)
                {
                    continue;
                }

                XmlElementContext context = CreateElementContext(parentContext as XmlElementContext, element);
                try
                {
                    HandleElement(context);
                }
                catch (Exception ex)
                {
                    HandleException(ex, context);
                }
            }
        }
示例#2
0
 private Exception WrapException(Exception ex, XmlNodeContext context)
 {
     return(XmlNodeException.Wrap(ex, context.Node));
 }
示例#3
0
 private void HandleException(Exception ex, XmlNodeContext context)
 {
     HandleException(WrapException(ex, context));
 }
 static Exception WrapException(Exception ex, XmlNodeContext context)
 => XmlNodeException.Wrap(ex, context.Node);
 void HandleException(Exception ex, XmlNodeContext context)
 => HandleException(WrapException(ex, context));