/ILSpy.BamlDecompiler/Ricciolo.StylesExplorer.MarkupReflection/XmlBamlSimpleProperty.cs
http://github.com/icsharpcode/ILSpy · C# · 40 lines · 32 code · 6 blank · 2 comment · 4 complexity · ec07ab87ccef07c735007ed8cafc30c1 MD5 · raw file
- // Copyright (c) AlphaSierraPapa for the SharpDevelop Team
- // 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;
- using System.Xml;
- namespace Ricciolo.StylesExplorer.MarkupReflection
- {
- class XmlBamlSimpleProperty : XmlBamlNode
- {
- public string NamespaceName { get; private set; }
- public string LocalName { get; private set; }
- public string Value { get; private set; }
-
- public XmlBamlSimpleProperty(string namespaceName, string localName, string value)
- {
- if (string.IsNullOrWhiteSpace(namespaceName))
- throw new ArgumentException("namespaceName");
- if (string.IsNullOrWhiteSpace(localName))
- throw new ArgumentException("localName");
- if (value == null)
- throw new ArgumentNullException("value");
- this.NamespaceName = namespaceName;
- this.LocalName = localName;
- this.Value = value;
- }
-
- public override XmlNodeType NodeType {
- get { return XmlNodeType.Attribute; }
- }
-
- public override string ToString()
- {
- return string.Format("{{{0}}}{1}=\"{2}\"", NamespaceName, LocalName, Value);
- }
- }
- }