+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-// ------------------------------------------------------------------------------
-// Changes to this file must follow the http://aka.ms/api-review process.
-// ------------------------------------------------------------------------------
-
-namespace System.Text.Json
-{
- public sealed partial class Utf8JsonWriter : System.IAsyncDisposable
- {
- public System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
- }
-}
public partial struct JsonReaderOptions
{
private int _dummyPrimitive;
- public bool AllowTrailingCommas { get { throw null; } set { } }
- public System.Text.Json.JsonCommentHandling CommentHandling { get { throw null; } set { } }
+ public bool AllowTrailingCommas { readonly get { throw null; } set { } }
+ public System.Text.Json.JsonCommentHandling CommentHandling { readonly get { throw null; } set { } }
public int MaxDepth { get { throw null; } set { } }
}
public partial struct JsonReaderState
public long BytesConsumed { get { throw null; } }
public int CurrentDepth { get { throw null; } }
public System.Text.Json.JsonReaderState CurrentState { get { throw null; } }
- public bool HasValueSequence { get { throw null; } }
+ public readonly bool HasValueSequence { get { throw null; } }
public bool IsFinalBlock { get { throw null; } }
public System.SequencePosition Position { get { throw null; } }
- public long TokenStartIndex { get { throw null; } }
+ public readonly long TokenStartIndex { get { throw null; } }
public System.Text.Json.JsonTokenType TokenType { get { throw null; } }
- public System.Buffers.ReadOnlySequence<byte> ValueSequence { get { throw null; } }
- public System.ReadOnlySpan<byte> ValueSpan { get { throw null; } }
+ public readonly System.Buffers.ReadOnlySequence<byte> ValueSequence { get { throw null; } }
+ public readonly System.ReadOnlySpan<byte> ValueSpan { get { throw null; } }
public bool GetBoolean() { throw null; }
public byte[] GetBytesFromBase64() { throw null; }
public string GetComment() { throw null; }
public bool ValueTextEquals(System.ReadOnlySpan<char> text) { throw null; }
public bool ValueTextEquals(string text) { throw null; }
}
- public sealed partial class Utf8JsonWriter : System.IDisposable
+ public sealed partial class Utf8JsonWriter : System.IAsyncDisposable, System.IDisposable
{
public Utf8JsonWriter(System.Buffers.IBufferWriter<byte> bufferWriter, System.Text.Json.JsonWriterOptions options = default(System.Text.Json.JsonWriterOptions)) { }
public Utf8JsonWriter(System.IO.Stream utf8Json, System.Text.Json.JsonWriterOptions options = default(System.Text.Json.JsonWriterOptions)) { }
public int CurrentDepth { get { throw null; } }
public System.Text.Json.JsonWriterOptions Options { get { throw null; } }
public void Dispose() { }
+ public System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
public void Flush() { }
public System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public void Reset() { }
<Compile Include="System.Text.Json.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netstandard' AND '$(TargetsNetFx)' != 'true'">
- <Compile Include="System.Text.Json.Manual.cs" />
<ProjectReference Include="..\..\System.Memory\ref\System.Memory.csproj" />
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
</ItemGroup>
<Reference Include="netstandard" />
<Reference Include="System.Memory" />
<Reference Include="System.Threading.Tasks.Extensions" />
+ <ProjectReference Include="..\..\Microsoft.Bcl.AsyncInterfaces\ref\Microsoft.Bcl.AsyncInterfaces.csproj" />
</ItemGroup>
</Project>
\ No newline at end of file
/// <see cref="JsonWriterOptions"/> and pass that in to the writer.
/// </remarks>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
- public sealed partial class Utf8JsonWriter : IDisposable
-#if BUILDING_INBOX_LIBRARY
- , IAsyncDisposable
-#endif
+ public sealed partial class Utf8JsonWriter : IDisposable, IAsyncDisposable
{
// Depending on OS, either '\r\n' OR '\n'
private static readonly int s_newLineLength = Environment.NewLine.Length;
_output = null;
}
-#if BUILDING_INBOX_LIBRARY
/// <summary>
/// Asynchronously commits any left over JSON text that has not yet been flushed and releases all resources used by the current instance.
/// </summary>
_arrayBufferWriter = null;
_output = null;
}
-#endif
/// <summary>
/// Asynchronously commits the JSON text written so far which makes it visible to the output destination.