示例#1
0
 /// <summary>
 /// Writes a <see cref="DateTime"/> value.
 /// </summary>
 /// <param name="value">The <see cref="DateTime"/> value to write.</param>
 public void WriteValue(System.DateTime value)
 {
     WriteValueInternal(JavaScriptConvert.ToString(value), JsonToken.Date);
 }
示例#2
0
 /// <summary>
 /// Writes a <see cref="Decimal"/> value.
 /// </summary>
 /// <param name="value">The <see cref="Decimal"/> value to write.</param>
 public void WriteValue(decimal value)
 {
     WriteValueInternal(JavaScriptConvert.ToString(value), JsonToken.Float);
 }
示例#3
0
 /// <summary>
 /// Writes a <see cref="Boolean"/> value.
 /// </summary>
 /// <param name="value">The <see cref="Boolean"/> value to write.</param>
 public void WriteValue(bool value)
 {
     WriteValueInternal(JavaScriptConvert.ToString(value), JsonToken.Boolean);
 }
示例#4
0
 /// <summary>
 /// Writes a <see cref="SByte"/> value.
 /// </summary>
 /// <param name="value">The <see cref="SByte"/> value to write.</param>
 public void WriteValue(sbyte value)
 {
     WriteValueInternal(JavaScriptConvert.ToString(value), JsonToken.Integer);
 }
示例#5
0
 /// <summary>
 /// Writes a <see cref="String"/> value.
 /// </summary>
 /// <param name="value">The <see cref="String"/> value to write.</param>
 public void WriteValue(string value)
 {
     WriteValueInternal(JavaScriptConvert.ToString(value, _quoteChar), JsonToken.String);
 }