125 references to XmlConverter
System.Private.DataContractSerialization (125)
System\Runtime\Serialization\EnumDataContract.cs (2)
405return (long)XmlConverter.ToUInt64(value); 409return XmlConverter.ToInt64(value);
System\Runtime\Serialization\Json\JsonObjectDataContract.cs (2)
98double doubleValue = XmlConverter.ToDouble(value); 109return XmlConverter.ToDouble(value);
System\Runtime\Serialization\Json\XmlJsonWriter.cs (1)
947if (!((_dataType == JsonDataType.Array || _dataType == JsonDataType.Object || _nodeType == JsonNodeType.EndElement) && XmlConverter.IsWhitespace(text)))
System\Runtime\Serialization\XmlReaderDelegator.cs (4)
630return XmlConverter.ToUInt64(str); 640return XmlConverter.ToUInt64(str); 668return XmlConverter.ToTimeSpan(str); 674return XmlConverter.ToTimeSpan(str);
System\Xml\StringHandle.cs (2)
153byte[] buffer = XmlConverter.ToBytes(s_constStrings[_key]); 161byte[] buffer = XmlConverter.ToBytes(_bufferReader.GetEscapedString(_offset, _length));
System\Xml\ValueHandle.cs (36)
133return ch <= char.MaxValue && XmlConverter.IsWhitespace((char)ch); 212return XmlConverter.ToBoolean(_bufferReader.Buffer, _offset, _length); 221return XmlConverter.ToBoolean(GetString()); 254return XmlConverter.ToInt32(_bufferReader.Buffer, _offset, _length); 255return XmlConverter.ToInt32(GetString()); 283return XmlConverter.ToInt64(_bufferReader.Buffer, _offset, _length); 285return XmlConverter.ToInt64(GetString()); 304return XmlConverter.ToUInt64(_bufferReader.Buffer, _offset, _length); 305return XmlConverter.ToUInt64(GetString()); 331return XmlConverter.ToSingle(_bufferReader.Buffer, _offset, _length); 332return XmlConverter.ToSingle(GetString()); 353return XmlConverter.ToDouble(_bufferReader.Buffer, _offset, _length); 354return XmlConverter.ToDouble(GetString()); 371return XmlConverter.ToDecimal(_bufferReader.Buffer, _offset, _length); 372return XmlConverter.ToDecimal(GetString()); 379return XmlConverter.ToDateTime(GetInt64()); 383return XmlConverter.ToDateTime(_bufferReader.Buffer, _offset, _length); 385return XmlConverter.ToDateTime(GetString()); 393return XmlConverter.ToUniqueId(_bufferReader.Buffer, _offset, _length); 394return XmlConverter.ToUniqueId(GetString()); 402return XmlConverter.ToTimeSpan(_bufferReader.Buffer, _offset, _length); 403return XmlConverter.ToTimeSpan(GetString()); 411return XmlConverter.ToGuid(_bufferReader.Buffer, _offset, _length); 412return XmlConverter.ToGuid(GetString()); 459return DataContractSerializer.Base64Encoding.GetBytes(XmlConverter.StripWhitespace(GetString())); 486return XmlConverter.ToString(ToInt()); 488return XmlConverter.ToString(GetInt64()); 490return XmlConverter.ToString(GetUInt64()); 492return XmlConverter.ToString(GetSingle()); 494return XmlConverter.ToString(GetDouble()); 496return XmlConverter.ToString(GetDecimal()); 498return XmlConverter.ToString(ToDateTime()); 514return XmlConverter.ToString(ToList()); 516return XmlConverter.ToString(ToUniqueId()); 518return XmlConverter.ToString(ToGuid()); 520return XmlConverter.ToString(ToTimeSpan());
System\Xml\XmlBaseReader.cs (13)
841if (!XmlConverter.IsWhitespace(_value)) 1508int newCount = XmlConverter.StripWhitespace(chars.AsSpan(0, charCount)); 1553return XmlConverter.ToBoolean(ReadContentAsString()); 1565return XmlConverter.ToInt64(ReadContentAsString()); 1577return XmlConverter.ToInt32(ReadContentAsString()); 1589return XmlConverter.ToDateTime(ReadContentAsString()); 1601return XmlConverter.ToDouble(ReadContentAsString()); 1613return XmlConverter.ToSingle(ReadContentAsString()); 1625return XmlConverter.ToDecimal(ReadContentAsString()); 1637return XmlConverter.ToUniqueId(ReadContentAsString()); 1649return XmlConverter.ToTimeSpan(ReadContentAsString()); 1661return XmlConverter.ToGuid(ReadContentAsString()); 1688return XmlConverter.ToUInt64(ReadContentAsString());
System\Xml\XmlBaseWriter.cs (14)
753if (!XmlConverter.IsWhitespace(ch)) 759if (!XmlConverter.IsWhitespace(s)) 765if (!XmlConverter.IsWhitespace(chars.AsSpan(offset, count))) 1250WriteAttributeText(XmlConverter.ToString(value)); 1267WriteAttributeText(XmlConverter.ToString(value)); 1284WriteAttributeText(XmlConverter.ToString(value)); 1301WriteAttributeText(XmlConverter.ToString(value)); 1318WriteAttributeText(XmlConverter.ToString(value)); 1335WriteAttributeText(XmlConverter.ToString(value)); 1352WriteAttributeText(XmlConverter.ToString(value)); 1374WriteAttributeText(XmlConverter.ToString(value)); 1393WriteAttributeText(XmlConverter.ToString(value)); 1410WriteAttributeText(XmlConverter.ToString(value)); 1427WriteAttributeText(XmlConverter.ToString(value));
System\Xml\XmlBufferReader.cs (8)
519return i + XmlConverter.ToChars(buffer, offset + i, length - i, chars, i); 532return i + XmlConverter.ToChars(buffer, offset + i, length - i, chars, charOffset + i); 547return XmlConverter.ToStringUnicode(_buffer, offset, length); 779return XmlConverter.IsWhitespace(s); 784return XmlConverter.IsWhitespace(_buffer.AsSpan(offset, length)); 792if (!XmlConverter.IsWhitespace(ch)) 878return XmlConverter.ToString(buffer, offset1, length1) == s2; 911return XmlConverter.ToString(buffer, offset1, length1) == s2;
System\Xml\XmlDictionaryReader.cs (15)
595guids[i] = XmlConverter.ToGuid(values[i]); 603uniqueIds[i] = XmlConverter.ToUniqueId(values[i]); 651return XmlConverter.ToDecimal(ReadContentAsString()); 656return XmlConverter.ToSingle(ReadContentAsString()); 661return XmlConverter.ToUniqueId(ReadContentAsString()); 666return XmlConverter.ToGuid(ReadContentAsString()); 671return XmlConverter.ToTimeSpan(ReadContentAsString()); 677XmlConverter.ToQualifiedName(ReadContentAsString(), out prefix, out localName); 712value = XmlConverter.ToBoolean(string.Empty); 732value = XmlConverter.ToInt32(string.Empty); 752value = XmlConverter.ToInt64(string.Empty); 772value = XmlConverter.ToSingle(string.Empty); 792value = XmlConverter.ToDouble(string.Empty); 812value = XmlConverter.ToDecimal(string.Empty); 929value = XmlConverter.ToTimeSpan(string.Empty);
System\Xml\XmlSigningNodeWriter.cs (12)
29_chars = new byte[XmlConverter.MaxPrimitiveChars]; 219int count = XmlConverter.ToChars(value, _chars, 0); 229int count = XmlConverter.ToChars(value, _chars, 0); 239int count = XmlConverter.ToChars(value, _chars, 0); 249int count = XmlConverter.ToChars(value, _chars, 0); 259int count = XmlConverter.ToChars(value, _chars, 0); 269int count = XmlConverter.ToChars(value, _chars, 0); 279int count = XmlConverter.ToChars(value, _chars, 0); 289int count = XmlConverter.ToChars(value, _chars, 0); 299string s = XmlConverter.ToString(value); 309string s = XmlConverter.ToString(value); 319string s = XmlConverter.ToString(value);
System\Xml\XmlUTF8TextWriter.cs (16)
564byte[] buffer = GetBuffer(XmlConverter.MaxBoolChars, out int offset); 565Advance(XmlConverter.ToChars(value, buffer, offset)); 570byte[] buffer = GetBuffer(XmlConverter.MaxDecimalChars, out int offset); 571Advance(XmlConverter.ToChars(value, buffer, offset)); 576byte[] buffer = GetBuffer(XmlConverter.MaxDoubleChars, out int offset); 577Advance(XmlConverter.ToChars(value, buffer, offset)); 582byte[] buffer = GetBuffer(XmlConverter.MaxFloatChars, out int offset); 583Advance(XmlConverter.ToChars(value, buffer, offset)); 588byte[] buffer = GetBuffer(XmlConverter.MaxDateTimeChars, out int offset); 589Advance(XmlConverter.ToChars(value, buffer, offset)); 609byte[] buffer = GetBuffer(XmlConverter.MaxInt32Chars, out int offset); 610Advance(XmlConverter.ToChars(value, buffer, offset)); 615byte[] buffer = GetBuffer(XmlConverter.MaxInt64Chars, out int offset); 616Advance(XmlConverter.ToChars(value, buffer, offset)); 621byte[] buffer = GetBuffer(XmlConverter.MaxUInt64Chars, out int offset); 622Advance(XmlConverter.ToChars(value, buffer, offset));