private ParseBoolean ( string value, string attributeName ) : bool | ||
value | string | |
attributeName | string | |
return | bool |
private bool ParseBoolean(string value, string attributeName)
{
try
{
return XmlConvert.ToBoolean(value);
}
catch (Exception)
{
SendValidationEvent(SR.Sch_InvalidXsdAttributeValue, attributeName, value, null);
return false;
}
}
private static void BuildFacet_Fixed(XsdBuilder builder, string value) { builder.facet.IsFixed = builder.ParseBoolean(value, "fixed"); }