mirror of https://github.com/icsharpcode/ILSpy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.3 KiB
61 lines
1.3 KiB
// 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.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); |
|
} |
|
} |
|
}
|
|
|