Beispiel #1
0
        private void OnSetDerivationAnnotation()
        {
            if (_type.ContentModel is XmlSchemaComplexContent complexModel)
            {
                if (complexModel.Content is XmlSchemaComplexContentExtension contentExtension)
                {
                    XSAnnotation.SetComponentAnnotation(_derivationAnnotation, contentExtension);
                }

                else if (complexModel.Content is XmlSchemaComplexContentRestriction contentRestriction)
                {
                    XSAnnotation.SetComponentAnnotation(_derivationAnnotation, contentRestriction);
                }
            }
            else if (_type.ContentModel is XmlSchemaSimpleContent simpleModel)
            {
                if (simpleModel.Content is XmlSchemaSimpleContentExtension contentExtension)
                {
                    XSAnnotation.SetComponentAnnotation(_derivationAnnotation, contentExtension);
                }

                else if (simpleModel.Content is XmlSchemaSimpleContentRestriction contentRestriction)
                {
                    XSAnnotation.SetComponentAnnotation(_derivationAnnotation, contentRestriction);
                }
            }
        }
Beispiel #2
0
        private void OnSetContentModelAnnotation()
        {
            if (_type.ContentModel is XmlSchemaComplexContent complexModel)
            {
                XSAnnotation.SetComponentAnnotation(_contentModelAnnotation, complexModel);
            }

            else if (_type.ContentModel is XmlSchemaSimpleContent simpleModel)
            {
                XSAnnotation.SetComponentAnnotation(_contentModelAnnotation, simpleModel);
            }
        }
 private void OnSetAnnotation() => XSAnnotation.SetComponentAnnotation(_annotation, _attributeGroup);