/ILSpy.BamlDecompiler/Ricciolo.StylesExplorer.MarkupReflection/XmlBamlPropertyElement.cs
http://github.com/icsharpcode/ILSpy · C# · 47 lines · 38 code · 7 blank · 2 comment · 0 complexity · 0b476a084955f432e2ba9a24db28a9cf 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.Generic;
- using System.Text;
- namespace Ricciolo.StylesExplorer.MarkupReflection
- {
- internal class XmlBamlPropertyElement : XmlBamlElement
- {
- private readonly PropertyType _propertyType;
- private PropertyDeclaration propertyDeclaration;
-
- public XmlBamlPropertyElement(PropertyType propertyType, PropertyDeclaration propertyDeclaration)
- {
- _propertyType = propertyType;
- this.propertyDeclaration = propertyDeclaration;
- }
- public XmlBamlPropertyElement(XmlBamlElement parent, PropertyType propertyType, PropertyDeclaration propertyDeclaration)
- : base(parent)
- {
- _propertyType = propertyType;
- this.propertyDeclaration = propertyDeclaration;
- this.TypeDeclaration = propertyDeclaration.DeclaringType;
- }
- public PropertyDeclaration PropertyDeclaration
- {
- get
- {
- return this.propertyDeclaration;
- }
- }
- public PropertyType PropertyType
- {
- get { return _propertyType; }
- }
- public override string ToString()
- {
- return String.Format("PropertyElement: {0}.{1}", TypeDeclaration.Name.Replace('+', '.'), PropertyDeclaration.Name);
- }
- }
- }