15 writes to Use
System.Private.Xml (15)
System\Xml\Schema\Inference\Infer.cs (9)
311
attributeReference.
Use
= XmlSchemaUse.Required;
315
attributeReference.
Use
= XmlSchemaUse.Optional;
371
attributeReference.
Use
= XmlSchemaUse.Required;
375
attributeReference.
Use
= XmlSchemaUse.Optional;
421
xsa.
Use
= XmlSchemaUse.Required;
423
xsa.
Use
= XmlSchemaUse.Optional;
1427
attr.
Use
= XmlSchemaUse.Optional;
1434
attr.
Use
= XmlSchemaUse.Optional;
1440
attr.
Use
= XmlSchemaUse.Optional;
System\Xml\Schema\XsdBuilder.cs (1)
1276
builder._attribute!.
Use
= (XmlSchemaUse)builder.ParseEnum(value, "use", s_useStringValues);
System\Xml\Serialization\XmlSchemaExporter.cs (5)
695
attribute.
Use
= XmlSchemaUse.Optional;
727
attribute.
Use
= XmlSchemaUse.None;
730
attribute.
Use
= XmlSchemaUse.Required;
750
attribute.
Use
= XmlSchemaUse.None;
756
refAttribute.
Use
= XmlSchemaUse.None;
55 references to Use
System.Data.Common (4)
System\Data\XMLSchema.cs (4)
2310
column.AllowDBNull = !(attrib.
Use
== XmlSchemaUse.Required);
2324
if (attrib.
Use
== XmlSchemaUse.Prohibited)
2343
string? strDefault = (attrib.
Use
== XmlSchemaUse.Required) ? GetMsdataAttribute(attr, Keywords.MSD_DEFAULTVALUE) : attr.DefaultValue;
2344
if ((attr.
Use
== XmlSchemaUse.Optional) && (strDefault == null))
System.Private.DataContractSerialization (2)
System\Runtime\Serialization\SchemaImporter.cs (2)
1379
if (attribute.
Use
== XmlSchemaUse.Prohibited)
1385
if (attribute.RefName.IsEmpty || attribute.RefName.Namespace != Globals.SerializationNamespace || attribute.
Use
== XmlSchemaUse.Required)
System.Private.Xml (49)
System\Xml\Schema\Preprocessor.cs (3)
1158
if (attribute.
Use
!= XmlSchemaUse.None)
1220
if (attribute.DefaultValue != null && attribute.
Use
!= XmlSchemaUse.Optional && attribute.
Use
!= XmlSchemaUse.None)
System\Xml\Schema\SchemaCollectionCompiler.cs (14)
754
if (attribute!.
Use
!= XmlSchemaUse.Prohibited)
779
if (attribute!.
Use
== XmlSchemaUse.Prohibited)
1732
if (attribute.
Use
!= XmlSchemaUse.Prohibited)
1792
if (attribute.
Use
!= XmlSchemaUse.Prohibited)
1796
if (attribute.
Use
!= XmlSchemaUse.Prohibited ||
1797
(attribute.
Use
== XmlSchemaUse.Prohibited && derivedBy == XmlSchemaDerivationMethod.Restriction && baseType != XmlSchemaComplexType.AnyType))
1822
if (attributeValue!.
Use
!= XmlSchemaUse.Prohibited ||
1823
(attributeValue.
Use
== XmlSchemaUse.Prohibited && derivedBy == XmlSchemaDerivationMethod.Restriction && baseType != XmlSchemaComplexType.AnyType))
1859
Debug.Assert(attribute.
Use
!= XmlSchemaUse.Prohibited);
1860
if (attribute.AttributeSchemaType != attributeBase.AttributeSchemaType || attributeBase.
Use
== XmlSchemaUse.Prohibited)
1893
if (attributeBase.
Use
== XmlSchemaUse.Prohibited && attribute.
Use
!= XmlSchemaUse.Prohibited)
1897
else if (attribute.
Use
== XmlSchemaUse.Prohibited)
2085
switch (xa.
Use
)
System\Xml\Schema\SchemaCollectionpreProcessor.cs (3)
832
if (attribute.
Use
!= XmlSchemaUse.None)
892
if (attribute.DefaultValue != null && attribute.
Use
!= XmlSchemaUse.Optional && attribute.
Use
!= XmlSchemaUse.None)
System\Xml\Schema\SchemaSetCompiler.cs (22)
855
if (attribute!.
Use
== XmlSchemaUse.Prohibited)
2086
if (attr.
Use
== XmlSchemaUse.Prohibited)
2152
if (attr.
Use
!= XmlSchemaUse.Prohibited)
2156
if (attr.
Use
!= XmlSchemaUse.Prohibited ||
2157
(attr.
Use
== XmlSchemaUse.Prohibited && derivedBy == XmlSchemaDerivationMethod.Restriction && baseType != XmlSchemaComplexType.AnyType))
2182
if (attribute!.
Use
!= XmlSchemaUse.Prohibited ||
2183
(attribute.
Use
== XmlSchemaUse.Prohibited && derivedBy == XmlSchemaDerivationMethod.Restriction && baseType != XmlSchemaComplexType.AnyType))
2224
Debug.Assert(attribute.
Use
!= XmlSchemaUse.Prohibited);
2225
if (attributeBase.
Use
!= XmlSchemaUse.Prohibited && attribute.AttributeSchemaType != attributeBase.AttributeSchemaType)
2254
if (attributeBase.
Use
== XmlSchemaUse.Prohibited && attribute.
Use
!= XmlSchemaUse.Prohibited)
2258
else if (attributeBase.
Use
== XmlSchemaUse.Required && (attribute.
Use
!= XmlSchemaUse.Required))
2262
else if (attribute.
Use
== XmlSchemaUse.Prohibited)
2314
if (attributeBase.
Use
== XmlSchemaUse.Prohibited && attribute.
Use
!= XmlSchemaUse.Prohibited)
2318
else if (attributeBase.
Use
== XmlSchemaUse.Required && attribute.
Use
!= XmlSchemaUse.Required)
2322
else if (attribute.
Use
== XmlSchemaUse.Prohibited)
2335
else if (attributeBase.
Use
== XmlSchemaUse.Required)
2531
if (xa.
Use
== XmlSchemaUse.Required)
2557
switch (xa.
Use
)
System\Xml\Schema\XmlSchemaComplexType.cs (1)
300
if (attribute!.
Use
!= XmlSchemaUse.Prohibited)
System\Xml\Serialization\SchemaObjectWriter.cs (2)
326
XmlSchemaUse use = o.
Use
== XmlSchemaUse.None ? XmlSchemaUse.Optional : o.
Use
;
System\Xml\Serialization\XmlSchemaImporter.cs (4)
1481
if ((attribute.
Use
== XmlSchemaUse.Optional || attribute.
Use
== XmlSchemaUse.None) && member.TypeDesc!.IsValueType && !attribute.HasDefault && !member.TypeDesc.HasIsEmpty)
1605
if (attribute.
Use
== XmlSchemaUse.Prohibited) return null;
1635
accessor.IsOptional = attribute.
Use
!= XmlSchemaUse.Required;