269 references to XmlSchemaDerivationMethod
netstandard (1)
netstandard.cs (1)
2321[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Schema.XmlSchemaDerivationMethod))]
System.Private.Xml (266)
System\Xml\Schema\DataTypeImplementation.cs (2)
192derivedType.SetDerivedBy(XmlSchemaDerivationMethod.Restriction); 204derivedType.SetDerivedBy(XmlSchemaDerivationMethod.List);
System\Xml\Schema\Preprocessor.cs (62)
45private XmlSchemaDerivationMethod _blockDefault; 46private XmlSchemaDerivationMethod _finalDefault; 65private const XmlSchemaDerivationMethod schemaBlockDefaultAllowed = XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.Substitution; 66private const XmlSchemaDerivationMethod schemaFinalDefaultAllowed = XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.List | XmlSchemaDerivationMethod.Union; 67private const XmlSchemaDerivationMethod elementBlockAllowed = XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.Substitution; 68private const XmlSchemaDerivationMethod elementFinalAllowed = XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension; 69private const XmlSchemaDerivationMethod simpleTypeFinalAllowed = XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.List | XmlSchemaDerivationMethod.Union; 70private const XmlSchemaDerivationMethod complexTypeBlockAllowed = XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension; 71private const XmlSchemaDerivationMethod complexTypeFinalAllowed = XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension; 989if (schema.BlockDefault == XmlSchemaDerivationMethod.All) 991_blockDefault = XmlSchemaDerivationMethod.All; 993else if (schema.BlockDefault == XmlSchemaDerivationMethod.None) 995_blockDefault = XmlSchemaDerivationMethod.Empty; 1005if (schema.FinalDefault == XmlSchemaDerivationMethod.All) 1007_finalDefault = XmlSchemaDerivationMethod.All; 1009else if (schema.FinalDefault == XmlSchemaDerivationMethod.None) 1011_finalDefault = XmlSchemaDerivationMethod.Empty; 1272if (element.Final == XmlSchemaDerivationMethod.All) 1274element.SetFinalResolved(XmlSchemaDerivationMethod.All); 1276else if (element.Final == XmlSchemaDerivationMethod.None) 1278if (_finalDefault == XmlSchemaDerivationMethod.All) 1280element.SetFinalResolved(XmlSchemaDerivationMethod.All); 1335element.Block != XmlSchemaDerivationMethod.None || 1360if (element.Final != XmlSchemaDerivationMethod.None) 1378if (element.Block == XmlSchemaDerivationMethod.All) 1380element.SetBlockResolved(XmlSchemaDerivationMethod.All); 1382else if (element.Block == XmlSchemaDerivationMethod.None) 1384if (_blockDefault == XmlSchemaDerivationMethod.All) 1386element.SetBlockResolved(XmlSchemaDerivationMethod.All); 1519if (simpleType.Final == XmlSchemaDerivationMethod.All) 1521simpleType.SetFinalResolved(XmlSchemaDerivationMethod.All); 1523else if (simpleType.Final == XmlSchemaDerivationMethod.None) 1525if (_finalDefault == XmlSchemaDerivationMethod.All) 1527simpleType.SetFinalResolved(XmlSchemaDerivationMethod.All); 1657if (complexType.Block == XmlSchemaDerivationMethod.All) 1659complexType.SetBlockResolved(XmlSchemaDerivationMethod.All); 1661else if (complexType.Block == XmlSchemaDerivationMethod.None) 1673if (complexType.Final == XmlSchemaDerivationMethod.All) 1675complexType.SetFinalResolved(XmlSchemaDerivationMethod.All); 1677else if (complexType.Final == XmlSchemaDerivationMethod.None) 1679if (_finalDefault == XmlSchemaDerivationMethod.All) 1681complexType.SetFinalResolved(XmlSchemaDerivationMethod.All);
System\Xml\Schema\SchemaCollectionCompiler.cs (30)
450if (examplar.FinalResolved == XmlSchemaDerivationMethod.All) 547if ((type.FinalResolved & XmlSchemaDerivationMethod.List) != 0) 560simpleType.SetDerivedBy(XmlSchemaDerivationMethod.List); 586if ((type.FinalResolved & XmlSchemaDerivationMethod.Restriction) != 0) 600simpleType.SetDerivedBy(XmlSchemaDerivationMethod.Restriction); 607simpleType.SetDerivedBy(XmlSchemaDerivationMethod.Union); 654if ((unionMember.FinalResolved & XmlSchemaDerivationMethod.Union) != 0) 693if (unionMember.DerivedBy == XmlSchemaDerivationMethod.Restriction && (unionDatatype.HasLexicalFacets || unionDatatype.HasValueFacets)) 746CompileLocalAttributes(XmlSchemaComplexType.AnyType, complexType, complexType.Attributes, complexType.AnyAttribute, XmlSchemaDerivationMethod.Restriction); 747complexType.SetDerivedBy(XmlSchemaDerivationMethod.Restriction); 827if ((baseType.FinalResolved & XmlSchemaDerivationMethod.Extension) != 0) 836complexType.SetDerivedBy(XmlSchemaDerivationMethod.Extension); 837CompileLocalAttributes(baseType, complexType, simpleExtension.Attributes, simpleExtension.AnyAttribute, XmlSchemaDerivationMethod.Extension); 896if ((baseType.FinalResolved & XmlSchemaDerivationMethod.Restriction) != 0) 921complexType.SetDerivedBy(XmlSchemaDerivationMethod.Restriction); 922CompileLocalAttributes(baseType, complexType, simpleRestriction.Attributes, simpleRestriction.AnyAttribute, XmlSchemaDerivationMethod.Restriction); 951if ((baseType!.FinalResolved & XmlSchemaDerivationMethod.Extension) != 0) 955CompileLocalAttributes(baseType, complexType, complexExtension.Attributes, complexExtension.AnyAttribute, XmlSchemaDerivationMethod.Extension); 988complexType.SetDerivedBy(XmlSchemaDerivationMethod.Extension); 1017if ((baseType!.FinalResolved & XmlSchemaDerivationMethod.Restriction) != 0) 1022CompileLocalAttributes(baseType, complexType, complexRestriction.Attributes, complexRestriction.AnyAttribute, XmlSchemaDerivationMethod.Restriction); 1038complexType.SetDerivedBy(XmlSchemaDerivationMethod.Restriction); 1044if (baseType != null && baseType != XmlSchemaComplexType.AnyType && complexType.DerivedBy == XmlSchemaDerivationMethod.Restriction) 1102if (!element.RefName.IsEmpty && substitution && (element.BlockResolved & XmlSchemaDerivationMethod.Substitution) == 0) 1417XmlSchemaType.IsDerivedFrom(derivedElement.ElementSchemaType, baseElement.ElementSchemaType, ~XmlSchemaDerivationMethod.Restriction); 1784private void CompileLocalAttributes(XmlSchemaComplexType? baseType, XmlSchemaComplexType derivedType, XmlSchemaObjectCollection attributes, XmlSchemaAnyAttribute? anyAttribute, XmlSchemaDerivationMethod derivedBy) 1797(attribute.Use == XmlSchemaUse.Prohibited && derivedBy == XmlSchemaDerivationMethod.Restriction && baseType != XmlSchemaComplexType.AnyType)) 1823(attributeValue.Use == XmlSchemaUse.Prohibited && derivedBy == XmlSchemaDerivationMethod.Restriction && baseType != XmlSchemaComplexType.AnyType)) 1851if (derivedBy == XmlSchemaDerivationMethod.Extension) 1901else if (attributeBase.AttributeSchemaType == null || attribute.AttributeSchemaType == null || !XmlSchemaType.IsDerivedFrom(attribute.AttributeSchemaType, attributeBase.AttributeSchemaType, XmlSchemaDerivationMethod.Empty))
System\Xml\Schema\SchemaCollectionpreProcessor.cs (61)
27private XmlSchemaDerivationMethod _blockDefault; 28private XmlSchemaDerivationMethod _finalDefault; 34private const XmlSchemaDerivationMethod schemaBlockDefaultAllowed = XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.Substitution; 35private const XmlSchemaDerivationMethod schemaFinalDefaultAllowed = XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.List | XmlSchemaDerivationMethod.Union; 36private const XmlSchemaDerivationMethod elementBlockAllowed = XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.Substitution; 37private const XmlSchemaDerivationMethod elementFinalAllowed = XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension; 38private const XmlSchemaDerivationMethod simpleTypeFinalAllowed = XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.List | XmlSchemaDerivationMethod.Union; 39private const XmlSchemaDerivationMethod complexTypeBlockAllowed = XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension; 40private const XmlSchemaDerivationMethod complexTypeFinalAllowed = XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension; 434if (schema.BlockDefault == XmlSchemaDerivationMethod.All) 436_blockDefault = XmlSchemaDerivationMethod.All; 438else if (schema.BlockDefault == XmlSchemaDerivationMethod.None) 440_blockDefault = XmlSchemaDerivationMethod.Empty; 450if (schema.FinalDefault == XmlSchemaDerivationMethod.All) 452_finalDefault = XmlSchemaDerivationMethod.All; 454else if (schema.FinalDefault == XmlSchemaDerivationMethod.None) 456_finalDefault = XmlSchemaDerivationMethod.Empty; 945if (element.Final == XmlSchemaDerivationMethod.All) 947element.SetFinalResolved(XmlSchemaDerivationMethod.All); 949else if (element.Final == XmlSchemaDerivationMethod.None) 951if (_finalDefault == XmlSchemaDerivationMethod.All) 953element.SetFinalResolved(XmlSchemaDerivationMethod.All); 1008element.Block != XmlSchemaDerivationMethod.None || 1033if (element.Final != XmlSchemaDerivationMethod.None) 1051if (element.Block == XmlSchemaDerivationMethod.All) 1053element.SetBlockResolved(XmlSchemaDerivationMethod.All); 1055else if (element.Block == XmlSchemaDerivationMethod.None) 1057if (_blockDefault == XmlSchemaDerivationMethod.All) 1059element.SetBlockResolved(XmlSchemaDerivationMethod.All); 1186if (simpleType.Final == XmlSchemaDerivationMethod.All) 1188simpleType.SetFinalResolved(XmlSchemaDerivationMethod.All); 1190else if (simpleType.Final == XmlSchemaDerivationMethod.None) 1192if (_finalDefault == XmlSchemaDerivationMethod.All) 1194simpleType.SetFinalResolved(XmlSchemaDerivationMethod.All); 1322if (complexType.Block == XmlSchemaDerivationMethod.All) 1324complexType.SetBlockResolved(XmlSchemaDerivationMethod.All); 1326else if (complexType.Block == XmlSchemaDerivationMethod.None) 1338if (complexType.Final == XmlSchemaDerivationMethod.All) 1340complexType.SetFinalResolved(XmlSchemaDerivationMethod.All); 1342else if (complexType.Final == XmlSchemaDerivationMethod.None) 1344if (_finalDefault == XmlSchemaDerivationMethod.All) 1346complexType.SetFinalResolved(XmlSchemaDerivationMethod.All);
System\Xml\Schema\SchemaElementDecl.cs (2)
25private XmlSchemaDerivationMethod _block; 140internal XmlSchemaDerivationMethod Block
System\Xml\Schema\SchemaSetCompiler.cs (44)
508if (examplar.FinalResolved == XmlSchemaDerivationMethod.All) 519if ((element.ElementDecl!.Block & XmlSchemaDerivationMethod.Substitution) == 0) 631if ((type.FinalResolved & XmlSchemaDerivationMethod.List) != 0) 646simpleType.SetDerivedBy(XmlSchemaDerivationMethod.List); 676if ((type.FinalResolved & XmlSchemaDerivationMethod.Restriction) != 0) 689simpleType.SetDerivedBy(XmlSchemaDerivationMethod.Restriction); 696simpleType.SetDerivedBy(XmlSchemaDerivationMethod.Union); 744if ((unionMember.FinalResolved & XmlSchemaDerivationMethod.Union) != 0) 782if (unionMember.DerivedBy == XmlSchemaDerivationMethod.Restriction && (unionDatatype.HasLexicalFacets || unionDatatype.HasValueFacets)) 837CompileLocalAttributes(XmlSchemaComplexType.AnyType, complexType, complexType.Attributes, complexType.AnyAttribute, XmlSchemaDerivationMethod.Restriction); 838complexType.SetDerivedBy(XmlSchemaDerivationMethod.Restriction); 906if ((baseType.FinalResolved & XmlSchemaDerivationMethod.Extension) != 0) 916complexType.SetDerivedBy(XmlSchemaDerivationMethod.Extension); 917CompileLocalAttributes(baseType, complexType, simpleExtension.Attributes, simpleExtension.AnyAttribute, XmlSchemaDerivationMethod.Extension); 977if ((baseType.FinalResolved & XmlSchemaDerivationMethod.Restriction) != 0) 1004complexType.SetDerivedBy(XmlSchemaDerivationMethod.Restriction); 1005CompileLocalAttributes(baseType, complexType, simpleRestriction.Attributes, simpleRestriction.AnyAttribute, XmlSchemaDerivationMethod.Restriction); 1026if ((baseType.FinalResolved & XmlSchemaDerivationMethod.Extension) != 0) 1031CompileLocalAttributes(baseType, complexType, complexExtension.Attributes, complexExtension.AnyAttribute, XmlSchemaDerivationMethod.Extension); 1076complexType.SetDerivedBy(XmlSchemaDerivationMethod.Extension); 1097if ((baseType.FinalResolved & XmlSchemaDerivationMethod.Restriction) != 0) 1101CompileLocalAttributes(baseType, complexType, complexRestriction.Attributes, complexRestriction.AnyAttribute, XmlSchemaDerivationMethod.Restriction); 1122complexType.SetDerivedBy(XmlSchemaDerivationMethod.Restriction); 1129if (baseType != null && baseType != XmlSchemaComplexType.AnyType && complexType.DerivedBy == XmlSchemaDerivationMethod.Restriction) 1233if (!element.RefName.IsEmpty && (element.ElementDecl!.Block & XmlSchemaDerivationMethod.Substitution) == 0) 1658XmlSchemaDerivationMethod baseEffectiveBlock = 1659baseElement.ElementDecl!.Block == XmlSchemaDerivationMethod.All ? 1660XmlSchemaDerivationMethod.Substitution | XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension : 1662XmlSchemaDerivationMethod derivedEffectiveBlock = 1663derivedElement.ElementDecl!.Block == XmlSchemaDerivationMethod.All ? 1664XmlSchemaDerivationMethod.Substitution | XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.Extension : 1673XmlSchemaType.IsDerivedFrom(derivedElement.ElementSchemaType, baseElement.ElementSchemaType, ~(XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.List | XmlSchemaDerivationMethod.Union)))) 2144private void CompileLocalAttributes(XmlSchemaComplexType? baseType, XmlSchemaComplexType derivedType, XmlSchemaObjectCollection attributes, XmlSchemaAnyAttribute? anyAttribute, XmlSchemaDerivationMethod derivedBy) 2157(attr.Use == XmlSchemaUse.Prohibited && derivedBy == XmlSchemaDerivationMethod.Restriction && baseType != XmlSchemaComplexType.AnyType)) 2183(attribute.Use == XmlSchemaUse.Prohibited && derivedBy == XmlSchemaDerivationMethod.Restriction && baseType != XmlSchemaComplexType.AnyType)) 2212if (derivedBy == XmlSchemaDerivationMethod.Extension) 2266else if (attributeBase.AttributeSchemaType == null || attribute.AttributeSchemaType == null || !XmlSchemaType.IsDerivedFrom(attribute.AttributeSchemaType, attributeBase.AttributeSchemaType, XmlSchemaDerivationMethod.Empty)) 2326else if (attributeBase.AttributeSchemaType == null || attribute.AttributeSchemaType == null || !XmlSchemaType.IsDerivedFrom(attribute.AttributeSchemaType, attributeBase.AttributeSchemaType, XmlSchemaDerivationMethod.Empty))
System\Xml\Schema\XmlSchema.cs (8)
23private XmlSchemaDerivationMethod _blockDefault = XmlSchemaDerivationMethod.None; 24private XmlSchemaDerivationMethod _finalDefault = XmlSchemaDerivationMethod.None; 245[XmlAttribute("blockDefault"), DefaultValue(XmlSchemaDerivationMethod.None)] 246public XmlSchemaDerivationMethod BlockDefault 252[XmlAttribute("finalDefault"), DefaultValue(XmlSchemaDerivationMethod.None)] 253public XmlSchemaDerivationMethod FinalDefault
System\Xml\Schema\XmlSchemaComplexType.cs (8)
16private XmlSchemaDerivationMethod _block = XmlSchemaDerivationMethod.None; 24private XmlSchemaDerivationMethod _blockResolved; 143[XmlAttribute("block"), DefaultValue(XmlSchemaDerivationMethod.None)] 144public XmlSchemaDerivationMethod Block 215public XmlSchemaDerivationMethod BlockResolved 239internal void SetBlockResolved(XmlSchemaDerivationMethod value) 406_blockResolved = XmlSchemaDerivationMethod.None;
System\Xml\Schema\XmlSchemaElement.cs (14)
19private XmlSchemaDerivationMethod _block = XmlSchemaDerivationMethod.None; 20private XmlSchemaDerivationMethod _final = XmlSchemaDerivationMethod.None; 33private XmlSchemaDerivationMethod _blockResolved; 34private XmlSchemaDerivationMethod _finalResolved; 50[XmlAttribute("block"), DefaultValue(XmlSchemaDerivationMethod.None)] 51public XmlSchemaDerivationMethod Block 65[XmlAttribute("final"), DefaultValue(XmlSchemaDerivationMethod.None)] 66public XmlSchemaDerivationMethod Final 181public XmlSchemaDerivationMethod BlockResolved 187public XmlSchemaDerivationMethod FinalResolved 216internal void SetBlockResolved(XmlSchemaDerivationMethod value) 221internal void SetFinalResolved(XmlSchemaDerivationMethod value)
System\Xml\Schema\XmlSchemaType.cs (11)
17private XmlSchemaDerivationMethod _final = XmlSchemaDerivationMethod.None; 18private XmlSchemaDerivationMethod _derivedBy; 21private XmlSchemaDerivationMethod _finalResolved; 93[XmlAttribute("final"), DefaultValue(XmlSchemaDerivationMethod.None)] 94public XmlSchemaDerivationMethod Final 113public XmlSchemaDerivationMethod FinalResolved 152public XmlSchemaDerivationMethod DerivedBy 234internal void SetFinalResolved(XmlSchemaDerivationMethod value) 244internal void SetDerivedBy(XmlSchemaDerivationMethod value) 277public static bool IsDerivedFrom([NotNullWhen(true)] XmlSchemaType? derivedType, [NotNullWhen(true)] XmlSchemaType? baseType, XmlSchemaDerivationMethod except)
System\Xml\Schema\XmlSchemaValidator.cs (1)
1399if ((headElem.BlockResolved & XmlSchemaDerivationMethod.Substitution) != 0)
System\Xml\Schema\XmlValueConverter.cs (2)
3142while (schemaType.DerivedBy == XmlSchemaDerivationMethod.Restriction) 3146Debug.Assert(schemaType.DerivedBy == XmlSchemaDerivationMethod.Union);
System\Xml\Schema\XsdBuilder.cs (14)
603(int)XmlSchemaDerivationMethod.Substitution, 604(int)XmlSchemaDerivationMethod.Extension, 605(int)XmlSchemaDerivationMethod.Restriction, 606(int)XmlSchemaDerivationMethod.List, 607(int)XmlSchemaDerivationMethod.Union, 608(int)XmlSchemaDerivationMethod.All, 1142builder._schema.FinalDefault = (XmlSchemaDerivationMethod)builder.ParseBlockFinalEnum(value, "finalDefault"); 1147builder._schema.BlockDefault = (XmlSchemaDerivationMethod)builder.ParseBlockFinalEnum(value, "blockDefault"); 1345builder._element!.Block = (XmlSchemaDerivationMethod)builder.ParseBlockFinalEnum(value, "block"); 1365builder._element!.Final = (XmlSchemaDerivationMethod)builder.ParseBlockFinalEnum(value, "final"); 1484builder._simpleType!.Final = (XmlSchemaDerivationMethod)builder.ParseBlockFinalEnum(value, "final"); 1614builder._complexType!.Block = (XmlSchemaDerivationMethod)builder.ParseBlockFinalEnum(value, "block"); 1619builder._complexType!.Final = (XmlSchemaDerivationMethod)builder.ParseBlockFinalEnum(value, "final"); 2545if (r == (int)XmlSchemaDerivationMethod.All && value.Length > HashAllLength)
System\Xml\Serialization\SchemaObjectWriter.cs (1)
580private static string Write11_XmlSchemaDerivationMethod(XmlSchemaDerivationMethod v)
System\Xml\Xsl\XmlQueryType.cs (3)
518(baseSchemaType == XmlSchemaComplexType.AnyType || XmlSchemaType.IsDerivedFrom(SchemaType, baseSchemaType, /* except:*/XmlSchemaDerivationMethod.Empty)) && 540if (!XmlSchemaType.IsDerivedFrom(this.SchemaType, other.SchemaType, /* except:*/XmlSchemaDerivationMethod.Empty) && 541!XmlSchemaType.IsDerivedFrom(other.SchemaType, this.SchemaType, /* except:*/XmlSchemaDerivationMethod.Empty))
System\Xml\Xsl\XmlQueryTypeFactory.cs (3)
55while (schemaType.DerivedBy == XmlSchemaDerivationMethod.Restriction) 59if (schemaType.DerivedBy == XmlSchemaDerivationMethod.List) 63Debug.Assert(schemaType.DerivedBy == XmlSchemaDerivationMethod.Union);
System.Xml (1)
System.Xml.cs (1)
46[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Schema.XmlSchemaDerivationMethod))]
System.Xml.ReaderWriter (1)
artifacts\obj\System.Xml.ReaderWriter\Debug\net10.0\System.Xml.ReaderWriter.Forwards.cs (1)
45[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Schema.XmlSchemaDerivationMethod))]