Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetBooleanAttribute() [2/2]

bool System.Data.XSDSchema.GetBooleanAttribute ( XmlSchemaAnnotated element,
string attrName,
bool defVal )
inlinepackage

Definition at line 1102 of file XSDSchema.cs.

1103 {
1104 string msdataAttribute = GetMsdataAttribute(element, attrName);
1105 if (msdataAttribute == null || msdataAttribute.Length == 0)
1106 {
1107 return defVal;
1108 }
1109 switch (msdataAttribute)
1110 {
1111 case "true":
1112 case "1":
1113 return true;
1114 case "false":
1115 case "0":
1116 return false;
1117 default:
1118 throw ExceptionBuilder.InvalidAttributeValue(attrName, msdataAttribute);
1119 }
1120 }
static string GetMsdataAttribute(XmlSchemaAnnotated node, string ln)
Definition XSDSchema.cs:342

References System.Xml.Dictionary, System.Data.XSDSchema.GetMsdataAttribute(), and System.Data.ExceptionBuilder.InvalidAttributeValue().

Referenced by System.Data.XSDSchema.DatasetElementCount(), System.Data.XSDSchema.FindDatasetElement(), System.Data.XSDSchema.HandleAttributeColumn(), System.Data.XSDSchema.HandleConstraint(), and System.Data.XSDSchema.HandleKeyref().