Replace "stream" in reader/writer classes' comments
XML documentation comments for JsonReader, JsonWriter and derived classes often mention "underlying streams". In most cases however, these types don't operate directly on Streams, but through other types such as TextReader and TextWriter. This commit changes these comments to reflect more accurately what kind of objects the various JSON reader / writer classes operate on. Additionally the effect of JsonReader.CloseInput and JsonWriter.Close- Output is made more explicit in the comments for the Close methods.
This commit is contained in:
@@ -141,12 +141,10 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the underlying stream or
|
||||
/// <see cref="TextReader"/> should be closed when the reader is closed.
|
||||
/// Gets or sets a value indicating whether the source should be closed when this reader is closed.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> to close the underlying stream or <see cref="TextReader"/> when
|
||||
/// the reader is closed; otherwise <c>false</c>. The default is <c>true</c>.
|
||||
/// <c>true</c> to close the source when this reader is closed; otherwise <c>false</c>. The default is <c>true</c>.
|
||||
/// </value>
|
||||
public bool CloseInput { get; set; }
|
||||
|
||||
@@ -406,13 +404,13 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the next JSON token from the stream.
|
||||
/// Reads the next JSON token from the source.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the next token was read successfully; <c>false</c> if there are no more tokens to read.</returns>
|
||||
public abstract bool Read();
|
||||
|
||||
/// <summary>
|
||||
/// Reads the next JSON token from the stream as a <see cref="Nullable{T}"/> of <see cref="Int32"/>.
|
||||
/// Reads the next JSON token from the source as a <see cref="Nullable{T}"/> of <see cref="Int32"/>.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="Nullable{T}"/> of <see cref="Int32"/>. This method will return <c>null</c> at the end of an array.</returns>
|
||||
public virtual int? ReadAsInt32()
|
||||
@@ -463,7 +461,7 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the next JSON token from the stream as a <see cref="String"/>.
|
||||
/// Reads the next JSON token from the source as a <see cref="String"/>.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="String"/>. This method will return <c>null</c> at the end of an array.</returns>
|
||||
public virtual string ReadAsString()
|
||||
@@ -507,7 +505,7 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the next JSON token from the stream as a <see cref="Byte"/>[].
|
||||
/// Reads the next JSON token from the source as a <see cref="Byte"/>[].
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="Byte"/>[] or <c>null</c> if the next JSON token is null. This method will return <c>null</c> at the end of an array.</returns>
|
||||
public virtual byte[] ReadAsBytes()
|
||||
@@ -606,7 +604,7 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the next JSON token from the stream as a <see cref="Nullable{T}"/> of <see cref="Double"/>.
|
||||
/// Reads the next JSON token from the source as a <see cref="Nullable{T}"/> of <see cref="Double"/>.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="Nullable{T}"/> of <see cref="Double"/>. This method will return <c>null</c> at the end of an array.</returns>
|
||||
public virtual double? ReadAsDouble()
|
||||
@@ -668,7 +666,7 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the next JSON token from the stream as a <see cref="Nullable{T}"/> of <see cref="Boolean"/>.
|
||||
/// Reads the next JSON token from the source as a <see cref="Nullable{T}"/> of <see cref="Boolean"/>.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="Nullable{T}"/> of <see cref="Boolean"/>. This method will return <c>null</c> at the end of an array.</returns>
|
||||
public virtual bool? ReadAsBoolean()
|
||||
@@ -729,7 +727,7 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the next JSON token from the stream as a <see cref="Nullable{T}"/> of <see cref="Decimal"/>.
|
||||
/// Reads the next JSON token from the source as a <see cref="Nullable{T}"/> of <see cref="Decimal"/>.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="Nullable{T}"/> of <see cref="Decimal"/>. This method will return <c>null</c> at the end of an array.</returns>
|
||||
public virtual decimal? ReadAsDecimal()
|
||||
@@ -779,7 +777,7 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the next JSON token from the stream as a <see cref="Nullable{T}"/> of <see cref="DateTime"/>.
|
||||
/// Reads the next JSON token from the source as a <see cref="Nullable{T}"/> of <see cref="DateTime"/>.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="Nullable{T}"/> of <see cref="DateTime"/>. This method will return <c>null</c> at the end of an array.</returns>
|
||||
public virtual DateTime? ReadAsDateTime()
|
||||
@@ -835,7 +833,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
#if !NET20
|
||||
/// <summary>
|
||||
/// Reads the next JSON token from the stream as a <see cref="Nullable{T}"/> of <see cref="DateTimeOffset"/>.
|
||||
/// Reads the next JSON token from the source as a <see cref="Nullable{T}"/> of <see cref="DateTimeOffset"/>.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="Nullable{T}"/> of <see cref="DateTimeOffset"/>. This method will return <c>null</c> at the end of an array.</returns>
|
||||
public virtual DateTimeOffset? ReadAsDateTimeOffset()
|
||||
@@ -1124,6 +1122,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Changes the reader's state to <see cref="JsonReader.State.Closed"/>.
|
||||
/// If <see cref="JsonReader.CloseInput"/> is set to <c>true</c>, the source is also closed.
|
||||
/// </summary>
|
||||
public virtual void Close()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user