Прочетете на английски Редактиране

Споделяне чрез


Utf8JsonWriter.Reset Method

Definition

Overloads

Reset(Stream)

Resets the internal state of this instance so that it can be reused with a new instance of Stream.

Reset(IBufferWriter<Byte>)

Resets the internal state of this instance so that it can be reused with a new instance of IBufferWriter<T>.

Reset()

Resets the internal state of this instance so that it can be reused.

Reset(Stream)

Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs

Resets the internal state of this instance so that it can be reused with a new instance of Stream.

C#
public void Reset(System.IO.Stream utf8Json);

Parameters

utf8Json
Stream

The destination for writing JSON text.

Exceptions

utf8Json is null.

This instance has been disposed.

Remarks

The Utf8JsonWriter will continue to use the original writer options but now writes to utf8Json as the new destination.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

Reset(IBufferWriter<Byte>)

Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs

Resets the internal state of this instance so that it can be reused with a new instance of IBufferWriter<T>.

C#
public void Reset(System.Buffers.IBufferWriter<byte> bufferWriter);

Parameters

bufferWriter
IBufferWriter<Byte>

The destination for writing JSON text.

Exceptions

bufferWriter is null.

This instance has been disposed.

Remarks

The Utf8JsonWriter will continue to use the original writer options but now writes to bufferWriter as the new destination.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

Reset()

Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs

Resets the internal state of this instance so that it can be reused.

C#
public void Reset();

Exceptions

This instance has been disposed.

Remarks

The Utf8JsonWriter will continue to use the original writer options and the original output (either IBufferWriter<T> or Stream) as the destination.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)