Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlBaseConverter.cs
Go to the documentation of this file.
3
4namespace System.Xml.Schema;
5
6internal abstract class XmlBaseConverter : XmlValueConverter
7{
8 private readonly XmlSchemaType _schemaType;
9
10 private readonly XmlTypeCode _typeCode;
11
12 private readonly Type _clrTypeDefault;
13
14 protected static readonly Type ICollectionType = typeof(ICollection);
15
16 protected static readonly Type IEnumerableType = typeof(IEnumerable);
17
18 protected static readonly Type IListType = typeof(IList);
19
20 protected static readonly Type ObjectArrayType = typeof(object[]);
21
22 protected static readonly Type StringArrayType = typeof(string[]);
23
24 protected static readonly Type XmlAtomicValueArrayType = typeof(XmlAtomicValue[]);
25
26 protected static readonly Type DecimalType = typeof(decimal);
27
28 protected static readonly Type Int32Type = typeof(int);
29
30 protected static readonly Type Int64Type = typeof(long);
31
32 protected static readonly Type StringType = typeof(string);
33
34 protected static readonly Type XmlAtomicValueType = typeof(XmlAtomicValue);
35
36 protected static readonly Type ObjectType = typeof(object);
37
38 protected static readonly Type ByteType = typeof(byte);
39
40 protected static readonly Type Int16Type = typeof(short);
41
42 protected static readonly Type SByteType = typeof(sbyte);
43
44 protected static readonly Type UInt16Type = typeof(ushort);
45
46 protected static readonly Type UInt32Type = typeof(uint);
47
48 protected static readonly Type UInt64Type = typeof(ulong);
49
50 protected static readonly Type XPathItemType = typeof(XPathItem);
51
52 protected static readonly Type DoubleType = typeof(double);
53
54 protected static readonly Type SingleType = typeof(float);
55
56 protected static readonly Type DateTimeType = typeof(DateTime);
57
58 protected static readonly Type DateTimeOffsetType = typeof(DateTimeOffset);
59
60 protected static readonly Type BooleanType = typeof(bool);
61
62 protected static readonly Type ByteArrayType = typeof(byte[]);
63
64 protected static readonly Type XmlQualifiedNameType = typeof(XmlQualifiedName);
65
66 protected static readonly Type UriType = typeof(Uri);
67
68 protected static readonly Type TimeSpanType = typeof(TimeSpan);
69
70 protected static readonly Type XPathNavigatorType = typeof(XPathNavigator);
71
73
75
76 protected string XmlTypeName
77 {
78 get
79 {
81 if (xmlSchemaType != null)
82 {
83 while (xmlSchemaType.QualifiedName.IsEmpty)
84 {
86 }
87 return QNameToString(xmlSchemaType.QualifiedName);
88 }
89 if (_typeCode == XmlTypeCode.Node)
90 {
91 return "node";
92 }
93 if (_typeCode == XmlTypeCode.AnyAtomicType)
94 {
95 return "xdt:anyAtomicType";
96 }
97 return "item";
98 }
99 }
100
102
103 protected XmlBaseConverter(XmlSchemaType schemaType)
104 {
105 XmlSchemaDatatype datatype = schemaType.Datatype;
106 while (schemaType != null && !(schemaType is XmlSchemaSimpleType))
107 {
108 schemaType = schemaType.BaseXmlSchemaType;
109 }
110 if (schemaType == null)
111 {
112 schemaType = XmlSchemaType.GetBuiltInSimpleType(datatype.TypeCode);
113 }
114 _schemaType = schemaType;
115 _typeCode = schemaType.TypeCode;
117 }
118
119 protected XmlBaseConverter(XmlTypeCode typeCode)
120 {
121 switch (typeCode)
122 {
123 case XmlTypeCode.Item:
125 break;
126 case XmlTypeCode.Node:
128 break;
129 case XmlTypeCode.AnyAtomicType:
131 break;
132 }
133 _typeCode = typeCode;
134 }
135
137 {
138 _schemaType = converterAtomic._schemaType;
139 _typeCode = converterAtomic._typeCode;
140 _clrTypeDefault = Array.CreateInstance(converterAtomic.DefaultClrType, 0).GetType();
141 }
142
149
150 public override bool ToBoolean(DateTime value)
151 {
152 return (bool)ChangeType(value, BooleanType, null);
153 }
154
155 public override bool ToBoolean(double value)
156 {
157 return (bool)ChangeType(value, BooleanType, null);
158 }
159
160 public override bool ToBoolean(int value)
161 {
162 return (bool)ChangeType(value, BooleanType, null);
163 }
164
165 public override bool ToBoolean(long value)
166 {
167 return (bool)ChangeType(value, BooleanType, null);
168 }
169
170 public override bool ToBoolean(string value)
171 {
172 return (bool)ChangeType((object)value, BooleanType, (IXmlNamespaceResolver)null);
173 }
174
175 public override bool ToBoolean(object value)
176 {
177 return (bool)ChangeType(value, BooleanType, null);
178 }
179
180 public override DateTime ToDateTime(bool value)
181 {
182 return (DateTime)ChangeType(value, DateTimeType, null);
183 }
184
186 {
187 return (DateTime)ChangeType(value, DateTimeType, null);
188 }
189
190 public override DateTime ToDateTime(double value)
191 {
192 return (DateTime)ChangeType(value, DateTimeType, null);
193 }
194
195 public override DateTime ToDateTime(int value)
196 {
197 return (DateTime)ChangeType(value, DateTimeType, null);
198 }
199
200 public override DateTime ToDateTime(long value)
201 {
202 return (DateTime)ChangeType(value, DateTimeType, null);
203 }
204
205 public override DateTime ToDateTime(string value)
206 {
208 }
209
210 public override DateTime ToDateTime(object value)
211 {
212 return (DateTime)ChangeType(value, DateTimeType, null);
213 }
214
219
220 public override DateTimeOffset ToDateTimeOffset(string value)
221 {
223 }
224
225 public override DateTimeOffset ToDateTimeOffset(object value)
226 {
228 }
229
230 public override decimal ToDecimal(string value)
231 {
232 return (decimal)ChangeType((object)value, DecimalType, (IXmlNamespaceResolver)null);
233 }
234
235 public override decimal ToDecimal(object value)
236 {
237 return (decimal)ChangeType(value, DecimalType, null);
238 }
239
240 public override double ToDouble(bool value)
241 {
242 return (double)ChangeType(value, DoubleType, null);
243 }
244
245 public override double ToDouble(DateTime value)
246 {
247 return (double)ChangeType(value, DoubleType, null);
248 }
249
250 public override double ToDouble(int value)
251 {
252 return (double)ChangeType(value, DoubleType, null);
253 }
254
255 public override double ToDouble(long value)
256 {
257 return (double)ChangeType(value, DoubleType, null);
258 }
259
260 public override double ToDouble(string value)
261 {
262 return (double)ChangeType((object)value, DoubleType, (IXmlNamespaceResolver)null);
263 }
264
265 public override double ToDouble(object value)
266 {
267 return (double)ChangeType(value, DoubleType, null);
268 }
269
270 public override int ToInt32(bool value)
271 {
272 return (int)ChangeType(value, Int32Type, null);
273 }
274
275 public override int ToInt32(DateTime value)
276 {
277 return (int)ChangeType(value, Int32Type, null);
278 }
279
280 public override int ToInt32(double value)
281 {
282 return (int)ChangeType(value, Int32Type, null);
283 }
284
285 public override int ToInt32(long value)
286 {
287 return (int)ChangeType(value, Int32Type, null);
288 }
289
290 public override int ToInt32(string value)
291 {
292 return (int)ChangeType((object)value, Int32Type, (IXmlNamespaceResolver)null);
293 }
294
295 public override int ToInt32(object value)
296 {
297 return (int)ChangeType(value, Int32Type, null);
298 }
299
300 public override long ToInt64(bool value)
301 {
302 return (long)ChangeType(value, Int64Type, null);
303 }
304
305 public override long ToInt64(DateTime value)
306 {
307 return (long)ChangeType(value, Int64Type, null);
308 }
309
310 public override long ToInt64(double value)
311 {
312 return (long)ChangeType(value, Int64Type, null);
313 }
314
315 public override long ToInt64(int value)
316 {
317 return (long)ChangeType(value, Int64Type, null);
318 }
319
320 public override long ToInt64(string value)
321 {
322 return (long)ChangeType((object)value, Int64Type, (IXmlNamespaceResolver)null);
323 }
324
325 public override long ToInt64(object value)
326 {
327 return (long)ChangeType(value, Int64Type, null);
328 }
329
330 public override float ToSingle(double value)
331 {
332 return (float)ChangeType(value, SingleType, null);
333 }
334
335 public override float ToSingle(string value)
336 {
337 return (float)ChangeType((object)value, SingleType, (IXmlNamespaceResolver)null);
338 }
339
340 public override float ToSingle(object value)
341 {
342 return (float)ChangeType(value, SingleType, null);
343 }
344
345 public override string ToString(bool value)
346 {
347 return (string)ChangeType(value, StringType, null);
348 }
349
350 public override string ToString(DateTime value)
351 {
352 return (string)ChangeType(value, StringType, null);
353 }
354
355 public override string ToString(DateTimeOffset value)
356 {
357 return (string)ChangeType(value, StringType, null);
358 }
359
360 public override string ToString(decimal value)
361 {
362 return (string)ChangeType(value, StringType, null);
363 }
364
365 public override string ToString(double value)
366 {
367 return (string)ChangeType(value, StringType, null);
368 }
369
370 public override string ToString(int value)
371 {
372 return (string)ChangeType(value, StringType, null);
373 }
374
375 public override string ToString(long value)
376 {
377 return (string)ChangeType(value, StringType, null);
378 }
379
380 public override string ToString(float value)
381 {
382 return (string)ChangeType(value, StringType, null);
383 }
384
385 public override string ToString(object value, IXmlNamespaceResolver nsResolver)
386 {
387 return (string)ChangeType(value, StringType, nsResolver);
388 }
389
390 public override string ToString(object value)
391 {
392 return ToString(value, null);
393 }
394
395 public override object ChangeType(bool value, Type destinationType)
396 {
397 return ChangeType(value, destinationType, null);
398 }
399
401 {
402 return ChangeType(value, destinationType, null);
403 }
404
405 public override object ChangeType(decimal value, Type destinationType)
406 {
407 return ChangeType(value, destinationType, null);
408 }
409
410 public override object ChangeType(double value, Type destinationType)
411 {
412 return ChangeType(value, destinationType, null);
413 }
414
415 public override object ChangeType(int value, Type destinationType)
416 {
417 return ChangeType(value, destinationType, null);
418 }
419
420 public override object ChangeType(long value, Type destinationType)
421 {
422 return ChangeType(value, destinationType, null);
423 }
424
426 {
427 return ChangeType((object)value, destinationType, nsResolver);
428 }
429
430 public override object ChangeType(object value, Type destinationType)
431 {
432 return ChangeType(value, destinationType, null);
433 }
434
436 {
437 while (derivedType != null)
438 {
439 if (derivedType == baseType)
440 {
441 return true;
442 }
443 derivedType = derivedType.BaseType;
444 }
445 return false;
446 }
447
456
457 protected static string QNameToString(XmlQualifiedName name)
458 {
459 if (name.Namespace.Length == 0)
460 {
461 return name.Name;
462 }
463 if (name.Namespace == "http://www.w3.org/2001/XMLSchema")
464 {
465 return "xs:" + name.Name;
466 }
467 if (name.Namespace == "http://www.w3.org/2003/11/xpath-datatypes")
468 {
469 return "xdt:" + name.Name;
470 }
471 return "{" + name.Namespace + "}" + name.Name;
472 }
473
478
479 protected static byte[] StringToBase64Binary(string value)
480 {
482 }
483
484 protected static DateTime StringToDate(string value)
485 {
486 return new XsdDateTime(value, XsdDateTimeFlags.Date);
487 }
488
489 protected static DateTime StringToDateTime(string value)
490 {
491 return new XsdDateTime(value, XsdDateTimeFlags.DateTime);
492 }
493
494 protected static TimeSpan StringToDayTimeDuration(string value)
495 {
496 return new XsdDuration(value, XsdDuration.DurationType.DayTimeDuration).ToTimeSpan(XsdDuration.DurationType.DayTimeDuration);
497 }
498
499 protected static TimeSpan StringToDuration(string value)
500 {
502 }
503
504 protected static DateTime StringToGDay(string value)
505 {
506 return new XsdDateTime(value, XsdDateTimeFlags.GDay);
507 }
508
509 protected static DateTime StringToGMonth(string value)
510 {
511 return new XsdDateTime(value, XsdDateTimeFlags.GMonth);
512 }
513
514 protected static DateTime StringToGMonthDay(string value)
515 {
516 return new XsdDateTime(value, XsdDateTimeFlags.GMonthDay);
517 }
518
519 protected static DateTime StringToGYear(string value)
520 {
521 return new XsdDateTime(value, XsdDateTimeFlags.GYear);
522 }
523
524 protected static DateTime StringToGYearMonth(string value)
525 {
526 return new XsdDateTime(value, XsdDateTimeFlags.GYearMonth);
527 }
528
529 protected static DateTimeOffset StringToDateOffset(string value)
530 {
531 return new XsdDateTime(value, XsdDateTimeFlags.Date);
532 }
533
535 {
536 return new XsdDateTime(value, XsdDateTimeFlags.DateTime);
537 }
538
539 protected static DateTimeOffset StringToGDayOffset(string value)
540 {
541 return new XsdDateTime(value, XsdDateTimeFlags.GDay);
542 }
543
545 {
546 return new XsdDateTime(value, XsdDateTimeFlags.GMonth);
547 }
548
550 {
551 return new XsdDateTime(value, XsdDateTimeFlags.GMonthDay);
552 }
553
554 protected static DateTimeOffset StringToGYearOffset(string value)
555 {
556 return new XsdDateTime(value, XsdDateTimeFlags.GYear);
557 }
558
560 {
561 return new XsdDateTime(value, XsdDateTimeFlags.GYearMonth);
562 }
563
564 protected static byte[] StringToHexBinary(string value)
565 {
566 try
567 {
569 }
570 catch (XmlException ex)
571 {
572 throw new FormatException(ex.Message);
573 }
574 }
575
577 {
578 value = value.Trim();
579 string prefix;
580 string localName;
581 try
582 {
584 }
585 catch (XmlException ex)
586 {
587 throw new FormatException(ex.Message);
588 }
589 if (nsResolver == null)
590 {
592 }
593 string text = nsResolver.LookupNamespace(prefix);
594 if (text == null)
595 {
597 }
598 return new XmlQualifiedName(localName, text);
599 }
600
601 protected static DateTime StringToTime(string value)
602 {
603 return new XsdDateTime(value, XsdDateTimeFlags.Time);
604 }
605
606 protected static DateTimeOffset StringToTimeOffset(string value)
607 {
608 return new XsdDateTime(value, XsdDateTimeFlags.Time);
609 }
610
611 protected static TimeSpan StringToYearMonthDuration(string value)
612 {
613 return new XsdDuration(value, XsdDuration.DurationType.YearMonthDuration).ToTimeSpan(XsdDuration.DurationType.YearMonthDuration);
614 }
615
616 protected static string AnyUriToString(Uri value)
617 {
618 return value.OriginalString;
619 }
620
621 protected static string Base64BinaryToString(byte[] value)
622 {
624 }
625
626 protected static string DateToString(DateTime value)
627 {
628 return new XsdDateTime(value, XsdDateTimeFlags.Date).ToString();
629 }
630
631 protected static string DateTimeToString(DateTime value)
632 {
633 return new XsdDateTime(value, XsdDateTimeFlags.DateTime).ToString();
634 }
635
636 protected static string DayTimeDurationToString(TimeSpan value)
637 {
638 return new XsdDuration(value, XsdDuration.DurationType.DayTimeDuration).ToString(XsdDuration.DurationType.DayTimeDuration);
639 }
640
641 protected static string DurationToString(TimeSpan value)
642 {
644 }
645
646 protected static string GDayToString(DateTime value)
647 {
648 return new XsdDateTime(value, XsdDateTimeFlags.GDay).ToString();
649 }
650
651 protected static string GMonthToString(DateTime value)
652 {
653 return new XsdDateTime(value, XsdDateTimeFlags.GMonth).ToString();
654 }
655
656 protected static string GMonthDayToString(DateTime value)
657 {
658 return new XsdDateTime(value, XsdDateTimeFlags.GMonthDay).ToString();
659 }
660
661 protected static string GYearToString(DateTime value)
662 {
663 return new XsdDateTime(value, XsdDateTimeFlags.GYear).ToString();
664 }
665
666 protected static string GYearMonthToString(DateTime value)
667 {
668 return new XsdDateTime(value, XsdDateTimeFlags.GYearMonth).ToString();
669 }
670
671 protected static string DateOffsetToString(DateTimeOffset value)
672 {
673 return new XsdDateTime(value, XsdDateTimeFlags.Date).ToString();
674 }
675
677 {
678 return new XsdDateTime(value, XsdDateTimeFlags.DateTime).ToString();
679 }
680
681 protected static string GDayOffsetToString(DateTimeOffset value)
682 {
683 return new XsdDateTime(value, XsdDateTimeFlags.GDay).ToString();
684 }
685
687 {
688 return new XsdDateTime(value, XsdDateTimeFlags.GMonth).ToString();
689 }
690
692 {
693 return new XsdDateTime(value, XsdDateTimeFlags.GMonthDay).ToString();
694 }
695
696 protected static string GYearOffsetToString(DateTimeOffset value)
697 {
698 return new XsdDateTime(value, XsdDateTimeFlags.GYear).ToString();
699 }
700
702 {
703 return new XsdDateTime(value, XsdDateTimeFlags.GYearMonth).ToString();
704 }
705
707 {
708 if (nsResolver == null)
709 {
710 return "{" + qname.Namespace + "}" + qname.Name;
711 }
712 string text = nsResolver.LookupPrefix(qname.Namespace);
713 if (text == null)
714 {
716 }
717 if (text.Length == 0)
718 {
719 return qname.Name;
720 }
721 return text + ":" + qname.Name;
722 }
723
724 protected static string TimeToString(DateTime value)
725 {
726 return new XsdDateTime(value, XsdDateTimeFlags.Time).ToString();
727 }
728
729 protected static string TimeOffsetToString(DateTimeOffset value)
730 {
731 return new XsdDateTime(value, XsdDateTimeFlags.Time).ToString();
732 }
733
734 protected static string YearMonthDurationToString(TimeSpan value)
735 {
736 return new XsdDuration(value, XsdDuration.DurationType.YearMonthDuration).ToString(XsdDuration.DurationType.YearMonthDuration);
737 }
738
740 {
741 return value.LocalDateTime;
742 }
743
744 internal static int DecimalToInt32(decimal value)
745 {
747 {
749 object[] args = new string[2]
750 {
752 "Int32"
753 };
755 }
756 return (int)value;
757 }
758
759 protected static long DecimalToInt64(decimal value)
760 {
761 if (value < -9223372036854775808m || value > 9223372036854775807m)
762 {
764 object[] args = new string[2]
765 {
767 "Int64"
768 };
770 }
771 return (long)value;
772 }
773
774 protected static ulong DecimalToUInt64(decimal value)
775 {
776 if (value < 0m || value > 18446744073709551615m)
777 {
779 object[] args = new string[2]
780 {
782 "UInt64"
783 };
785 }
786 return (ulong)value;
787 }
788
789 protected static byte Int32ToByte(int value)
790 {
791 if (value < 0 || value > 255)
792 {
794 object[] args = new string[2]
795 {
797 "Byte"
798 };
800 }
801 return (byte)value;
802 }
803
804 protected static short Int32ToInt16(int value)
805 {
807 {
809 object[] args = new string[2]
810 {
812 "Int16"
813 };
815 }
816 return (short)value;
817 }
818
819 protected static sbyte Int32ToSByte(int value)
820 {
822 {
824 object[] args = new string[2]
825 {
827 "SByte"
828 };
830 }
831 return (sbyte)value;
832 }
833
834 protected static ushort Int32ToUInt16(int value)
835 {
836 if (value < 0 || value > 65535)
837 {
839 object[] args = new string[2]
840 {
842 "UInt16"
843 };
845 }
846 return (ushort)value;
847 }
848
849 protected static int Int64ToInt32(long value)
850 {
851 if (value < int.MinValue || value > int.MaxValue)
852 {
854 object[] args = new string[2]
855 {
857 "Int32"
858 };
860 }
861 return (int)value;
862 }
863
864 protected static uint Int64ToUInt32(long value)
865 {
866 if (value < 0 || value > uint.MaxValue)
867 {
869 object[] args = new string[2]
870 {
872 "UInt32"
873 };
875 }
876 return (uint)value;
877 }
878
879 protected static DateTime UntypedAtomicToDateTime(string value)
880 {
881 return new XsdDateTime(value, XsdDateTimeFlags.AllXsd);
882 }
883
885 {
886 return new XsdDateTime(value, XsdDateTimeFlags.AllXsd);
887 }
888}
static unsafe Array CreateInstance(Type elementType, int length)
Definition Array.cs:473
static string ToBase64String(byte[] inArray)
Definition Convert.cs:2675
static unsafe byte[] FromBase64String(string s)
Definition Convert.cs:2904
static string XmlConvert_TypeBadMapping
Definition SR.cs:374
static string XmlConvert_Overflow
Definition SR.cs:372
static string XmlConvert_TypeBadMapping2
Definition SR.cs:376
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XmlConvert_TypeNoNamespace
Definition SR.cs:388
static string XmlConvert_TypeNoPrefix
Definition SR.cs:386
Definition SR.cs:7
override double ToDouble(DateTime value)
override string ToString(float value)
override DateTime ToDateTime(long value)
override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver nsResolver)
override int ToInt32(string value)
static ushort Int32ToUInt16(int value)
override string ToString(DateTimeOffset value)
override string ToString(object value, IXmlNamespaceResolver nsResolver)
override float ToSingle(double value)
static string QNameToString(XmlQualifiedName qname, IXmlNamespaceResolver nsResolver)
static DateTimeOffset StringToGYearMonthOffset(string value)
static short Int32ToInt16(int value)
static DateTime StringToDate(string value)
override float ToSingle(string value)
static DateTime StringToGDay(string value)
static DateTime StringToTime(string value)
XmlBaseConverter(XmlBaseConverter converterAtomic, Type clrTypeDefault)
static string GDayOffsetToString(DateTimeOffset value)
override float ToSingle(object value)
static string DayTimeDurationToString(TimeSpan value)
static readonly Type XmlAtomicValueType
static readonly Type DateTimeOffsetType
static string DurationToString(TimeSpan value)
static string GYearMonthOffsetToString(DateTimeOffset value)
override string ToString(double value)
static sbyte Int32ToSByte(int value)
static TimeSpan StringToYearMonthDuration(string value)
override decimal ToDecimal(object value)
override DateTimeOffset ToDateTimeOffset(DateTime value)
override bool ToBoolean(string value)
override DateTime ToDateTime(double value)
override object ChangeType(DateTime value, Type destinationType)
static uint Int64ToUInt32(long value)
override object ChangeType(long value, Type destinationType)
static DateTimeOffset UntypedAtomicToDateTimeOffset(string value)
static string QNameToString(XmlQualifiedName name)
override int ToInt32(object value)
virtual object ChangeListType(object value, Type destinationType, IXmlNamespaceResolver nsResolver)
static string DateToString(DateTime value)
override double ToDouble(string value)
static readonly Type XPathNavigatorType
override double ToDouble(long value)
override string ToString(int value)
static readonly Type XmlQualifiedNameType
static readonly Type XmlAtomicValueArrayType
override string ToString(long value)
override string ToString(bool value)
static string DateTimeToString(DateTime value)
static DateTimeOffset StringToGYearOffset(string value)
static DateTime StringToGMonth(string value)
static XmlQualifiedName StringToQName(string value, IXmlNamespaceResolver nsResolver)
override DateTime ToDateTime(bool value)
static string TimeOffsetToString(DateTimeOffset value)
override bool ToBoolean(int value)
override decimal ToDecimal(string value)
static string DateOffsetToString(DateTimeOffset value)
static DateTimeOffset StringToGMonthOffset(string value)
override DateTime ToDateTime(string value)
static DateTime UntypedAtomicToDateTime(string value)
static DateTime StringToGYear(string value)
override DateTimeOffset ToDateTimeOffset(string value)
override double ToDouble(int value)
override int ToInt32(DateTime value)
override bool ToBoolean(double value)
override long ToInt64(DateTime value)
override object ChangeType(double value, Type destinationType)
static DateTimeOffset StringToTimeOffset(string value)
static string GYearOffsetToString(DateTimeOffset value)
override double ToDouble(bool value)
static string DateTimeOffsetToString(DateTimeOffset value)
static DateTime StringToGMonthDay(string value)
static DateTimeOffset StringToGMonthDayOffset(string value)
static string Base64BinaryToString(byte[] value)
override bool ToBoolean(object value)
static DateTimeOffset StringToDateTimeOffset(string value)
override object ChangeType(bool value, Type destinationType)
static string YearMonthDurationToString(TimeSpan value)
override string ToString(object value)
override DateTime ToDateTime(object value)
override long ToInt64(double value)
static int DecimalToInt32(decimal value)
override int ToInt32(double value)
static string GYearMonthToString(DateTime value)
static DateTimeOffset StringToDateOffset(string value)
override double ToDouble(object value)
static string GMonthToString(DateTime value)
static string AnyUriToString(Uri value)
static DateTime StringToDateTime(string value)
static string GMonthDayOffsetToString(DateTimeOffset value)
override long ToInt64(object value)
static ulong DecimalToUInt64(decimal value)
static byte[] StringToBase64Binary(string value)
static string GMonthOffsetToString(DateTimeOffset value)
static string GYearToString(DateTime value)
static TimeSpan StringToDayTimeDuration(string value)
override long ToInt64(bool value)
override bool ToBoolean(DateTime value)
override long ToInt64(string value)
override DateTime ToDateTime(DateTimeOffset value)
static string TimeToString(DateTime value)
override bool ToBoolean(long value)
override object ChangeType(object value, Type destinationType)
XmlBaseConverter(XmlSchemaType schemaType)
static byte[] StringToHexBinary(string value)
override object ChangeType(int value, Type destinationType)
override DateTimeOffset ToDateTimeOffset(object value)
static DateTime StringToGYearMonth(string value)
static string GDayToString(DateTime value)
Exception CreateInvalidClrMappingException(Type sourceType, Type destinationType)
static string GMonthDayToString(DateTime value)
static long DecimalToInt64(decimal value)
override DateTime ToDateTime(int value)
static DateTimeOffset StringToGDayOffset(string value)
readonly XmlSchemaType _schemaType
XmlBaseConverter(XmlBaseConverter converterAtomic)
static DateTime DateTimeOffsetToDateTime(DateTimeOffset value)
override string ToString(decimal value)
static bool IsDerivedFrom(Type derivedType, Type baseType)
override object ChangeType(decimal value, Type destinationType)
override string ToString(DateTime value)
static TimeSpan StringToDuration(string value)
static ? XmlSchemaSimpleType GetBuiltInSimpleType(XmlQualifiedName qualifiedName)
static int ParseQNameThrow(string s)
static string ToString(bool value)
static string TrimString(string value)
static byte[] FromBinHexString(string s)
TypeCode
Definition TypeCode.cs:4