From: Jose Perez Rodriguez Date: Mon, 17 Jun 2019 21:10:20 +0000 (-0700) Subject: Removing the Manual reference file from System.Text.Json (dotnet/corefx#38409) X-Git-Tag: submit/tizen/20210909.063632~11031^2~1265 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=755bd54da2615ac8300488a63f7e24f83d9314fe;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Removing the Manual reference file from System.Text.Json (dotnet/corefx#38409) * Removing the Manual reference file from System.Text.Json * Readd the netcoreapp and uap configurations so that we don't have to bring AsyncInterfaces package into the shared framework closure * Revert param name change as per PR Feedback Commit migrated from https://github.com/dotnet/corefx/commit/5b3d41c1c63c4ebd93af7e6482e954e104827884 --- diff --git a/src/libraries/System.Text.Json/ref/System.Text.Json.Manual.cs b/src/libraries/System.Text.Json/ref/System.Text.Json.Manual.cs deleted file mode 100644 index 23b8c70..0000000 --- a/src/libraries/System.Text.Json/ref/System.Text.Json.Manual.cs +++ /dev/null @@ -1,14 +0,0 @@ -// 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; } - } -} diff --git a/src/libraries/System.Text.Json/ref/System.Text.Json.cs b/src/libraries/System.Text.Json/ref/System.Text.Json.cs index b335fa5..2a1b2be 100644 --- a/src/libraries/System.Text.Json/ref/System.Text.Json.cs +++ b/src/libraries/System.Text.Json/ref/System.Text.Json.cs @@ -148,8 +148,8 @@ namespace System.Text.Json 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 @@ -233,13 +233,13 @@ namespace System.Text.Json 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 ValueSequence { get { throw null; } } - public System.ReadOnlySpan ValueSpan { get { throw null; } } + public readonly System.Buffers.ReadOnlySequence ValueSequence { get { throw null; } } + public readonly System.ReadOnlySpan ValueSpan { get { throw null; } } public bool GetBoolean() { throw null; } public byte[] GetBytesFromBase64() { throw null; } public string GetComment() { throw null; } @@ -276,7 +276,7 @@ namespace System.Text.Json public bool ValueTextEquals(System.ReadOnlySpan 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 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)) { } @@ -285,6 +285,7 @@ namespace System.Text.Json 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() { } diff --git a/src/libraries/System.Text.Json/ref/System.Text.Json.csproj b/src/libraries/System.Text.Json/ref/System.Text.Json.csproj index 85b6a4f..f0f56f7 100644 --- a/src/libraries/System.Text.Json/ref/System.Text.Json.csproj +++ b/src/libraries/System.Text.Json/ref/System.Text.Json.csproj @@ -7,7 +7,6 @@ - @@ -16,5 +15,6 @@ + \ No newline at end of file diff --git a/src/libraries/System.Text.Json/src/System.Text.Json.csproj b/src/libraries/System.Text.Json/src/System.Text.Json.csproj index 44c9fde..bc0b068 100644 --- a/src/libraries/System.Text.Json/src/System.Text.Json.csproj +++ b/src/libraries/System.Text.Json/src/System.Text.Json.csproj @@ -167,6 +167,7 @@ + diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs index 9ac6d57..3984a70 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs @@ -31,10 +31,7 @@ namespace System.Text.Json /// and pass that in to the writer. /// [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; @@ -340,7 +337,6 @@ namespace System.Text.Json _output = null; } -#if BUILDING_INBOX_LIBRARY /// /// Asynchronously commits any left over JSON text that has not yet been flushed and releases all resources used by the current instance. /// @@ -369,7 +365,6 @@ namespace System.Text.Json _arrayBufferWriter = null; _output = null; } -#endif /// /// Asynchronously commits the JSON text written so far which makes it visible to the output destination.