From 308abee26509d79c7916f16999308daa4bba4113 Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Wed, 29 May 2019 20:25:13 -0700 Subject: [PATCH] Disable warning suppressions related to missing XML comments within (dotnet/corefx#38037) S.T.Json. Commit migrated from https://github.com/dotnet/corefx/commit/a2afbfffc439b775086aeca71951312e15c8281e --- .../System.Text.Json/src/System.Text.Json.csproj | 4 ++ .../src/System/Text/Json/JsonException.cs | 8 ++++ .../src/System/Text/Json/JsonTokenType.cs | 51 ++++++++++++++++++++++ .../Text/Json/Serialization/JsonIgnoreAttribute.cs | 3 ++ .../Text/Json/Serialization/JsonNamingPolicy.cs | 3 ++ 5 files changed, 69 insertions(+) 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 fc3df9a..759e042 100644 --- a/src/libraries/System.Text.Json/src/System.Text.Json.csproj +++ b/src/libraries/System.Text.Json/src/System.Text.Json.csproj @@ -9,6 +9,10 @@ $(DefineConstants);BUILDING_INBOX_LIBRARY + + + + diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/JsonException.cs b/src/libraries/System.Text.Json/src/System/Text/Json/JsonException.cs index b7022d7..60d62bd 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/JsonException.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/JsonException.cs @@ -48,6 +48,14 @@ namespace System.Text.Json Path = path; } + /// + /// Creates a new exception object with serialized data. + /// + /// The that holds the serialized object data about the exception being thrown. + /// The that contains contextual information about the source or destination. + /// + /// Thrown when is . + /// protected JsonException(SerializationInfo info, StreamingContext context) : base(info, context) { LineNumber = (long?)info.GetValue("LineNumber", typeof(long?)); diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/JsonTokenType.cs b/src/libraries/System.Text.Json/src/System/Text/Json/JsonTokenType.cs index f42be5f..2fd1daa 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/JsonTokenType.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/JsonTokenType.cs @@ -15,17 +15,68 @@ namespace System.Text.Json { // Do not re-order. // We rely on the ordering to quickly check things like IsTokenTypePrimitive + + /// + /// Indicates that there is no value (as distinct from ). + /// + /// + /// This is the default token type if no data has been read by the . + /// None, + + /// + /// Indicates that the token type is the start of a JSON object. + /// StartObject, + + /// + /// Indicates that the token type is the end of a JSON object. + /// EndObject, + + /// + /// Indicates that the token type is the start of a JSON array. + /// StartArray, + + /// + /// Indicates that the token type is the end of a JSON array. + /// EndArray, + + /// + /// Indicates that the token type is a JSON property name. + /// PropertyName, + + /// + /// Indicates that the token type is a JSON string. + /// String, + + /// + /// Indicates that the token type is a JSON number. + /// Number, + + /// + /// Indicates that the token type is the JSON literal true. + /// True, + + /// + /// Indicates that the token type is the JSON literal false. + /// False, + + /// + /// Indicates that the token type is the JSON literal null. + /// Null, + + /// + /// Indicates that the token type is the comment string. + /// Comment, } } diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonIgnoreAttribute.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonIgnoreAttribute.cs index 8644189..26fac42a 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonIgnoreAttribute.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonIgnoreAttribute.cs @@ -10,6 +10,9 @@ namespace System.Text.Json.Serialization [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] public sealed class JsonIgnoreAttribute : JsonAttribute { + /// + /// Initializes a new instance of . + /// public JsonIgnoreAttribute() { } } } diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs index 32c4ffb..ef1b426 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs @@ -9,6 +9,9 @@ namespace System.Text.Json.Serialization /// public abstract class JsonNamingPolicy { + /// + /// Initializes a new instance of . + /// protected JsonNamingPolicy() { } /// -- 2.7.4