397 references to XmlTypeCode
dotnet-svcutil-lib (397)
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\XmlBinaryReader.cs (26)
4207
private XmlValueConverter GetValueConverter(
XmlTypeCode
typeCode)
4222
value = GetValueConverter(
XmlTypeCode
.UntypedAtomic).ChangeType(
4228
value = GetValueConverter(
XmlTypeCode
.Boolean).ChangeType(
4234
value = GetValueConverter(
XmlTypeCode
.NonNegativeInteger).ChangeType(
4240
value = GetValueConverter(
XmlTypeCode
.UnsignedByte).ChangeType(
4248
value = GetValueConverter(
XmlTypeCode
.Short).ChangeType(
4255
value = GetValueConverter(
XmlTypeCode
.Int).ChangeType(
4262
value = GetValueConverter(
XmlTypeCode
.Long).ChangeType(
4268
value = GetValueConverter(
XmlTypeCode
.Byte).ChangeType(
4276
value = GetValueConverter(
XmlTypeCode
.UnsignedShort).ChangeType(
4283
value = GetValueConverter(
XmlTypeCode
.UnsignedInt).ChangeType(
4290
value = GetValueConverter(
XmlTypeCode
.UnsignedLong).ChangeType(
4297
value = GetValueConverter(
XmlTypeCode
.Float).ChangeType(
4304
value = GetValueConverter(
XmlTypeCode
.Double).ChangeType(
4309
value = GetValueConverter(
XmlTypeCode
.String).ChangeType(
4314
value = GetValueConverter(
XmlTypeCode
.Decimal).ChangeType(
4320
value = GetValueConverter(
XmlTypeCode
.Decimal).ChangeType(
4328
value = GetValueConverter(
XmlTypeCode
.Decimal).ChangeType(
4340
value = GetValueConverter(
XmlTypeCode
.UntypedAtomic).ChangeType(
4355
value = GetValueConverter(token == BinXmlToken.XSD_BINHEX ?
XmlTypeCode
.HexBinary :
XmlTypeCode
.Base64Binary).ChangeType(
4366
value = GetValueConverter(
XmlTypeCode
.DateTime).ChangeType(
4374
value = GetValueConverter(
XmlTypeCode
.DateTime).ChangeType(
4380
value = GetValueConverter(
XmlTypeCode
.Time).ChangeType(
4386
value = GetValueConverter(
XmlTypeCode
.Date).ChangeType(
4397
value = GetValueConverter(
XmlTypeCode
.QName).ChangeType(
FrameworkFork\Microsoft.Xml\Xml\schema\ConstraintStruct.cs (14)
269
case
XmlTypeCode
.Byte:
270
case
XmlTypeCode
.UnsignedByte:
271
case
XmlTypeCode
.Short:
272
case
XmlTypeCode
.UnsignedShort:
273
case
XmlTypeCode
.Int:
274
case
XmlTypeCode
.UnsignedInt:
275
case
XmlTypeCode
.Long:
276
case
XmlTypeCode
.UnsignedLong:
277
case
XmlTypeCode
.Decimal:
278
case
XmlTypeCode
.Integer:
279
case
XmlTypeCode
.PositiveInteger:
280
case
XmlTypeCode
.NonNegativeInteger:
281
case
XmlTypeCode
.NegativeInteger:
282
case
XmlTypeCode
.NonPositiveInteger:
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (121)
110
private static XmlSchemaSimpleType[] s_enumToTypeCode = new XmlSchemaSimpleType[(int)
XmlTypeCode
.DayTimeDuration + 1];
213
case
XmlTypeCode
.NmToken:
214
listContent.ItemType = listContent.BaseItemType = s_enumToTypeCode[(int)
XmlTypeCode
.NmToken];
217
case
XmlTypeCode
.Entity:
218
listContent.ItemType = listContent.BaseItemType = s_enumToTypeCode[(int)
XmlTypeCode
.Entity];
221
case
XmlTypeCode
.Idref:
222
listContent.ItemType = listContent.BaseItemType = s_enumToTypeCode[(int)
XmlTypeCode
.Idref];
291
s_enumToTypeCode[(int)
XmlTypeCode
.AnyAtomicType] = s_anyAtomicType;
299
s_enumToTypeCode[(int)
XmlTypeCode
.UntypedAtomic] = s_untypedAtomicType;
305
FinishBuiltinType(s_yearMonthDurationType, s_enumToTypeCode[(int)
XmlTypeCode
.Duration]);
307
s_enumToTypeCode[(int)
XmlTypeCode
.YearMonthDuration] = s_yearMonthDurationType;
313
FinishBuiltinType(s_dayTimeDurationType, s_enumToTypeCode[(int)
XmlTypeCode
.Duration]);
315
s_enumToTypeCode[(int)
XmlTypeCode
.DayTimeDuration] = s_dayTimeDurationType;
318
internal static XmlSchemaSimpleType GetSimpleTypeFromTypeCode(
XmlTypeCode
typeCode)
332
XmlSchemaSimpleType correctType = GetSimpleTypeFromTypeCode(
XmlTypeCode
.NormalizedString);
346
XmlSchemaSimpleType correctType = GetSimpleTypeFromTypeCode(
XmlTypeCode
.Token);
361
internal static
XmlTypeCode
GetPrimitiveTypeCode(
XmlTypeCode
typeCode)
456
XmlTypeCode
thisCode = this.TypeCode;
457
XmlTypeCode
otherCode = dtype.TypeCode;
496
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.None; } }
1030
public override
XmlTypeCode
TypeCode
1220
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.AnyAtomicType; } }
1386
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.AnyAtomicType; } }
1417
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.AnyAtomicType; } }
1428
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UntypedAtomic; } }
1466
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.String; } }
1535
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Boolean; } }
1615
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Float; } }
1704
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Double; } }
1796
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Decimal; } }
1888
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Duration; } }
1980
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.YearMonthDuration; } }
2018
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.DayTimeDuration; } }
2034
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.DateTime; } }
2194
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Time; } }
2227
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Date; } }
2260
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GYearMonth; } }
2294
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GYear; } }
2327
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GMonthDay; } }
2360
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GDay; } }
2394
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GMonth; } }
2436
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.HexBinary; } }
2537
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Base64Binary; } }
2637
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.AnyUri; } }
2733
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.QName; } }
2813
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NormalizedString; } }
2828
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NormalizedString; } }
2851
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Token; } }
2857
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Token; } }
2883
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Language; } }
2906
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NmToken; } }
2931
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Name; } }
2954
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NCName; } }
2989
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Id; } }
3005
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Idref; } }
3021
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Entity; } }
3069
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Notation; } }
3170
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Integer; } }
3214
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NonPositiveInteger; } }
3243
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NegativeInteger; } }
3279
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Long; } }
3335
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Int; } }
3392
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Short; } }
3448
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Byte; } }
3501
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NonNegativeInteger; } }
3536
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UnsignedLong; } }
3592
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UnsignedInt; } }
3648
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UnsignedShort; } }
3703
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UnsignedByte; } }
3756
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.PositiveInteger; } }
FrameworkFork\Microsoft.Xml\Xml\schema\FacetChecker.cs (16)
32
private
XmlTypeCode
_builtInEnum;
48
_nonNegativeInt = DatatypeImplementation.GetSimpleTypeFromTypeCode(
XmlTypeCode
.NonNegativeInteger).Datatype;
306
XmlSchemaDatatype positiveInt = DatatypeImplementation.GetSimpleTypeFromTypeCode(
XmlTypeCode
.PositiveInteger).Datatype;
332
if ((_derivedRestriction.FractionDigits != 0) && (_datatype.TypeCode !=
XmlTypeCode
.Decimal))
1431
if (datatype.TypeCode ==
XmlTypeCode
.AnyUri)
1454
private Exception CheckBuiltInFacets(string s,
XmlTypeCode
typeCode, bool verifyUri)
1460
case
XmlTypeCode
.AnyUri:
1468
case
XmlTypeCode
.NormalizedString:
1472
case
XmlTypeCode
.Token:
1476
case
XmlTypeCode
.Language:
1487
case
XmlTypeCode
.NmToken:
1491
case
XmlTypeCode
.Name:
1495
case
XmlTypeCode
.NCName:
1496
case
XmlTypeCode
.Id:
1497
case
XmlTypeCode
.Idref:
1498
case
XmlTypeCode
.Entity:
FrameworkFork\Microsoft.Xml\Xml\schema\GenerateConverter.cs (21)
465
IList<ConversionRule> rules = group.Find(
XmlTypeCode
.None, tSrc, tDst);
490
GenerateConversionsTo(group.Find(
XmlTypeCode
.None, tSrc, tDst));
530
GenerateConversionsFrom(group.Find(
XmlTypeCode
.None, tSrc, tDst));
590
GenerateConversionsTo(group.Find(
XmlTypeCode
.None, tSrc, tDst));
601
GenerateConversionsFrom(group.Find(
XmlTypeCode
.None, typeof(object), tDst));
605
GenerateConversionsTo(group.Find(
XmlTypeCode
.None, tSrc, typeof(object)));
634
GenerateConversionsTo(group.Find(
XmlTypeCode
.None, tSrc, typeof(object)));
650
GenerateConversionsFrom(group.Find(
XmlTypeCode
.None, typeof(object), tDst));
728
if (rule.XmlType ==
XmlTypeCode
.Item)
887
XmlTypeCode
xmlType = XmlTypeNameToTypeCode(rule[0]);
905
foreach (ConversionRule rule in Find(
XmlTypeCode
.None, null, tDst))
918
foreach (ConversionRule rule in Find(
XmlTypeCode
.None, tSrc, null))
927
public IList<ConversionRule> Find(
XmlTypeCode
code, Type tSrc, Type tDst)
933
if (code ==
XmlTypeCode
.None || code == rule.XmlType)
971
private static
XmlTypeCode
XmlTypeNameToTypeCode(string name)
976
return
XmlTypeCode
.Item;
982
return (
XmlTypeCode
)Enum.Parse(typeof(
XmlTypeCode
), name, true);
1008
private
XmlTypeCode
_xmlType;
1012
public ConversionRule(
XmlTypeCode
xmlType, Type clrTypeSrc, Type clrTypeDst, string convExpr)
1020
public
XmlTypeCode
XmlType
FrameworkFork\Microsoft.Xml\Xml\schema\Preprocessor.cs (1)
566
XmlSchemaDatatype tokenDt = DatatypeImplementation.GetSimpleTypeFromTypeCode(
XmlTypeCode
.Token).Datatype;
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaCollectionCompiler.cs (2)
2724
if (type.TypeCode ==
XmlTypeCode
.NormalizedString)
2728
else if (type.TypeCode ==
XmlTypeCode
.Token)
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaInfo.cs (1)
247
if (attdef.Datatype.TypeCode ==
XmlTypeCode
.Id)
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaSetCompiler.cs (2)
2601
if (decl.Datatype.TypeCode ==
XmlTypeCode
.Id)
2819
if (decl.Datatype.TypeCode ==
XmlTypeCode
.Id)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlAtomicValue.cs (4)
134
if (nsResolver != null && (_xmlType.TypeCode ==
XmlTypeCode
.QName || _xmlType.TypeCode ==
XmlTypeCode
.Notation))
156
if (nsResolver != null && (_xmlType.TypeCode ==
XmlTypeCode
.QName || _xmlType.TypeCode ==
XmlTypeCode
.Notation))
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaComplexType.cs (1)
393
if (datatype != null && datatype.TypeCode ==
XmlTypeCode
.Id)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaDatatype.cs (50)
92
public virtual
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.None; } }
141
XmlTypeCode
typeCode = this.TypeCode;
145
if (typeCode ==
XmlTypeCode
.AnyAtomicType)
160
if (typeCode ==
XmlTypeCode
.AnyAtomicType)
174
internal string TypeCodeToString(
XmlTypeCode
typeCode)
178
case
XmlTypeCode
.None:
180
case
XmlTypeCode
.Item:
182
case
XmlTypeCode
.AnyAtomicType:
184
case
XmlTypeCode
.String:
186
case
XmlTypeCode
.Boolean:
188
case
XmlTypeCode
.Decimal:
190
case
XmlTypeCode
.Float:
192
case
XmlTypeCode
.Double:
194
case
XmlTypeCode
.Duration:
196
case
XmlTypeCode
.DateTime:
198
case
XmlTypeCode
.Time:
200
case
XmlTypeCode
.Date:
202
case
XmlTypeCode
.GYearMonth:
204
case
XmlTypeCode
.GYear:
206
case
XmlTypeCode
.GMonthDay:
208
case
XmlTypeCode
.GDay:
210
case
XmlTypeCode
.GMonth:
212
case
XmlTypeCode
.HexBinary:
214
case
XmlTypeCode
.Base64Binary:
216
case
XmlTypeCode
.AnyUri:
218
case
XmlTypeCode
.QName:
220
case
XmlTypeCode
.Notation:
222
case
XmlTypeCode
.NormalizedString:
224
case
XmlTypeCode
.Token:
226
case
XmlTypeCode
.Language:
228
case
XmlTypeCode
.NmToken:
230
case
XmlTypeCode
.Name:
232
case
XmlTypeCode
.NCName:
234
case
XmlTypeCode
.Id:
236
case
XmlTypeCode
.Idref:
238
case
XmlTypeCode
.Entity:
240
case
XmlTypeCode
.Integer:
242
case
XmlTypeCode
.NonPositiveInteger:
244
case
XmlTypeCode
.NegativeInteger:
246
case
XmlTypeCode
.Long:
248
case
XmlTypeCode
.Int:
250
case
XmlTypeCode
.Short:
252
case
XmlTypeCode
.Byte:
254
case
XmlTypeCode
.NonNegativeInteger:
256
case
XmlTypeCode
.UnsignedLong:
258
case
XmlTypeCode
.UnsignedInt:
260
case
XmlTypeCode
.UnsignedShort:
262
case
XmlTypeCode
.UnsignedByte:
264
case
XmlTypeCode
.PositiveInteger:
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaType.cs (6)
52
public static XmlSchemaSimpleType GetBuiltInSimpleType(
XmlTypeCode
typeCode)
61
public static XmlSchemaComplexType GetBuiltInComplexType(
XmlTypeCode
typeCode)
63
if (typeCode ==
XmlTypeCode
.Item)
196
public
XmlTypeCode
TypeCode
202
return
XmlTypeCode
.Item;
206
return
XmlTypeCode
.None;
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (4)
2494
tempXsiTypeSO.SetAttributeType(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.QName));
2502
tempxsiNilSO.SetAttributeType(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Boolean));
2507
XmlSchemaSimpleType stringType = XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String);
2516
XmlSchemaSimpleType stringType = XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (118)
280
private
XmlTypeCode
_typeCode;
304
protected XmlBaseConverter(
XmlTypeCode
typeCode)
308
case
XmlTypeCode
.Item:
312
case
XmlTypeCode
.Node:
316
case
XmlTypeCode
.AnyAtomicType:
500
protected
XmlTypeCode
TypeCode
526
if (_typeCode ==
XmlTypeCode
.Node) return "node";
527
if (_typeCode ==
XmlTypeCode
.AnyAtomicType) return "xdt:anyAtomicType";
529
Debug.Assert(_typeCode ==
XmlTypeCode
.Item, "If SchemaType is null, then TypeCode may only be Item, Node, or AnyAtomicType");
1015
if (TypeCode ==
XmlTypeCode
.Decimal) return XmlConvert.ToDecimal((string)value);
1061
if (TypeCode ==
XmlTypeCode
.Decimal) return DecimalToInt32(XmlConvert.ToDecimal((string)value));
1100
if (TypeCode ==
XmlTypeCode
.Decimal) return DecimalToInt64(XmlConvert.ToDecimal((string)value));
1132
if (TypeCode ==
XmlTypeCode
.Decimal) return XmlConvert.ToString((decimal)value);
1356
if (TypeCode ==
XmlTypeCode
.Float) return ((double)XmlConvert.ToSingle((string)value));
1404
if (TypeCode ==
XmlTypeCode
.Float) return XmlConvert.ToSingle((string)value);
1428
if (TypeCode ==
XmlTypeCode
.Float) return XmlConvert.ToString(ToSingle((double)value));
1433
if (TypeCode ==
XmlTypeCode
.Float) return XmlConvert.ToString((float)value);
1575
case
XmlTypeCode
.Date: return StringToDate((string)value);
1576
case
XmlTypeCode
.Time: return StringToTime((string)value);
1577
case
XmlTypeCode
.GDay: return StringToGDay((string)value);
1578
case
XmlTypeCode
.GMonth: return StringToGMonth((string)value);
1579
case
XmlTypeCode
.GMonthDay: return StringToGMonthDay((string)value);
1580
case
XmlTypeCode
.GYear: return StringToGYear((string)value);
1581
case
XmlTypeCode
.GYearMonth: return StringToGYearMonth((string)value);
1619
case
XmlTypeCode
.Date: return StringToDateOffset((string)value);
1620
case
XmlTypeCode
.Time: return StringToTimeOffset((string)value);
1621
case
XmlTypeCode
.GDay: return StringToGDayOffset((string)value);
1622
case
XmlTypeCode
.GMonth: return StringToGMonthOffset((string)value);
1623
case
XmlTypeCode
.GMonthDay: return StringToGMonthDayOffset((string)value);
1624
case
XmlTypeCode
.GYear: return StringToGYearOffset((string)value);
1625
case
XmlTypeCode
.GYearMonth: return StringToGYearMonthOffset((string)value);
1687
case
XmlTypeCode
.Date: return DateToString((DateTime)value);
1688
case
XmlTypeCode
.Time: return TimeToString((DateTime)value);
1689
case
XmlTypeCode
.GDay: return GDayToString((DateTime)value);
1690
case
XmlTypeCode
.GMonth: return GMonthToString((DateTime)value);
1691
case
XmlTypeCode
.GMonthDay: return GMonthDayToString((DateTime)value);
1692
case
XmlTypeCode
.GYear: return GYearToString((DateTime)value);
1693
case
XmlTypeCode
.GYearMonth: return GYearMonthToString((DateTime)value);
1702
case
XmlTypeCode
.Date: return DateOffsetToString((DateTimeOffset)value);
1703
case
XmlTypeCode
.Time: return TimeOffsetToString((DateTimeOffset)value);
1704
case
XmlTypeCode
.GDay: return GDayOffsetToString((DateTimeOffset)value);
1705
case
XmlTypeCode
.GMonth: return GMonthOffsetToString((DateTimeOffset)value);
1706
case
XmlTypeCode
.GMonthDay: return GMonthDayOffsetToString((DateTimeOffset)value);
1707
case
XmlTypeCode
.GYear: return GYearOffsetToString((DateTimeOffset)value);
1708
case
XmlTypeCode
.GYearMonth: return GYearMonthOffsetToString((DateTimeOffset)value);
2064
case
XmlTypeCode
.Base64Binary: return Base64BinaryToString((byte[])value);
2065
case
XmlTypeCode
.HexBinary: return XmlConvert.ToBinHexString((byte[])value);
2069
if (IsDerivedFrom(sourceType, UriType)) if (TypeCode ==
XmlTypeCode
.AnyUri) return AnyUriToString((Uri)value);
2074
case
XmlTypeCode
.DayTimeDuration: return DayTimeDurationToString((TimeSpan)value);
2075
case
XmlTypeCode
.Duration: return DurationToString((TimeSpan)value);
2076
case
XmlTypeCode
.YearMonthDuration: return YearMonthDurationToString((TimeSpan)value);
2083
case
XmlTypeCode
.Notation: return QNameToString((XmlQualifiedName)value, nsResolver);
2084
case
XmlTypeCode
.QName: return QNameToString((XmlQualifiedName)value, nsResolver);
2106
case
XmlTypeCode
.Base64Binary: return StringToBase64Binary((string)value);
2107
case
XmlTypeCode
.HexBinary: return StringToHexBinary((string)value);
2114
case
XmlTypeCode
.Notation: return StringToQName((string)value, nsResolver);
2115
case
XmlTypeCode
.QName: return StringToQName((string)value, nsResolver);
2123
case
XmlTypeCode
.DayTimeDuration: return StringToDayTimeDuration((string)value);
2124
case
XmlTypeCode
.Duration: return StringToDuration((string)value);
2125
case
XmlTypeCode
.YearMonthDuration: return StringToYearMonthDuration((string)value);
2128
if (destinationType == UriType) if (TypeCode ==
XmlTypeCode
.AnyUri) return XmlConvert.ToUri((string)value);
2148
case
XmlTypeCode
.Base64Binary: return ((byte[])value);
2149
case
XmlTypeCode
.HexBinary: return ((byte[])value);
2156
case
XmlTypeCode
.Base64Binary: return StringToBase64Binary((string)value);
2157
case
XmlTypeCode
.HexBinary: return StringToHexBinary((string)value);
2167
case
XmlTypeCode
.Notation: return StringToQName((string)value, nsResolver);
2168
case
XmlTypeCode
.QName: return StringToQName((string)value, nsResolver);
2175
case
XmlTypeCode
.Notation: return ((XmlQualifiedName)value);
2176
case
XmlTypeCode
.QName: return ((XmlQualifiedName)value);
2187
case
XmlTypeCode
.DayTimeDuration: return StringToDayTimeDuration((string)value);
2188
case
XmlTypeCode
.Duration: return StringToDuration((string)value);
2189
case
XmlTypeCode
.YearMonthDuration: return StringToYearMonthDuration((string)value);
2196
case
XmlTypeCode
.DayTimeDuration: return ((TimeSpan)value);
2197
case
XmlTypeCode
.Duration: return ((TimeSpan)value);
2198
case
XmlTypeCode
.YearMonthDuration: return ((TimeSpan)value);
2204
if (sourceType == StringType) if (TypeCode ==
XmlTypeCode
.AnyUri) return XmlConvert.ToUri((string)value);
2205
if (IsDerivedFrom(sourceType, UriType)) if (TypeCode ==
XmlTypeCode
.AnyUri) return ((Uri)value);
2213
case
XmlTypeCode
.Base64Binary: return (new XmlAtomicValue(SchemaType, value));
2214
case
XmlTypeCode
.HexBinary: return (new XmlAtomicValue(SchemaType, value));
2222
case
XmlTypeCode
.DayTimeDuration: return (new XmlAtomicValue(SchemaType, value));
2223
case
XmlTypeCode
.Duration: return (new XmlAtomicValue(SchemaType, value));
2224
case
XmlTypeCode
.YearMonthDuration: return (new XmlAtomicValue(SchemaType, value));
2227
if (IsDerivedFrom(sourceType, UriType)) if (TypeCode ==
XmlTypeCode
.AnyUri) return (new XmlAtomicValue(SchemaType, value));
2233
case
XmlTypeCode
.Notation: return (new XmlAtomicValue(SchemaType, value, nsResolver));
2234
case
XmlTypeCode
.QName: return (new XmlAtomicValue(SchemaType, value, nsResolver));
2951
protected XmlNodeConverter() : base(
XmlTypeCode
.Node)
3043
protected XmlAnyConverter(
XmlTypeCode
typeCode) : base(typeCode)
3047
public static readonly XmlValueConverter Item = new XmlAnyConverter(
XmlTypeCode
.Item);
3048
public static readonly XmlValueConverter AnyAtomic = new XmlAnyConverter(
XmlTypeCode
.AnyAtomicType);
3195
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Boolean), (bool)value));
3205
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.DateTime), (DateTime)value));
3215
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.DateTime), (DateTimeOffset)value));
3225
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Decimal), value));
3235
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Double), (double)value));
3245
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Int), (int)value));
3255
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Long), (long)value));
3265
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Float), value));
3276
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), (string)value));
3324
if (sourceType == BooleanType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Boolean), (bool)value));
3325
if (sourceType == ByteType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.UnsignedByte), value));
3326
if (sourceType == ByteArrayType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Base64Binary), value));
3327
if (sourceType == DateTimeType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.DateTime), (DateTime)value));
3328
if (sourceType == DateTimeOffsetType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.DateTime), (DateTimeOffset)value));
3329
if (sourceType == DecimalType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Decimal), value));
3330
if (sourceType == DoubleType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Double), (double)value));
3331
if (sourceType == Int16Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Short), value));
3332
if (sourceType == Int32Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Int), (int)value));
3333
if (sourceType == Int64Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Long), (long)value));
3334
if (sourceType == SByteType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Byte), value));
3335
if (sourceType == SingleType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Float), value));
3336
if (sourceType == StringType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), (string)value));
3337
if (sourceType == TimeSpanType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Duration), value));
3338
if (sourceType == UInt16Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.UnsignedShort), value));
3339
if (sourceType == UInt32Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.UnsignedInt), value));
3340
if (sourceType == UInt64Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.UnsignedLong), value));
3341
if (IsDerivedFrom(sourceType, UriType)) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.AnyUri), value));
3342
if (IsDerivedFrom(sourceType, XmlQualifiedNameType)) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.QName), value, nsResolver));
3385
if (TypeCode !=
XmlTypeCode
.Item)
FrameworkFork\Microsoft.Xml\Xml\schema\XsdDateTime.cs (10)
250
public
XmlTypeCode
TypeCode
705
private static readonly
XmlTypeCode
[] s_typeCodes = {
706
XmlTypeCode
.DateTime,
707
XmlTypeCode
.Time,
708
XmlTypeCode
.Date,
709
XmlTypeCode
.GYearMonth,
710
XmlTypeCode
.GYear,
711
XmlTypeCode
.GMonthDay,
712
XmlTypeCode
.GDay,
713
XmlTypeCode
.GMonth