private XmlSchemaSimpleContentExtension CheckSimpleContentExtension(XmlSchemaComplexType ct) {
XmlSchemaSimpleContent sc = ct.ContentModel as XmlSchemaSimpleContent;
if (sc == null) {
throw new XmlSchemaInferenceException(Res.SchInf_simplecontent, 0, 0);
}
XmlSchemaSimpleContentExtension sce = sc.Content as XmlSchemaSimpleContentExtension;
if (sce == null) {
throw new XmlSchemaInferenceException(Res.SchInf_extension, 0, 0);
}
return sce;
}