/ILSpy.BamlDecompiler/Ricciolo.StylesExplorer.MarkupReflection/XmlBamlElement.cs
http://github.com/icsharpcode/ILSpy · C# · 65 lines · 49 code · 14 blank · 2 comment · 0 complexity · e1cdc9b8f6f50719b22456d9754ba2c3 MD5 · raw file
- // Copyright (c) Cristian Civera (cristian@aspitalia.com)
- // This code is distributed under the MS-PL (for details please see \doc\MS-PL.txt)
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Text;
- using System.Xml;
- namespace Ricciolo.StylesExplorer.MarkupReflection
- {
- class XmlBamlElement : XmlBamlNode
- {
- XmlNamespaceCollection _namespaces = new XmlNamespaceCollection();
- public XmlBamlElement()
- {
- }
- public XmlBamlElement(XmlBamlElement parent)
- {
- this.Parent = parent;
- this.Namespaces.AddRange(parent.Namespaces);
- }
- public XmlNamespaceCollection Namespaces {
- get { return _namespaces; }
- }
-
- public XmlBamlElement Parent { get; private set; }
-
- public TypeDeclaration TypeDeclaration { get; set; }
- public override XmlNodeType NodeType {
- get { return XmlNodeType.Element; }
- }
- public long Position { get; set; }
-
- public bool IsImplicit { get; set; }
- public override string ToString()
- {
- return string.Format("Element: {0}", TypeDeclaration.Name);
- }
- }
- class XmlBamlEndElement : XmlBamlElement
- {
- public XmlBamlEndElement(XmlBamlElement start)
- {
- this.TypeDeclaration = start.TypeDeclaration;
- this.Namespaces.AddRange(start.Namespaces);
- }
- public override XmlNodeType NodeType {
- get { return XmlNodeType.EndElement; }
- }
- public override string ToString()
- {
- return string.Format("EndElement: {0}", TypeDeclaration.Name);
- }
- }
- }