769 references to XmlTypeCode
netstandard (1)
netstandard.cs (1)
2378
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Schema.
XmlTypeCode
))]
System.Private.Xml (766)
System\Xml\BinaryXml\XmlBinaryReader.cs (26)
4176
private static XmlValueConverter GetValueConverter(
XmlTypeCode
typeCode)
4191
value = GetValueConverter(
XmlTypeCode
.UntypedAtomic).ChangeType(
4197
value = GetValueConverter(
XmlTypeCode
.Boolean).ChangeType(
4203
value = GetValueConverter(
XmlTypeCode
.NonNegativeInteger).ChangeType(
4209
value = GetValueConverter(
XmlTypeCode
.UnsignedByte).ChangeType(
4217
value = GetValueConverter(
XmlTypeCode
.Short).ChangeType(
4224
value = GetValueConverter(
XmlTypeCode
.Int).ChangeType(
4231
value = GetValueConverter(
XmlTypeCode
.Long).ChangeType(
4237
value = GetValueConverter(
XmlTypeCode
.Byte).ChangeType(
4245
value = GetValueConverter(
XmlTypeCode
.UnsignedShort).ChangeType(
4252
value = GetValueConverter(
XmlTypeCode
.UnsignedInt).ChangeType(
4259
value = GetValueConverter(
XmlTypeCode
.UnsignedLong).ChangeType(
4266
value = GetValueConverter(
XmlTypeCode
.Float).ChangeType(
4273
value = GetValueConverter(
XmlTypeCode
.Double).ChangeType(
4278
value = GetValueConverter(
XmlTypeCode
.String).ChangeType(
4283
value = GetValueConverter(
XmlTypeCode
.Decimal).ChangeType(
4289
value = GetValueConverter(
XmlTypeCode
.Decimal).ChangeType(
4297
value = GetValueConverter(
XmlTypeCode
.Decimal).ChangeType(
4309
value = GetValueConverter(
XmlTypeCode
.UntypedAtomic).ChangeType(
4324
value = GetValueConverter(token == BinXmlToken.XSD_BINHEX ?
XmlTypeCode
.HexBinary :
XmlTypeCode
.Base64Binary).ChangeType(
4335
value = GetValueConverter(
XmlTypeCode
.DateTime).ChangeType(
4343
value = GetValueConverter(
XmlTypeCode
.DateTime).ChangeType(
4349
value = GetValueConverter(
XmlTypeCode
.Time).ChangeType(
4355
value = GetValueConverter(
XmlTypeCode
.Date).ChangeType(
4366
value = GetValueConverter(
XmlTypeCode
.QName).ChangeType(
System\Xml\Schema\ConstraintStruct.cs (14)
266
case
XmlTypeCode
.Byte:
267
case
XmlTypeCode
.UnsignedByte:
268
case
XmlTypeCode
.Short:
269
case
XmlTypeCode
.UnsignedShort:
270
case
XmlTypeCode
.Int:
271
case
XmlTypeCode
.UnsignedInt:
272
case
XmlTypeCode
.Long:
273
case
XmlTypeCode
.UnsignedLong:
274
case
XmlTypeCode
.Decimal:
275
case
XmlTypeCode
.Integer:
276
case
XmlTypeCode
.PositiveInteger:
277
case
XmlTypeCode
.NonNegativeInteger:
278
case
XmlTypeCode
.NegativeInteger:
279
case
XmlTypeCode
.NonPositiveInteger:
System\Xml\Schema\DataTypeImplementation.cs (121)
106
private static readonly XmlSchemaSimpleType[] s_enumToTypeCode = new XmlSchemaSimpleType[(int)
XmlTypeCode
.DayTimeDuration + 1];
207
case
XmlTypeCode
.NmToken:
208
listContent.ItemType = listContent.BaseItemType = s_enumToTypeCode[(int)
XmlTypeCode
.NmToken];
211
case
XmlTypeCode
.Entity:
212
listContent.ItemType = listContent.BaseItemType = s_enumToTypeCode[(int)
XmlTypeCode
.Entity];
215
case
XmlTypeCode
.Idref:
216
listContent.ItemType = listContent.BaseItemType = s_enumToTypeCode[(int)
XmlTypeCode
.Idref];
286
s_enumToTypeCode[(int)
XmlTypeCode
.AnyAtomicType] = s__anyAtomicType;
294
s_enumToTypeCode[(int)
XmlTypeCode
.UntypedAtomic] = s__untypedAtomicType;
300
FinishBuiltinType(s_yearMonthDurationType, s_enumToTypeCode[(int)
XmlTypeCode
.Duration]);
302
s_enumToTypeCode[(int)
XmlTypeCode
.YearMonthDuration] = s_yearMonthDurationType;
308
FinishBuiltinType(s_dayTimeDurationType, s_enumToTypeCode[(int)
XmlTypeCode
.Duration]);
310
s_enumToTypeCode[(int)
XmlTypeCode
.DayTimeDuration] = s_dayTimeDurationType;
313
internal static XmlSchemaSimpleType GetSimpleTypeFromTypeCode(
XmlTypeCode
typeCode)
327
XmlSchemaSimpleType correctType = GetSimpleTypeFromTypeCode(
XmlTypeCode
.NormalizedString);
342
XmlSchemaSimpleType correctType = GetSimpleTypeFromTypeCode(
XmlTypeCode
.Token);
357
internal static
XmlTypeCode
GetPrimitiveTypeCode(
XmlTypeCode
typeCode)
453
XmlTypeCode
thisCode = this.TypeCode;
454
XmlTypeCode
otherCode = dtype.TypeCode;
484
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.None; } }
997
public override
XmlTypeCode
TypeCode
1191
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.AnyAtomicType; } }
1359
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.AnyAtomicType; } }
1390
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.AnyAtomicType; } }
1401
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UntypedAtomic; } }
1439
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.String; } }
1505
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Boolean; } }
1582
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Float; } }
1668
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Double; } }
1758
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Decimal; } }
1847
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Duration; } }
1939
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.YearMonthDuration; } }
1977
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.DayTimeDuration; } }
1991
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.DateTime; } }
2147
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Time; } }
2180
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Date; } }
2213
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GYearMonth; } }
2247
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GYear; } }
2280
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GMonthDay; } }
2313
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GDay; } }
2347
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GMonth; } }
2386
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.HexBinary; } }
2484
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Base64Binary; } }
2581
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.AnyUri; } }
2676
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.QName; } }
2756
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NormalizedString; } }
2771
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NormalizedString; } }
2794
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Token; } }
2800
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Token; } }
2826
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Language; } }
2849
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NmToken; } }
2874
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Name; } }
2897
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NCName; } }
2932
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Id; } }
2948
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Idref; } }
2964
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Entity; } }
3009
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Notation; } }
3110
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Integer; } }
3154
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NonPositiveInteger; } }
3183
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NegativeInteger; } }
3217
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Long; } }
3271
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Int; } }
3326
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Short; } }
3380
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Byte; } }
3433
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NonNegativeInteger; } }
3466
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UnsignedLong; } }
3520
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UnsignedInt; } }
3574
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UnsignedShort; } }
3627
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UnsignedByte; } }
3680
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.PositiveInteger; } }
System\Xml\Schema\FacetChecker.cs (16)
32
private readonly
XmlTypeCode
_builtInEnum;
48
_nonNegativeInt = DatatypeImplementation.GetSimpleTypeFromTypeCode(
XmlTypeCode
.NonNegativeInteger).Datatype!;
303
XmlSchemaDatatype positiveInt = DatatypeImplementation.GetSimpleTypeFromTypeCode(
XmlTypeCode
.PositiveInteger).Datatype!;
329
if ((_derivedRestriction.FractionDigits != 0) && (_datatype.TypeCode !=
XmlTypeCode
.Decimal))
1410
if (datatype.TypeCode ==
XmlTypeCode
.AnyUri)
1433
private static Exception? CheckBuiltInFacets(string s,
XmlTypeCode
typeCode, bool verifyUri)
1439
case
XmlTypeCode
.AnyUri:
1446
case
XmlTypeCode
.NormalizedString:
1450
case
XmlTypeCode
.Token:
1454
case
XmlTypeCode
.Language:
1465
case
XmlTypeCode
.NmToken:
1469
case
XmlTypeCode
.Name:
1473
case
XmlTypeCode
.NCName:
1474
case
XmlTypeCode
.Id:
1475
case
XmlTypeCode
.Idref:
1476
case
XmlTypeCode
.Entity:
System\Xml\Schema\Preprocessor.cs (1)
541
XmlSchemaDatatype tokenDt = DatatypeImplementation.GetSimpleTypeFromTypeCode(
XmlTypeCode
.Token).Datatype!;
System\Xml\Schema\SchemaCollectionCompiler.cs (2)
2632
if (type.TypeCode ==
XmlTypeCode
.NormalizedString)
2636
else if (type.TypeCode ==
XmlTypeCode
.Token)
System\Xml\Schema\SchemaInfo.cs (1)
199
if (attdef.Datatype.TypeCode ==
XmlTypeCode
.Id)
System\Xml\Schema\SchemaSetCompiler.cs (2)
2545
if (decl.Datatype.TypeCode ==
XmlTypeCode
.Id)
2761
if (decl.Datatype.TypeCode ==
XmlTypeCode
.Id)
System\Xml\Schema\XmlAtomicValue.cs (4)
142
if (nsResolver != null && (_xmlType.TypeCode ==
XmlTypeCode
.QName || _xmlType.TypeCode ==
XmlTypeCode
.Notation))
166
if (nsResolver != null && (_xmlType.TypeCode ==
XmlTypeCode
.QName || _xmlType.TypeCode ==
XmlTypeCode
.Notation))
System\Xml\Schema\XmlSchemaComplexType.cs (1)
303
if (datatype != null && datatype.TypeCode ==
XmlTypeCode
.Id)
System\Xml\Schema\XmlSchemaDataType.cs (50)
45
public virtual
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.None; } }
88
XmlTypeCode
typeCode = this.TypeCode;
92
if (typeCode ==
XmlTypeCode
.AnyAtomicType)
107
if (typeCode ==
XmlTypeCode
.AnyAtomicType)
121
internal static string TypeCodeToString(
XmlTypeCode
typeCode) =>
124
XmlTypeCode
.None => "None",
125
XmlTypeCode
.Item => "AnyType",
126
XmlTypeCode
.AnyAtomicType => "AnyAtomicType",
127
XmlTypeCode
.String => "String",
128
XmlTypeCode
.Boolean => "Boolean",
129
XmlTypeCode
.Decimal => "Decimal",
130
XmlTypeCode
.Float => "Float",
131
XmlTypeCode
.Double => "Double",
132
XmlTypeCode
.Duration => "Duration",
133
XmlTypeCode
.DateTime => "DateTime",
134
XmlTypeCode
.Time => "Time",
135
XmlTypeCode
.Date => "Date",
136
XmlTypeCode
.GYearMonth => "GYearMonth",
137
XmlTypeCode
.GYear => "GYear",
138
XmlTypeCode
.GMonthDay => "GMonthDay",
139
XmlTypeCode
.GDay => "GDay",
140
XmlTypeCode
.GMonth => "GMonth",
141
XmlTypeCode
.HexBinary => "HexBinary",
142
XmlTypeCode
.Base64Binary => "Base64Binary",
143
XmlTypeCode
.AnyUri => "AnyUri",
144
XmlTypeCode
.QName => "QName",
145
XmlTypeCode
.Notation => "Notation",
146
XmlTypeCode
.NormalizedString => "NormalizedString",
147
XmlTypeCode
.Token => "Token",
148
XmlTypeCode
.Language => "Language",
149
XmlTypeCode
.NmToken => "NmToken",
150
XmlTypeCode
.Name => "Name",
151
XmlTypeCode
.NCName => "NCName",
152
XmlTypeCode
.Id => "Id",
153
XmlTypeCode
.Idref => "Idref",
154
XmlTypeCode
.Entity => "Entity",
155
XmlTypeCode
.Integer => "Integer",
156
XmlTypeCode
.NonPositiveInteger => "NonPositiveInteger",
157
XmlTypeCode
.NegativeInteger => "NegativeInteger",
158
XmlTypeCode
.Long => "Long",
159
XmlTypeCode
.Int => "Int",
160
XmlTypeCode
.Short => "Short",
161
XmlTypeCode
.Byte => "Byte",
162
XmlTypeCode
.NonNegativeInteger => "NonNegativeInteger",
163
XmlTypeCode
.UnsignedLong => "UnsignedLong",
164
XmlTypeCode
.UnsignedInt => "UnsignedInt",
165
XmlTypeCode
.UnsignedShort => "UnsignedShort",
166
XmlTypeCode
.UnsignedByte => "UnsignedByte",
167
XmlTypeCode
.PositiveInteger => "PositiveInteger",
System\Xml\Schema\XmlSchemaType.cs (6)
42
public static XmlSchemaSimpleType GetBuiltInSimpleType(
XmlTypeCode
typeCode)
50
public static XmlSchemaComplexType? GetBuiltInComplexType(
XmlTypeCode
typeCode)
52
if (typeCode ==
XmlTypeCode
.Item)
177
public
XmlTypeCode
TypeCode
183
return
XmlTypeCode
.Item;
187
return
XmlTypeCode
.None;
System\Xml\Schema\XmlSchemaValidator.cs (4)
2479
tempXsiTypeSO.SetAttributeType(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.QName));
2487
tempxsiNilSO.SetAttributeType(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Boolean));
2492
XmlSchemaSimpleType stringType = XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String);
2501
XmlSchemaSimpleType stringType = XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String);
System\Xml\Schema\XmlValueConverter.cs (115)
227
private readonly
XmlTypeCode
_typeCode;
250
protected XmlBaseConverter(
XmlTypeCode
typeCode)
254
case
XmlTypeCode
.Item:
259
case
XmlTypeCode
.Node:
264
case
XmlTypeCode
.AnyAtomicType:
406
protected
XmlTypeCode
TypeCode
432
if (_typeCode ==
XmlTypeCode
.Node) return "node";
433
if (_typeCode ==
XmlTypeCode
.AnyAtomicType) return "xdt:anyAtomicType";
435
Debug.Assert(_typeCode ==
XmlTypeCode
.Item, "If SchemaType is null, then TypeCode may only be Item, Node, or AnyAtomicType");
899
if (TypeCode ==
XmlTypeCode
.Decimal) return XmlConvert.ToDecimal((string)value);
924
if (TypeCode ==
XmlTypeCode
.Decimal) return DecimalToInt32(XmlConvert.ToDecimal((string)value));
949
if (TypeCode ==
XmlTypeCode
.Decimal) return DecimalToInt64(XmlConvert.ToDecimal((string)value));
981
if (TypeCode ==
XmlTypeCode
.Decimal) return XmlConvert.ToString((decimal)value);
1165
if (TypeCode ==
XmlTypeCode
.Float) return ((double)XmlConvert.ToSingle((string)value));
1209
if (TypeCode ==
XmlTypeCode
.Float) return XmlConvert.ToSingle((string)value);
1233
if (TypeCode ==
XmlTypeCode
.Float) return XmlConvert.ToString(ToSingle((double)value));
1238
if (TypeCode ==
XmlTypeCode
.Float) return XmlConvert.ToString((float)value);
1344
XmlTypeCode
.Date => StringToDate((string)value),
1345
XmlTypeCode
.Time => StringToTime((string)value),
1346
XmlTypeCode
.GDay => StringToGDay((string)value),
1347
XmlTypeCode
.GMonth => StringToGMonth((string)value),
1348
XmlTypeCode
.GMonthDay => StringToGMonthDay((string)value),
1349
XmlTypeCode
.GYear => StringToGYear((string)value),
1350
XmlTypeCode
.GYearMonth => StringToGYearMonth((string)value),
1383
XmlTypeCode
.Date => StringToDateOffset((string)value),
1384
XmlTypeCode
.Time => StringToTimeOffset((string)value),
1385
XmlTypeCode
.GDay => StringToGDayOffset((string)value),
1386
XmlTypeCode
.GMonth => StringToGMonthOffset((string)value),
1387
XmlTypeCode
.GMonthDay => StringToGMonthDayOffset((string)value),
1388
XmlTypeCode
.GYear => StringToGYearOffset((string)value),
1389
XmlTypeCode
.GYearMonth => StringToGYearMonthOffset((string)value),
1450
XmlTypeCode
.Date => DateToString((DateTime)value),
1451
XmlTypeCode
.Time => TimeToString((DateTime)value),
1452
XmlTypeCode
.GDay => GDayToString((DateTime)value),
1453
XmlTypeCode
.GMonth => GMonthToString((DateTime)value),
1454
XmlTypeCode
.GMonthDay => GMonthDayToString((DateTime)value),
1455
XmlTypeCode
.GYear => GYearToString((DateTime)value),
1456
XmlTypeCode
.GYearMonth => GYearMonthToString((DateTime)value),
1463
XmlTypeCode
.Date => DateOffsetToString((DateTimeOffset)value),
1464
XmlTypeCode
.Time => TimeOffsetToString((DateTimeOffset)value),
1465
XmlTypeCode
.GDay => GDayOffsetToString((DateTimeOffset)value),
1466
XmlTypeCode
.GMonth => GMonthOffsetToString((DateTimeOffset)value),
1467
XmlTypeCode
.GMonthDay => GMonthDayOffsetToString((DateTimeOffset)value),
1468
XmlTypeCode
.GYear => GYearOffsetToString((DateTimeOffset)value),
1469
XmlTypeCode
.GYearMonth => GYearMonthOffsetToString((DateTimeOffset)value),
1729
case
XmlTypeCode
.Base64Binary: return Base64BinaryToString((byte[])value);
1730
case
XmlTypeCode
.HexBinary: return XmlConvert.ToBinHexString((byte[])value);
1734
if (IsDerivedFrom(sourceType, UriType)) if (TypeCode ==
XmlTypeCode
.AnyUri) return AnyUriToString((Uri)value);
1739
case
XmlTypeCode
.DayTimeDuration: return DayTimeDurationToString((TimeSpan)value);
1740
case
XmlTypeCode
.Duration: return DurationToString((TimeSpan)value);
1741
case
XmlTypeCode
.YearMonthDuration: return YearMonthDurationToString((TimeSpan)value);
1748
case
XmlTypeCode
.Notation: return QNameToString((XmlQualifiedName)value, nsResolver);
1749
case
XmlTypeCode
.QName: return QNameToString((XmlQualifiedName)value, nsResolver);
1771
case
XmlTypeCode
.Base64Binary: return StringToBase64Binary((string)value);
1772
case
XmlTypeCode
.HexBinary: return StringToHexBinary((string)value);
1779
case
XmlTypeCode
.Notation: return StringToQName((string)value, nsResolver);
1780
case
XmlTypeCode
.QName: return StringToQName((string)value, nsResolver);
1788
case
XmlTypeCode
.DayTimeDuration: return StringToDayTimeDuration((string)value);
1789
case
XmlTypeCode
.Duration: return StringToDuration((string)value);
1790
case
XmlTypeCode
.YearMonthDuration: return StringToYearMonthDuration((string)value);
1793
if (destinationType == UriType) if (TypeCode ==
XmlTypeCode
.AnyUri) return XmlConvert.ToUri((string)value);
1813
case
XmlTypeCode
.Base64Binary: return ((byte[])value);
1814
case
XmlTypeCode
.HexBinary: return ((byte[])value);
1821
case
XmlTypeCode
.Base64Binary: return StringToBase64Binary((string)value);
1822
case
XmlTypeCode
.HexBinary: return StringToHexBinary((string)value);
1832
case
XmlTypeCode
.Notation: return StringToQName((string)value, nsResolver);
1833
case
XmlTypeCode
.QName: return StringToQName((string)value, nsResolver);
1840
case
XmlTypeCode
.Notation: return ((XmlQualifiedName)value);
1841
case
XmlTypeCode
.QName: return ((XmlQualifiedName)value);
1852
case
XmlTypeCode
.DayTimeDuration: return StringToDayTimeDuration((string)value);
1853
case
XmlTypeCode
.Duration: return StringToDuration((string)value);
1854
case
XmlTypeCode
.YearMonthDuration: return StringToYearMonthDuration((string)value);
1861
case
XmlTypeCode
.DayTimeDuration: return ((TimeSpan)value);
1862
case
XmlTypeCode
.Duration: return ((TimeSpan)value);
1863
case
XmlTypeCode
.YearMonthDuration: return ((TimeSpan)value);
1869
if (sourceType == StringType) if (TypeCode ==
XmlTypeCode
.AnyUri) return XmlConvert.ToUri((string)value);
1870
if (IsDerivedFrom(sourceType, UriType)) if (TypeCode ==
XmlTypeCode
.AnyUri) return ((Uri)value);
1878
case
XmlTypeCode
.Base64Binary: return (new XmlAtomicValue(SchemaType!, value));
1879
case
XmlTypeCode
.HexBinary: return (new XmlAtomicValue(SchemaType!, value));
1887
case
XmlTypeCode
.DayTimeDuration: return (new XmlAtomicValue(SchemaType!, value));
1888
case
XmlTypeCode
.Duration: return (new XmlAtomicValue(SchemaType!, value));
1889
case
XmlTypeCode
.YearMonthDuration: return (new XmlAtomicValue(SchemaType!, value));
1892
if (IsDerivedFrom(sourceType, UriType)) if (TypeCode ==
XmlTypeCode
.AnyUri) return (new XmlAtomicValue(SchemaType!, value));
1898
case
XmlTypeCode
.Notation: return (new XmlAtomicValue(SchemaType!, value, nsResolver));
1899
case
XmlTypeCode
.QName: return (new XmlAtomicValue(SchemaType!, value, nsResolver));
2531
private XmlAnyConverter(
XmlTypeCode
typeCode) : base(typeCode)
2535
public static readonly XmlValueConverter Item = new XmlAnyConverter(
XmlTypeCode
.Item);
2536
public static readonly XmlValueConverter AnyAtomic = new XmlAnyConverter(
XmlTypeCode
.AnyAtomicType);
2683
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Boolean), (bool)value));
2693
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.DateTime), (DateTime)value));
2703
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Decimal), value));
2713
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Double), (double)value));
2723
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Int), (int)value));
2733
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Long), (long)value));
2744
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), (string)value));
2792
if (sourceType == BooleanType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Boolean), (bool)value));
2793
if (sourceType == ByteType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.UnsignedByte), value));
2794
if (sourceType == ByteArrayType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Base64Binary), value));
2795
if (sourceType == DateTimeType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.DateTime), (DateTime)value));
2796
if (sourceType == DateTimeOffsetType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.DateTime), (DateTimeOffset)value));
2797
if (sourceType == DecimalType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Decimal), value));
2798
if (sourceType == DoubleType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Double), (double)value));
2799
if (sourceType == Int16Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Short), value));
2800
if (sourceType == Int32Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Int), (int)value));
2801
if (sourceType == Int64Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Long), (long)value));
2802
if (sourceType == SByteType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Byte), value));
2803
if (sourceType == SingleType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Float), value));
2804
if (sourceType == StringType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), (string)value));
2805
if (sourceType == TimeSpanType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Duration), value));
2806
if (sourceType == UInt16Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.UnsignedShort), value));
2807
if (sourceType == UInt32Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.UnsignedInt), value));
2808
if (sourceType == UInt64Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.UnsignedLong), value));
2809
if (IsDerivedFrom(sourceType, UriType)) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.AnyUri), value));
2810
if (IsDerivedFrom(sourceType, XmlQualifiedNameType)) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.QName), value, nsResolver));
2853
if (TypeCode !=
XmlTypeCode
.Item)
System\Xml\Schema\XsdDateTime.cs (10)
257
public
XmlTypeCode
TypeCode
681
private static readonly
XmlTypeCode
[] s_typeCodes = {
682
XmlTypeCode
.DateTime,
683
XmlTypeCode
.Time,
684
XmlTypeCode
.Date,
685
XmlTypeCode
.GYearMonth,
686
XmlTypeCode
.GYear,
687
XmlTypeCode
.GMonthDay,
688
XmlTypeCode
.GDay,
689
XmlTypeCode
.GMonth
System\Xml\Xsl\IlGen\GenerateHelper.cs (24)
288
public static readonly MethodInfo ItemMatchesCode = typeof(XmlQueryRuntime).GetMethod("MatchesXmlType", new[] { typeof(XPathItem), typeof(
XmlTypeCode
) })!;
294
public static readonly MethodInfo SeqMatchesCode = typeof(XmlQueryRuntime).GetMethod("MatchesXmlType", new[] { typeof(IList<XPathItem>), typeof(
XmlTypeCode
) })!;
949
public void CallArithmeticOp(QilNodeType opType,
XmlTypeCode
code)
955
case
XmlTypeCode
.Int:
956
case
XmlTypeCode
.Integer:
957
case
XmlTypeCode
.Double:
958
case
XmlTypeCode
.Float:
971
case
XmlTypeCode
.Decimal:
992
public void CallCompareEquals(
XmlTypeCode
code)
998
case
XmlTypeCode
.String: meth = XmlILMethods.StrEq; break;
999
case
XmlTypeCode
.QName: meth = XmlILMethods.QNameEq; break;
1000
case
XmlTypeCode
.Decimal: meth = XmlILMethods.DecEq; break;
1009
public void CallCompare(
XmlTypeCode
code)
1015
case
XmlTypeCode
.String: meth = XmlILMethods.StrCmp; break;
1016
case
XmlTypeCode
.Decimal: meth = XmlILMethods.DecCmp; break;
1415
case
XmlTypeCode
.String: meth = XmlILMethods.SortKeyString; break;
1416
case
XmlTypeCode
.Decimal: meth = XmlILMethods.SortKeyDecimal; break;
1417
case
XmlTypeCode
.Integer: meth = XmlILMethods.SortKeyInteger; break;
1418
case
XmlTypeCode
.Int: meth = XmlILMethods.SortKeyInt; break;
1419
case
XmlTypeCode
.Boolean: meth = XmlILMethods.SortKeyInt; break;
1420
case
XmlTypeCode
.Double: meth = XmlILMethods.SortKeyDouble; break;
1421
case
XmlTypeCode
.DateTime: meth = XmlILMethods.SortKeyDateTime; break;
1423
case
XmlTypeCode
.None:
1429
case
XmlTypeCode
.AnyAtomicType:
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (30)
260
_helper.LoadInteger((int)
XmlTypeCode
.QName);
912
Debug.Assert(ndCond.Left.XmlType!.TypeCode ==
XmlTypeCode
.Boolean);
1627
if (ndParsedTagName.Right.XmlType!.TypeCode ==
XmlTypeCode
.String)
1712
XmlTypeCode
code;
1740
case
XmlTypeCode
.String:
1741
case
XmlTypeCode
.Decimal:
1742
case
XmlTypeCode
.QName:
1753
Debug.Assert(code !=
XmlTypeCode
.QName, $"QName values do not support the {relOp} operation");
1764
case
XmlTypeCode
.Integer:
1765
case
XmlTypeCode
.Int:
1766
case
XmlTypeCode
.Boolean:
1767
case
XmlTypeCode
.Double:
1821
ClrCompare(ndComp.NodeType == QilNodeType.Before ? QilNodeType.Lt : QilNodeType.Gt,
XmlTypeCode
.String);
3177
XmlTypeCode
codeBase;
3201
if ((object)typBase == (object)TypeFactory.Double) codeBase =
XmlTypeCode
.Double;
3202
else if ((object)typBase == (object)TypeFactory.String) codeBase =
XmlTypeCode
.String;
3203
else if ((object)typBase == (object)TypeFactory.Boolean) codeBase =
XmlTypeCode
.Boolean;
3204
else if ((object)typBase == (object)TypeFactory.Node) codeBase =
XmlTypeCode
.Node;
3205
else codeBase =
XmlTypeCode
.None;
3207
if (codeBase !=
XmlTypeCode
.None)
3322
ClrCompare(allowKinds ? QilNodeType.Eq : QilNodeType.Ne,
XmlTypeCode
.Int);
3670
else if ((ndActualArg.XmlType.IsSingleton && clrTypeFormalArg == itemType) || ndActualArg.XmlType.TypeCode ==
XmlTypeCode
.None)
3689
if (xmlTypeFormalArg.TypeCode ==
XmlTypeCode
.Item || !clrTypeFormalArg.IsAssignableFrom(clrTypeActualArg))
4105
Debug.Assert(ndName.XmlType!.TypeCode ==
XmlTypeCode
.QName, "Element or attribute name must have QName type.");
4176
if ((ndName as QilBinary)!.Right.XmlType!.TypeCode ==
XmlTypeCode
.String)
4229
ZeroCompare(relOp, ndSecond.XmlType!.TypeCode ==
XmlTypeCode
.Boolean);
4289
private void ClrCompare(QilNodeType relOp,
XmlTypeCode
code)
4299
if (code ==
XmlTypeCode
.Double || code ==
XmlTypeCode
.Float)
4697
nd.XmlType!.TypeCode ==
XmlTypeCode
.None,
System\Xml\Xsl\QIL\QilPatternFactory.cs (1)
229
Debug.Assert(arg.XmlType!.TypeCode ==
XmlTypeCode
.Boolean && arg.XmlType.IsSingleton,
System\Xml\Xsl\QIL\QilTypeChecker.cs (2)
475
return node.Left.XmlType!.TypeCode ==
XmlTypeCode
.None ? node.Right.XmlType! : node.Left.XmlType!;
1066
if (body.XmlType!.TypeCode ==
XmlTypeCode
.None)
System\Xml\Xsl\Runtime\XmlQueryContext.cs (6)
288
case
XmlTypeCode
.Boolean: objActualArgs[i] = XsltConvert.ToBoolean(args[i]); break;
289
case
XmlTypeCode
.Double: objActualArgs[i] = XsltConvert.ToDouble(args[i]); break;
290
case
XmlTypeCode
.String: objActualArgs[i] = XsltConvert.ToString(args[i]); break;
291
case
XmlTypeCode
.Node:
297
case
XmlTypeCode
.Item:
307
if (xmlTypeFormalArg.TypeCode ==
XmlTypeCode
.Item || !clrTypeFormalArg.IsAssignableFrom(objActualArgs[i].GetType()))
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (32)
488
case
XmlTypeCode
.String:
493
case
XmlTypeCode
.Double:
498
case
XmlTypeCode
.Node:
519
case
XmlTypeCode
.Item:
581
case
XmlTypeCode
.String:
586
case
XmlTypeCode
.Double:
592
case
XmlTypeCode
.Node:
627
case
XmlTypeCode
.Item:
635
case
XmlTypeCode
.Boolean:
636
value = new XmlQueryItemSequence(new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Boolean), value));
639
case
XmlTypeCode
.Double:
640
value = new XmlQueryItemSequence(new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Double), ((IConvertible)value).ToDouble(null)));
643
case
XmlTypeCode
.String:
645
value = new XmlQueryItemSequence(new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), XsltConvert.ToString((DateTime)value)));
647
value = new XmlQueryItemSequence(new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), value));
650
case
XmlTypeCode
.Node:
655
case
XmlTypeCode
.Item:
736
public bool MatchesXmlType(IList<XPathItem> seq,
XmlTypeCode
code)
747
public bool MatchesXmlType(XPathItem item,
XmlTypeCode
code)
750
if (code >
XmlTypeCode
.AnyAtomicType)
756
case
XmlTypeCode
.AnyAtomicType: return !item.IsNode;
757
case
XmlTypeCode
.Node: return item.IsNode;
758
case
XmlTypeCode
.Item: return true;
765
case XPathNodeType.Root: return code ==
XmlTypeCode
.Document;
766
case XPathNodeType.Element: return code ==
XmlTypeCode
.Element;
767
case XPathNodeType.Attribute: return code ==
XmlTypeCode
.Attribute;
768
case XPathNodeType.Namespace: return code ==
XmlTypeCode
.Namespace;
769
case XPathNodeType.Text: return code ==
XmlTypeCode
.Text;
770
case XPathNodeType.SignificantWhitespace: return code ==
XmlTypeCode
.Text;
771
case XPathNodeType.Whitespace: return code ==
XmlTypeCode
.Text;
772
case XPathNodeType.ProcessingInstruction: return code ==
XmlTypeCode
.ProcessingInstruction;
773
case XPathNodeType.Comment: return code ==
XmlTypeCode
.Comment;
System\Xml\Xsl\Runtime\XsltConvert.cs (23)
257
case
XmlTypeCode
.Boolean:
260
case
XmlTypeCode
.Boolean:
261
case
XmlTypeCode
.Double:
262
case
XmlTypeCode
.String:
267
case
XmlTypeCode
.DateTime:
268
if (value.XmlType.TypeCode ==
XmlTypeCode
.String)
272
case
XmlTypeCode
.Decimal:
273
if (value.XmlType.TypeCode ==
XmlTypeCode
.Double)
277
case
XmlTypeCode
.Double:
280
case
XmlTypeCode
.Boolean:
281
case
XmlTypeCode
.Double:
282
case
XmlTypeCode
.String:
285
case
XmlTypeCode
.Decimal:
288
case
XmlTypeCode
.Int:
289
case
XmlTypeCode
.Long:
294
case
XmlTypeCode
.Int:
295
case
XmlTypeCode
.Long:
296
if (value.XmlType.TypeCode ==
XmlTypeCode
.Double)
300
case
XmlTypeCode
.String:
303
case
XmlTypeCode
.Boolean:
304
case
XmlTypeCode
.Double:
305
case
XmlTypeCode
.String:
308
case
XmlTypeCode
.DateTime:
System\Xml\Xsl\Runtime\XsltFunctions.cs (13)
221
case "version": return new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Double), 1.0);
222
case "vendor": return new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), "Microsoft");
223
case "vendor-url": return new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), "http://www.microsoft.com");
229
return new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), typeof(XsltLibrary).Assembly.ImageRuntimeVersion);
232
return new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), string.Empty);
448
case
XmlTypeCode
.DateTime:
452
case
XmlTypeCode
.Time:
455
case
XmlTypeCode
.Date:
458
case
XmlTypeCode
.GYearMonth:
462
case
XmlTypeCode
.GYear:
465
case
XmlTypeCode
.GMonthDay:
469
case
XmlTypeCode
.GDay:
472
case
XmlTypeCode
.GMonth:
System\Xml\Xsl\XmlQueryType.cs (64)
34
public abstract
XmlTypeCode
TypeCode { get; }
533
if (this.TypeCode ==
XmlTypeCode
.Node)
572
case
XmlTypeCode
.Document:
574
goto case
XmlTypeCode
.Element;
579
case
XmlTypeCode
.Element:
580
case
XmlTypeCode
.Attribute:
733
private static readonly
XmlTypeCode
[] s_baseTypeCodes = {
734
/* None */
XmlTypeCode
.None,
735
/* Item */
XmlTypeCode
.Item,
736
/* Node */
XmlTypeCode
.Item,
737
/* Document */
XmlTypeCode
.Node,
738
/* Element */
XmlTypeCode
.Node,
739
/* Attribute */
XmlTypeCode
.Node,
740
/* Namespace */
XmlTypeCode
.Node,
741
/* ProcessingInstruction */
XmlTypeCode
.Node,
742
/* Comment */
XmlTypeCode
.Node,
743
/* Text */
XmlTypeCode
.Node,
744
/* AnyAtomicType */
XmlTypeCode
.Item,
745
/* UntypedAtomic */
XmlTypeCode
.AnyAtomicType,
746
/* String */
XmlTypeCode
.AnyAtomicType,
747
/* Boolean */
XmlTypeCode
.AnyAtomicType,
748
/* Decimal */
XmlTypeCode
.AnyAtomicType,
749
/* Float */
XmlTypeCode
.AnyAtomicType,
750
/* Double */
XmlTypeCode
.AnyAtomicType,
751
/* Duration */
XmlTypeCode
.AnyAtomicType,
752
/* DateTime */
XmlTypeCode
.AnyAtomicType,
753
/* Time */
XmlTypeCode
.AnyAtomicType,
754
/* Date */
XmlTypeCode
.AnyAtomicType,
755
/* GYearMonth */
XmlTypeCode
.AnyAtomicType,
756
/* GYear */
XmlTypeCode
.AnyAtomicType,
757
/* GMonthDay */
XmlTypeCode
.AnyAtomicType,
758
/* GDay */
XmlTypeCode
.AnyAtomicType,
759
/* GMonth */
XmlTypeCode
.AnyAtomicType,
760
/* HexBinary */
XmlTypeCode
.AnyAtomicType,
761
/* Base64Binary */
XmlTypeCode
.AnyAtomicType,
762
/* AnyUri */
XmlTypeCode
.AnyAtomicType,
763
/* QName */
XmlTypeCode
.AnyAtomicType,
764
/* Notation */
XmlTypeCode
.AnyAtomicType,
765
/* NormalizedString */
XmlTypeCode
.String,
766
/* Token */
XmlTypeCode
.NormalizedString,
767
/* Language */
XmlTypeCode
.Token,
768
/* NmToken */
XmlTypeCode
.Token,
769
/* Name */
XmlTypeCode
.Token,
770
/* NCName */
XmlTypeCode
.Name,
771
/* Id */
XmlTypeCode
.NCName,
772
/* Idref */
XmlTypeCode
.NCName,
773
/* Entity */
XmlTypeCode
.NCName,
774
/* Integer */
XmlTypeCode
.Decimal,
775
/* NonPositiveInteger */
XmlTypeCode
.Integer,
776
/* NegativeInteger */
XmlTypeCode
.NonPositiveInteger,
777
/* Long */
XmlTypeCode
.Integer,
778
/* Int */
XmlTypeCode
.Long,
779
/* Short */
XmlTypeCode
.Int,
780
/* Byte */
XmlTypeCode
.Short,
781
/* NonNegativeInteger */
XmlTypeCode
.Integer,
782
/* UnsignedLong */
XmlTypeCode
.NonNegativeInteger,
783
/* UnsignedInt */
XmlTypeCode
.UnsignedLong,
784
/* UnsignedShort */
XmlTypeCode
.UnsignedInt,
785
/* UnsignedByte */
XmlTypeCode
.UnsignedShort,
786
/* PositiveInteger */
XmlTypeCode
.NonNegativeInteger,
787
/* YearMonthDuration */
XmlTypeCode
.Duration,
788
/* DayTimeDuration */
XmlTypeCode
.Duration,
923
public bool this[
XmlTypeCode
index1,
XmlTypeCode
index2]
System\Xml\Xsl\XmlQueryTypeFactory.cs (100)
31
public static XmlQueryType Type(
XmlTypeCode
code, bool isStrict)
186
public static readonly XmlQueryType Item = TF.Type(
XmlTypeCode
.Item, false);
188
public static readonly XmlQueryType Node = TF.Type(
XmlTypeCode
.Node, false);
190
public static readonly XmlQueryType Element = TF.Type(
XmlTypeCode
.Element, false);
192
public static readonly XmlQueryType Document = TF.Type(
XmlTypeCode
.Document, false);
194
public static readonly XmlQueryType Attribute = TF.Type(
XmlTypeCode
.Attribute, false);
197
public static readonly XmlQueryType Namespace = TF.Type(
XmlTypeCode
.Namespace, false);
199
public static readonly XmlQueryType Text = TF.Type(
XmlTypeCode
.Text, false);
201
public static readonly XmlQueryType Comment = TF.Type(
XmlTypeCode
.Comment, false);
203
public static readonly XmlQueryType PI = TF.Type(
XmlTypeCode
.ProcessingInstruction, false);
214
public static readonly XmlQueryType AnyAtomicType = TF.Type(
XmlTypeCode
.AnyAtomicType, false);
216
public static readonly XmlQueryType String = TF.Type(
XmlTypeCode
.String, false);
217
public static readonly XmlQueryType StringX = TF.Type(
XmlTypeCode
.String, true);
219
public static readonly XmlQueryType Boolean = TF.Type(
XmlTypeCode
.Boolean, false);
220
public static readonly XmlQueryType BooleanX = TF.Type(
XmlTypeCode
.Boolean, true);
221
public static readonly XmlQueryType Int = TF.Type(
XmlTypeCode
.Int, false);
222
public static readonly XmlQueryType IntX = TF.Type(
XmlTypeCode
.Int, true);
224
public static readonly XmlQueryType IntegerX = TF.Type(
XmlTypeCode
.Integer, true);
225
public static readonly XmlQueryType LongX = TF.Type(
XmlTypeCode
.Long, true);
226
public static readonly XmlQueryType DecimalX = TF.Type(
XmlTypeCode
.Decimal, true);
227
public static readonly XmlQueryType FloatX = TF.Type(
XmlTypeCode
.Float, true);
228
public static readonly XmlQueryType Double = TF.Type(
XmlTypeCode
.Double, false);
229
public static readonly XmlQueryType DoubleX = TF.Type(
XmlTypeCode
.Double, true);
230
public static readonly XmlQueryType DateTimeX = TF.Type(
XmlTypeCode
.DateTime, true);
231
public static readonly XmlQueryType QNameX = TF.Type(
XmlTypeCode
.QName, true);
302
private static readonly
XmlTypeCode
[] s_nodeKindToTypeCode = {
303
/* XPathNodeType.Root */
XmlTypeCode
.Document,
304
/* XPathNodeType.Element */
XmlTypeCode
.Element,
305
/* XPathNodeType.Attribute */
XmlTypeCode
.Attribute,
306
/* XPathNodeType.Namespace */
XmlTypeCode
.Namespace,
307
/* XPathNodeType.Text */
XmlTypeCode
.Text,
308
/* XPathNodeType.SignificantWhitespace */
XmlTypeCode
.Text,
309
/* XPathNodeType.Whitespace */
XmlTypeCode
.Text,
310
/* XPathNodeType.ProcessingInstruction */
XmlTypeCode
.ProcessingInstruction,
311
/* XPathNodeType.Comment */
XmlTypeCode
.Comment,
312
/* XPathNodeType.All */
XmlTypeCode
.Node,
335
private readonly
XmlTypeCode
_code;
350
XmlTypeCode
[] arrEnum = Enum.GetValues<
XmlTypeCode
>();
351
Debug.Assert(arrEnum[arrEnum.Length - 1] ==
XmlTypeCode
.DayTimeDuration,
355
int typeCount = (int)
XmlTypeCode
.DayTimeDuration + 1;
362
XmlTypeCode
typeCode = (
XmlTypeCode
)i;
364
switch ((
XmlTypeCode
)i)
366
case
XmlTypeCode
.None:
371
case
XmlTypeCode
.Item:
372
case
XmlTypeCode
.Node:
377
case
XmlTypeCode
.Document:
378
case
XmlTypeCode
.Element:
379
case
XmlTypeCode
.Namespace:
380
case
XmlTypeCode
.ProcessingInstruction:
381
case
XmlTypeCode
.Comment:
382
case
XmlTypeCode
.Text:
387
case
XmlTypeCode
.Attribute:
392
case
XmlTypeCode
.AnyAtomicType:
397
case
XmlTypeCode
.UntypedAtomic:
411
UntypedDocument = new ItemType(
XmlTypeCode
.Document, XmlQualifiedNameTest.Wildcard, XmlSchemaComplexType.UntypedAnyType, false, false, true);
412
UntypedElement = new ItemType(
XmlTypeCode
.Element, XmlQualifiedNameTest.Wildcard, XmlSchemaComplexType.UntypedAnyType, false, false, true);
413
UntypedAttribute = new ItemType(
XmlTypeCode
.Attribute, XmlQualifiedNameTest.Wildcard, DatatypeImplementation.UntypedAtomicType, false, false, true);
414
NodeNotRtf = new ItemType(
XmlTypeCode
.Node, XmlQualifiedNameTest.Wildcard, XmlSchemaComplexType.AnyType, false, false, true);
423
public static XmlQueryType Create(
XmlTypeCode
code, bool isStrict)
438
XmlTypeCode
code = schemaType.Datatype.TypeCode;
454
public static XmlQueryType Create(
XmlTypeCode
code, XmlQualifiedNameTest nameTest, XmlSchemaType contentType, bool isNillable)
459
case
XmlTypeCode
.Document:
460
case
XmlTypeCode
.Element:
471
if (code ==
XmlTypeCode
.Element)
473
if (code ==
XmlTypeCode
.Document)
480
case
XmlTypeCode
.Attribute:
502
private ItemType(
XmlTypeCode
code, XmlQualifiedNameTest nameTest, XmlSchemaType schemaType, bool isNillable, bool isStrict, bool isNotRtf)
517
XmlTypeCode
.Item => XmlNodeKindFlags.Any,
518
XmlTypeCode
.Node => XmlNodeKindFlags.Any,
519
XmlTypeCode
.Document => XmlNodeKindFlags.Document,
520
XmlTypeCode
.Element => XmlNodeKindFlags.Element,
521
XmlTypeCode
.Attribute => XmlNodeKindFlags.Attribute,
522
XmlTypeCode
.Namespace => XmlNodeKindFlags.Namespace,
523
XmlTypeCode
.ProcessingInstruction => XmlNodeKindFlags.PI,
524
XmlTypeCode
.Comment => XmlNodeKindFlags.Comment,
525
XmlTypeCode
.Text => XmlNodeKindFlags.Text,
567
return Create((
XmlTypeCode
)code, /*isStrict:*/reader.ReadBoolean());
579
public override
XmlTypeCode
TypeCode
692
private readonly
XmlTypeCode
_code;
752
if (_code ==
XmlTypeCode
.None)
764
if (_code ==
XmlTypeCode
.Element)
766
else if (_code ==
XmlTypeCode
.Attribute)
771
_code =
XmlTypeCode
.Node;
778
_code =
XmlTypeCode
.AnyAtomicType;
784
_code =
XmlTypeCode
.Item;
793
private static readonly
XmlTypeCode
[] s_nodeKindToTypeCode = {
794
/* None */
XmlTypeCode
.None,
795
/* Document */
XmlTypeCode
.Document,
796
/* Element */
XmlTypeCode
.Element,
797
/* Attribute */
XmlTypeCode
.Attribute,
798
/* Text */
XmlTypeCode
.Text,
799
/* Comment */
XmlTypeCode
.Comment,
800
/* PI */
XmlTypeCode
.ProcessingInstruction,
801
/* Namespace */
XmlTypeCode
.Namespace,
841
public override
XmlTypeCode
TypeCode
923
get { return TypeCode ==
XmlTypeCode
.None ? XmlQueryCardinality.None : XmlQueryCardinality.One; }
975
if (prime.TypeCode ==
XmlTypeCode
.None)
1045
public override
XmlTypeCode
TypeCode
System\Xml\Xsl\XPath\XPathBuilder.cs (56)
145
private QilNode CompareValues(XPathOperator op, QilNode left, QilNode right,
XmlTypeCode
compType)
147
Debug.Assert(compType ==
XmlTypeCode
.Boolean || compType ==
XmlTypeCode
.Double || compType ==
XmlTypeCode
.String);
148
Debug.Assert(compType ==
XmlTypeCode
.Boolean || left.XmlType!.IsSingleton && right.XmlType!.IsSingleton, "Both comparison operands must be singletons");
166
private QilNode CompareNodeSetAndValue(XPathOperator op, QilNode nodeset, QilNode val,
XmlTypeCode
compType)
170
Debug.Assert(compType ==
XmlTypeCode
.Boolean || compType ==
XmlTypeCode
.Double || compType ==
XmlTypeCode
.String, "I don't know what to do with RTF here");
171
if (compType ==
XmlTypeCode
.Boolean || nodeset.XmlType!.IsSingleton)
194
private QilNode CompareNodeSetAndNodeSet(XPathOperator op, QilNode left, QilNode right,
XmlTypeCode
compType)
224
return CompareNodeSetAndNodeSet(op, left, right,
XmlTypeCode
.String);
236
XmlTypeCode
compType = (
237
leftType.TypeCode ==
XmlTypeCode
.Boolean || rightType.TypeCode ==
XmlTypeCode
.Boolean ?
XmlTypeCode
.Boolean :
238
leftType.TypeCode ==
XmlTypeCode
.Double || rightType.TypeCode ==
XmlTypeCode
.Double ?
XmlTypeCode
.Double :
239
/*default:*/
XmlTypeCode
.String
257
return CompareNodeSetAndNodeSet(op, left, right,
XmlTypeCode
.Double);
261
XmlTypeCode
compType = rightType.TypeCode ==
XmlTypeCode
.Boolean ?
XmlTypeCode
.Boolean :
XmlTypeCode
.Double;
266
XmlTypeCode
compType = leftType.TypeCode ==
XmlTypeCode
.Boolean ?
XmlTypeCode
.Boolean :
XmlTypeCode
.Double;
272
return CompareValues(op, left, right,
XmlTypeCode
.Double);
477
if (predicate.XmlType!.TypeCode ==
XmlTypeCode
.Double)
778
public static readonly
XmlTypeCode
[] argAny = {
XmlTypeCode
.Item };
779
public static readonly
XmlTypeCode
[] argNodeSet = {
XmlTypeCode
.Node };
780
public static readonly
XmlTypeCode
[] argBoolean = {
XmlTypeCode
.Boolean };
781
public static readonly
XmlTypeCode
[] argDouble = {
XmlTypeCode
.Double };
782
public static readonly
XmlTypeCode
[] argString = {
XmlTypeCode
.String };
783
public static readonly
XmlTypeCode
[] argString2 = {
XmlTypeCode
.String,
XmlTypeCode
.String };
784
public static readonly
XmlTypeCode
[] argString3 = {
XmlTypeCode
.String,
XmlTypeCode
.String,
XmlTypeCode
.String };
785
public static readonly
XmlTypeCode
[] argFnSubstr = {
XmlTypeCode
.String,
XmlTypeCode
.Double,
XmlTypeCode
.Double };
982
public
XmlTypeCode
[]? argTypes;
986
public FunctionInfo(T id, int minArgs, int maxArgs,
XmlTypeCode
[]? argTypes)
1041
args[i] = f.ConvertToType(
XmlTypeCode
.String, args[i]);
1049
if (argTypes![i] ==
XmlTypeCode
.Node && XPathQilFactory.CannotBeNodeSet(args[i]))
System\Xml\Xsl\XPath\XPathQilFactory.cs (17)
41
Debug.Assert(result == (xt.TypeCode ==
XmlTypeCode
.Item || xt.TypeCode ==
XmlTypeCode
.AnyAtomicType), "What else can it be?");
173
public QilNode ConvertToType(
XmlTypeCode
requiredType, QilNode n)
177
case
XmlTypeCode
.String: return ConvertToString(n);
178
case
XmlTypeCode
.Double: return ConvertToNumber(n);
179
case
XmlTypeCode
.Boolean: return ConvertToBoolean(n);
180
case
XmlTypeCode
.Node: return EnsureNodeSet(n);
181
case
XmlTypeCode
.Item: return n;
191
case
XmlTypeCode
.Boolean:
197
case
XmlTypeCode
.Double:
202
case
XmlTypeCode
.String:
220
case
XmlTypeCode
.Boolean:
222
case
XmlTypeCode
.Double:
229
case
XmlTypeCode
.String:
250
case
XmlTypeCode
.Boolean:
256
case
XmlTypeCode
.Double:
258
case
XmlTypeCode
.String:
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (18)
246
case
XmlTypeCode
.Boolean: args[i] = _f.ConvertToBoolean(args[i]); break;
247
case
XmlTypeCode
.Double: args[i] = _f.ConvertToNumber(args[i]); break;
248
case
XmlTypeCode
.String: args[i] = _f.ConvertToString(args[i]); break;
249
case
XmlTypeCode
.Node: args[i] = xmlTypeFormalArg.IsSingleton ? _f.ConvertToNode(args[i]) : _f.ConvertToNodeSet(args[i]); break;
250
case
XmlTypeCode
.Item: break;
296
private static readonly
XmlTypeCode
[] s_argFnDocument = {
XmlTypeCode
.Item,
XmlTypeCode
.Node };
297
private static readonly
XmlTypeCode
[] s_argFnKey = {
XmlTypeCode
.String,
XmlTypeCode
.Item };
298
private static readonly
XmlTypeCode
[] s_argFnFormatNumber = {
XmlTypeCode
.Double,
XmlTypeCode
.String,
XmlTypeCode
.String };
743
case
XmlTypeCode
.Boolean: return _f.String("boolean");
744
case
XmlTypeCode
.Double: return _f.String("number");
745
case
XmlTypeCode
.String: return _f.String("string");
System\Xml\Xsl\Xslt\QilStrConcatenator.cs (1)
61
Debug.Assert(value.XmlType!.TypeCode ==
XmlTypeCode
.String);
System\Xml\Xsl\Xslt\XsltQilFactory.cs (6)
25
case
XmlTypeCode
.String:
26
case
XmlTypeCode
.Boolean:
27
case
XmlTypeCode
.Double:
30
case
XmlTypeCode
.Item:
31
case
XmlTypeCode
.None:
33
case
XmlTypeCode
.QName:
System.Xml (1)
System.Xml.cs (1)
103
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Schema.
XmlTypeCode
))]
System.Xml.ReaderWriter (1)
artifacts\obj\System.Xml.ReaderWriter\Debug\net10.0\System.Xml.ReaderWriter.Forwards.cs (1)
102
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Schema.
XmlTypeCode
))]