Ryujinx-GtkSharp/Source/generator/XmlElementExtensions.cs
2017-09-04 22:36:28 -03:00

21 lines
361 B
C#

using System;
using System.Xml;
namespace GtkSharp.Generation
{
public static class XmlElementExtensions
{
public static bool GetAttributeAsBoolean (this XmlElement elt, string name)
{
string value = elt.GetAttribute (name);
if (String.IsNullOrEmpty (value)) {
return false;
} else {
return XmlConvert.ToBoolean (value);
}
}
}
}