102 references to XmlSchemaUse
System.Data (4)
fx\src\data\System\Data\XMLSchema.cs (4)
1999
column.AllowDBNull = !(attrib.Use ==
XmlSchemaUse
.Required);
2011
if (attrib.Use ==
XmlSchemaUse
.Prohibited) {
2027
string strDefault = (attrib.Use ==
XmlSchemaUse
.Required) ? GetMsdataAttribute(attr, Keywords.MSD_DEFAULTVALUE) : attr.DefaultValue;
2028
if ((attr.Use ==
XmlSchemaUse
.Optional) && (strDefault == null ))
System.Runtime.Serialization (2)
System\Runtime\Serialization\SchemaImporter.cs (2)
1393
if (attribute.Use ==
XmlSchemaUse
.Prohibited)
1399
if (attribute.RefName.IsEmpty || attribute.RefName.Namespace != Globals.SerializationNamespace || attribute.Use ==
XmlSchemaUse
.Required)
System.ServiceModel (2)
System\ServiceModel\Dispatcher\XPathMessageFilter.cs (2)
80
dAttr.Use =
XmlSchemaUse
.Optional;
108
nqAttr.Use =
XmlSchemaUse
.Optional;
System.ServiceModel.Discovery (2)
System\ServiceModel\Discovery\SchemaUtility.cs (2)
240
instanceId.Use =
XmlSchemaUse
.Required;
251
messageNumber.Use =
XmlSchemaUse
.Required;
System.Web.Services (12)
System\Web\Services\Description\ServiceDescriptionSerializer.cs (12)
3267
if (((global::System.Xml.Schema.
XmlSchemaUse
)o.@Use) != global::System.Xml.Schema.
XmlSchemaUse
.@None) {
3268
WriteAttribute(@"use", @"", Write35_XmlSchemaUse(((global::System.Xml.Schema.
XmlSchemaUse
)o.@Use)));
3275
string Write35_XmlSchemaUse(global::System.Xml.Schema.
XmlSchemaUse
v) {
3278
case global::System.Xml.Schema.
XmlSchemaUse
.@Optional: s = @"optional"; break;
3279
case global::System.Xml.Schema.
XmlSchemaUse
.@Prohibited: s = @"prohibited"; break;
3280
case global::System.Xml.Schema.
XmlSchemaUse
.@Required: s = @"required"; break;
8675
global::System.Xml.Schema.
XmlSchemaUse
Read35_XmlSchemaUse(string s) {
8677
case @"optional": return global::System.Xml.Schema.
XmlSchemaUse
.@Optional;
8678
case @"prohibited": return global::System.Xml.Schema.
XmlSchemaUse
.@Prohibited;
8679
case @"required": return global::System.Xml.Schema.
XmlSchemaUse
.@Required;
8680
default: throw CreateUnknownConstantException(s, typeof(global::System.Xml.Schema.
XmlSchemaUse
));
System.Xml (80)
System\Xml\Schema\Inference\Infer.cs (9)
331
attributeReference.Use =
XmlSchemaUse
.Required;
335
attributeReference.Use =
XmlSchemaUse
.Optional;
390
attributeReference.Use =
XmlSchemaUse
.Required;
394
attributeReference.Use =
XmlSchemaUse
.Optional;
440
xsa.Use =
XmlSchemaUse
.Required;
442
xsa.Use =
XmlSchemaUse
.Optional;
1423
attr.Use =
XmlSchemaUse
.Optional;
1428
attr.Use =
XmlSchemaUse
.Optional;
1433
attr.Use =
XmlSchemaUse
.Optional;
System\Xml\Schema\Preprocessor.cs (3)
984
if (attribute.Use !=
XmlSchemaUse
.None) {
1034
if (attribute.DefaultValue != null && attribute.Use !=
XmlSchemaUse
.Optional && attribute.Use !=
XmlSchemaUse
.None) {
System\Xml\Schema\SchemaCollectionCompiler.cs (17)
595
if (attribute.Use !=
XmlSchemaUse
.Prohibited) {
615
if (attribute.Use ==
XmlSchemaUse
.Prohibited) {
1375
if (attribute.Use !=
XmlSchemaUse
.Prohibited) {
1421
if (attribute.Use !=
XmlSchemaUse
.Prohibited) {
1424
if (attribute.Use !=
XmlSchemaUse
.Prohibited ||
1425
(attribute.Use ==
XmlSchemaUse
.Prohibited && derivedBy == XmlSchemaDerivationMethod.Restriction && baseType != XmlSchemaComplexType.AnyType)) {
1445
if (attributeValue.Use !=
XmlSchemaUse
.Prohibited ||
1446
(attributeValue.Use ==
XmlSchemaUse
.Prohibited && derivedBy == XmlSchemaDerivationMethod.Restriction && baseType != XmlSchemaComplexType.AnyType)) {
1474
Debug.Assert(attribute.Use !=
XmlSchemaUse
.Prohibited);
1475
if (attribute.AttributeSchemaType != attributeBase.AttributeSchemaType || attributeBase.Use ==
XmlSchemaUse
.Prohibited) {
1500
if (attributeBase.Use ==
XmlSchemaUse
.Prohibited && attribute.Use !=
XmlSchemaUse
.Prohibited) {
1512
else if (attribute.Use ==
XmlSchemaUse
.Prohibited) {
1716
case
XmlSchemaUse
.None:
1717
case
XmlSchemaUse
.Optional:
1720
case
XmlSchemaUse
.Required:
1723
case
XmlSchemaUse
.Prohibited:
System\Xml\Schema\SchemaCollectionpreProcessor.cs (3)
676
if (attribute.Use !=
XmlSchemaUse
.None) {
724
if (attribute.DefaultValue != null && attribute.Use !=
XmlSchemaUse
.Optional && attribute.Use !=
XmlSchemaUse
.None) {
System\Xml\Schema\SchemaSetCompiler.cs (25)
672
if (attribute.Use ==
XmlSchemaUse
.Prohibited) {
1651
if (attr.Use ==
XmlSchemaUse
.Prohibited) {
1700
if (attr.Use !=
XmlSchemaUse
.Prohibited) {
1703
if (attr.Use !=
XmlSchemaUse
.Prohibited ||
1704
(attr.Use ==
XmlSchemaUse
.Prohibited && derivedBy == XmlSchemaDerivationMethod.Restriction && baseType != XmlSchemaComplexType.AnyType)) {
1724
if (attribute.Use !=
XmlSchemaUse
.Prohibited ||
1725
(attribute.Use ==
XmlSchemaUse
.Prohibited && derivedBy == XmlSchemaDerivationMethod.Restriction && baseType != XmlSchemaComplexType.AnyType)) {
1756
Debug.Assert(attribute.Use !=
XmlSchemaUse
.Prohibited);
1757
if (attributeBase.Use !=
XmlSchemaUse
.Prohibited && attribute.AttributeSchemaType != attributeBase.AttributeSchemaType) { //Extension allows previously prohibited attributes to be re-added,
1779
if (attributeBase.Use ==
XmlSchemaUse
.Prohibited && attribute.Use !=
XmlSchemaUse
.Prohibited) {
1791
else if (attributeBase.Use ==
XmlSchemaUse
.Required && (attribute.Use !=
XmlSchemaUse
.Required)) { //If base is required, derived should also be required
1794
else if (attribute.Use ==
XmlSchemaUse
.Prohibited) {
1842
if (attributeBase.Use ==
XmlSchemaUse
.Prohibited && attribute.Use !=
XmlSchemaUse
.Prohibited) {
1845
else if (attributeBase.Use ==
XmlSchemaUse
.Required && attribute.Use !=
XmlSchemaUse
.Required) {
1848
else if (attribute.Use ==
XmlSchemaUse
.Prohibited) { //If derived att is prohibited, continue
1858
else if (attributeBase.Use ==
XmlSchemaUse
.Required) {
2056
if (xa.Use ==
XmlSchemaUse
.Required) {
2075
case
XmlSchemaUse
.None:
2076
case
XmlSchemaUse
.Optional:
2079
case
XmlSchemaUse
.Required:
2082
case
XmlSchemaUse
.Prohibited:
System\Xml\Schema\XmlSchemaAttribute.cs (4)
24
XmlSchemaUse
use =
XmlSchemaUse
.None;
111
[XmlAttribute("use"), DefaultValue(
XmlSchemaUse
.None)]
112
public
XmlSchemaUse
Use {
System\Xml\Schema\XmlSchemaComplexType.cs (1)
340
if (attribute.Use !=
XmlSchemaUse
.Prohibited) {
System\Xml\Schema\XsdBuilder.cs (1)
1213
builder.attribute.Use = (
XmlSchemaUse
)builder.ParseEnum(value, "use", UseStringValues);
System\Xml\Serialization\SchemaObjectWriter.cs (7)
271
XmlSchemaUse
use = o.Use ==
XmlSchemaUse
.None ?
XmlSchemaUse
.Optional : o.Use;
602
string Write30_XmlSchemaUse(
XmlSchemaUse
v) {
605
case
XmlSchemaUse
.@Optional:s = @"optional"; break;
606
case
XmlSchemaUse
.@Prohibited:s = @"prohibited"; break;
607
case
XmlSchemaUse
.@Required:s = @"required"; break;
System\Xml\Serialization\SoapSchemaImporter.cs (1)
327
if (attr.Use !=
XmlSchemaUse
.Prohibited) throw new InvalidOperationException(Res.GetString(Res.XmlSoapInvalidAttributeUse, type.Name, type.QualifiedName.Namespace));
System\Xml\Serialization\XmlSchemaExporter.cs (5)
631
attribute.Use =
XmlSchemaUse
.Optional;
657
attribute.Use =
XmlSchemaUse
.None;
659
attribute.Use =
XmlSchemaUse
.Required;
675
attribute.Use =
XmlSchemaUse
.None;
681
refAttribute.Use =
XmlSchemaUse
.None;
System\Xml\Serialization\XmlSchemaImporter.cs (4)
1384
if ((attribute.Use ==
XmlSchemaUse
.Optional || attribute.Use ==
XmlSchemaUse
.None) && member.TypeDesc.IsValueType && !attribute.HasDefault && !member.TypeDesc.HasIsEmpty) {
1487
if (attribute.Use ==
XmlSchemaUse
.Prohibited) return null;
1519
accessor.IsOptional = attribute.Use !=
XmlSchemaUse
.Required;