public void GenerateCheckMethodBody(XmlType xmlType) { var xmlComplexType = xmlType as XmlComplexType; ComplexTypeAttributeCheckGenerator.GenerateAttributesCheckingCode(xmlComplexType, _stringBuilder); GenerateElementsCheckingCode(xmlComplexType); }
public void GenerateCheckMethodBody(XmlType xmlType) { var xmlEnumerationType = xmlType as XmlSimpleContentEnumerationComplexType; if (xmlEnumerationType == null) { throw new System.InvalidOperationException($"This class can only generate check methods for {nameof(XmlSimpleContentEnumerationComplexType)} types"); } ComplexTypeAttributeCheckGenerator.GenerateAttributesCheckingCode(xmlEnumerationType, _stringBuilder); EnumerationTypeValueCheckGenerator.GenerateEnumerationValueCheckingCode(xmlEnumerationType.EnumerationValues, _stringBuilder, CodeGeneratorConstants.ELEMENT_CHECK_METHOD_ELEMENT_VARIABLE_NAME); }