public FormCompileException(string message, XmlSourceNodeInformation xmlInformation, XmlSourceNodeInformation propertyXmlInformation, XmlSourceNodeInformation extraPropertyXmlInformation) : base(message) { _xmlInformation = xmlInformation; _propertyXmlInformation = propertyXmlInformation; _extraPropertyXmlInformation = extraPropertyXmlInformation; }
public static ElementCompileTreeNode BuildRec(XElement element) { int depth = element.Ancestors().Count(); var debugInfo = new XmlSourceNodeInformation(depth, element.Name.LocalName, element.Name.LocalName, element.Name.NamespaceName); var result = new ElementCompileTreeNode(debugInfo); foreach (var attribute in element.Attributes()) { if (attribute.Name.LocalName == "xmlns") continue; bool isNamespaceDeclaration = attribute.Name.Namespace == "http://www.w3.org/2000/xmlns/"; var property = new PropertyCompileTreeNode(attribute.Name.LocalName, debugInfo, isNamespaceDeclaration); property.Value = StringResourceSystemFacade.ParseString(attribute.Value); result.AddNamedProperty(property); } foreach (var node in element.Nodes()) { if (node is XElement) { result.Children.Add(BuildRec(node as XElement)); continue; } if (node is XText) { string text = (node as XText).Value; if (string.IsNullOrWhiteSpace(text)) { continue; } var textProperty = new PropertyCompileTreeNode(CompilerGlobals.DefaultPropertyName, debugInfo); textProperty.Value = StringResourceSystemFacade.ParseString(text); result.DefaultProperties.Add(textProperty); continue; } } return result; }
/// <exclude /> public PropertyCompileTreeNode(string name, XmlSourceNodeInformation sourceInformation, bool isNamespaceDeclaration = false) : base(sourceInformation) { _name = name; IsNamespaceDeclaration = isNamespaceDeclaration; }
public FormCompileException(string message, XmlSourceNodeInformation xmlInformation, Exception inner) : base(message, inner) { _xmlInformation = xmlInformation; }
/// <exclude /> public ElementCompileTreeNode(XmlSourceNodeInformation sourceInformation) : base(sourceInformation) { }
/// <exclude /> public CompileTreeNode(XmlSourceNodeInformation xmlSourceNodeInformation) { _compilerId = _compilerIdCounter++; _xmlSourceNodeInformation = xmlSourceNodeInformation; }