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