System\Xml\Schema\XmlValueConverter.cs (118)
451public override string ToString(bool value) {return (string) ChangeType((object) value, StringType, null); }
452public override string ToString(DateTime value) {return (string) ChangeType((object) value, StringType, null); }
453public override string ToString(DateTimeOffset value) {return (string) ChangeType((object) value, StringType, null); }
454public override string ToString(decimal value) {return (string) ChangeType((object) value, StringType, null); }
455public override string ToString(double value) {return (string) ChangeType((object) value, StringType, null); }
456public override string ToString(int value) {return (string) ChangeType((object) value, StringType, null); }
457public override string ToString(long value) {return (string) ChangeType((object) value, StringType, null); }
458public override string ToString(float value) {return (string) ChangeType((object) value, StringType, null); }
459public override string ToString(string value, IXmlNamespaceResolver nsResolver) {return (string) ChangeType((object) value, StringType, nsResolver); }
460public override string ToString(object value, IXmlNamespaceResolver nsResolver) {return (string) ChangeType((object) value, StringType, nsResolver); }
932if (sourceType == StringType) return this.ToDecimal((string) value);
973if (sourceType == StringType) return this.ToInt32((string) value);
1007if (sourceType == StringType) return this.ToInt64((string) value);
1048if (sourceType == StringType) return ((string) value);
1051return (string) ChangeTypeWildcardDestination(value, StringType, nsResolver);
1066if (destinationType == StringType) return this.ToString((decimal) value);
1080if (destinationType == StringType) return XmlConvert.ToString((int) value);
1094if (destinationType == StringType) return XmlConvert.ToString((long) value);
1109if (destinationType == StringType) return ((string) value);
1126if (destinationType == StringType) return this.ToString(value, nsResolver);
1131if (sourceType == StringType) return (new XmlAtomicValue(SchemaType, (string) value));
1138if (sourceType == StringType) return (new XmlAtomicValue(SchemaType, (string) value));
1241if (sourceType == StringType) return this.ToDouble((string) value);
1285if (sourceType == StringType) return this.ToSingle((string) value);
1316if (sourceType == StringType) return ((string) value);
1319return (string) ChangeListType(value, StringType, nsResolver);
1333if (destinationType == StringType) return this.ToString((double) value);
1346if (destinationType == StringType) return this.ToString((float) value);
1360if (destinationType == StringType) return ((string) value);
1376if (destinationType == StringType) return this.ToString(value, nsResolver);
1380if (sourceType == StringType) return (new XmlAtomicValue(SchemaType, (string) value));
1386if (sourceType == StringType) return (new XmlAtomicValue(SchemaType, (string) value));
1445if (sourceType == StringType) return this.ToDateTime((string) value);
1485if (sourceType == StringType) return this.ToDateTimeOffset((string) value);
1568if (sourceType == StringType) return ((string)value);
1571return (string) ChangeListType(value, StringType, nsResolver);
1585if (destinationType == StringType) return this.ToString((DateTime) value);
1598if (destinationType == StringType) return this.ToString((DateTimeOffset) value);
1612if (destinationType == StringType) return ((string) value);
1628if (destinationType == StringType) return this.ToString(value, nsResolver);
1632if (sourceType == StringType) return (new XmlAtomicValue(SchemaType, (string)value));
1638if (sourceType == StringType) return (new XmlAtomicValue(SchemaType, (string)value));
1675if (sourceType == StringType) return XmlConvert.ToBoolean((string) value);
1742if (sourceType == StringType) return ((string) value);
1745return (string) ChangeListType(value, StringType, nsResolver);
1758if (destinationType == StringType) return XmlConvert.ToString((bool) value);
1771if (destinationType == StringType) return ((string) value);
1786if (destinationType == StringType) return this.ToString(value, nsResolver);
1789if (sourceType == StringType) return (new XmlAtomicValue(SchemaType, (string) value));
1794if (sourceType == StringType) return (new XmlAtomicValue(SchemaType, (string) value));
1882if (sourceType == StringType) return (string) value;
1898return (string) ChangeTypeWildcardDestination(value, StringType, nsResolver);
1923if (destinationType == StringType) return (string) value;
1951if (sourceType == StringType) {
1959if (sourceType == StringType) {
1972if (destinationType == StringType) return this.ToString(value, nsResolver);
1974if (sourceType == StringType) {
1990if (sourceType == StringType) if (TypeCode == XmlTypeCode.AnyUri) return XmlConvert.ToUri((string) value);
2000if (sourceType == StringType) return (new XmlAtomicValue(SchemaType, (string)value, nsResolver));
2119if (sourceType == StringType) return ((string) value);
2122return (string) ChangeListType(value, StringType, nsResolver);
2135if (destinationType == StringType) return ((string) value);
2149if (destinationType == StringType) return this.ToString(value, nsResolver);
2151if (sourceType == StringType) return (new XmlAtomicValue(SchemaType, (string) value));
2155if (sourceType == StringType) return (new XmlAtomicValue(SchemaType, (string) value));
2171: base(atomicConverter, allowListToList ? StringArrayType : StringType) {
2194if (sourceType == StringType) return XmlConvert.ToBoolean((string) value);
2214if (sourceType == StringType) return UntypedAtomicToDateTime((string) value);
2234if (sourceType == StringType) return UntypedAtomicToDateTimeOffset((string) value);
2253if (sourceType == StringType) return XmlConvert.ToDecimal((string) value);
2273if (sourceType == StringType) return XmlConvert.ToDouble((string) value);
2293if (sourceType == StringType) return XmlConvert.ToInt32((string) value);
2313if (sourceType == StringType) return XmlConvert.ToInt64((string) value);
2333if (sourceType == StringType) return XmlConvert.ToSingle((string) value);
2389if (sourceType == StringType) return ((string) value);
2395if (sourceType == XmlAtomicValueType) return ((string) ((XmlAtomicValue) value).ValueAs(StringType, nsResolver));
2398return (string) ChangeTypeWildcardDestination(value, StringType, nsResolver);
2410if (destinationType == StringType) return XmlConvert.ToString((bool) value);
2419if (destinationType == StringType) return DateTimeToString((DateTime) value);
2428if (destinationType == StringType) return DateTimeOffsetToString((DateTimeOffset) value);
2437if (destinationType == StringType) return XmlConvert.ToString((decimal) value);
2446if (destinationType == StringType) return XmlConvert.ToString((double) value);
2455if (destinationType == StringType) return XmlConvert.ToString((int) value);
2464if (destinationType == StringType) return XmlConvert.ToString((long) value);
2473if (destinationType == StringType) return XmlConvert.ToString((float) value);
2503if (destinationType == StringType) return ((string) value);
2516if (sourceType == StringType) return XmlConvert.ToBoolean((string) value);
2519if (sourceType == StringType) return Int32ToByte(XmlConvert.ToInt32((string) value));
2522if (sourceType == StringType) return StringToBase64Binary((string) value);
2525if (sourceType == StringType) return UntypedAtomicToDateTime((string) value);
2528if (sourceType == StringType) return UntypedAtomicToDateTimeOffset((string) value);
2531if (sourceType == StringType) return XmlConvert.ToDecimal((string) value);
2534if (sourceType == StringType) return XmlConvert.ToDouble((string) value);
2537if (sourceType == StringType) return Int32ToInt16(XmlConvert.ToInt32((string) value));
2540if (sourceType == StringType) return XmlConvert.ToInt32((string) value);
2543if (sourceType == StringType) return XmlConvert.ToInt64((string) value);
2546if (sourceType == StringType) return Int32ToSByte(XmlConvert.ToInt32((string) value));
2549if (sourceType == StringType) return XmlConvert.ToSingle((string) value);
2552if (sourceType == StringType) return StringToDuration((string) value);
2555if (sourceType == StringType) return Int32ToUInt16(XmlConvert.ToInt32((string) value));
2558if (sourceType == StringType) return Int64ToUInt32(XmlConvert.ToInt64((string) value));
2561if (sourceType == StringType) return DecimalToUInt64(XmlConvert.ToDecimal((string) value));
2564if (sourceType == StringType) return XmlConvert.ToUri((string) value);
2567if (sourceType == StringType) return (new XmlAtomicValue(SchemaType, (string) value));
2571if (sourceType == StringType) return StringToQName((string) value, nsResolver);
2574if (sourceType == StringType) return (new XmlAtomicValue(SchemaType, (string) value));
2577if (destinationType == StringType) return this.ToString(value, nsResolver);
2615if ((this.atomicConverter == null) || (!this.allowListToList && sourceType != StringType && destinationType != StringType)) {
3005if (sourceType == StringType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String), (string) value));
3073if (!(value is IEnumerable) || value.GetType() == StringType || value.GetType() == ByteArrayType) {
3139if (destinationType == StringType) {
3141if (sourceType == StringType)
3150if (sourceType == StringType)
3177if (itemTypeDst == StringType) return ToArray<string>(value, nsResolver);
3207if (type == IListType || type == ICollectionType || type == IEnumerableType || type == StringType)
3356if (sourceType == StringType) {
3357if (destinationType == StringType) return value;