Skip to content

Commit a2afbff

Browse files
authored
Disable warning suppressions related to missing XML comments within (dotnet#38037)
S.T.Json.
1 parent 1a60edc commit a2afbff

File tree

5 files changed

+69
-0
lines changed

5 files changed

+69
-0
lines changed

src/System.Text.Json/src/System.Text.Json.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
<!-- BUILDING_INBOX_LIBRARY is only false when building for netstandard to validate that the sources are netstandard compatible. -->
1010
<!-- This is meant to help with producing a source package and not to ship a netstandard compatible binary. -->
1111
<DefineConstants Condition="'$(TargetsNETStandard)' != 'true'">$(DefineConstants);BUILDING_INBOX_LIBRARY</DefineConstants>
12+
<!-- Workaround for overriding the XML comments related warnings that are being supressed repo wide (within arcade): -->
13+
<!-- https://github.com/dotnet/arcade/blob/ea6addfdc65e5df1b2c036f11614a5f922e36267/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props#L90 -->
14+
<!-- For this project, we want warnings if there are public APIs/types without properly formatted XML comments (particularly CS1591). -->
15+
<NoWarn/>
1216
</PropertyGroup>
1317
<ItemGroup>
1418
<Compile Include="System\Text\Json\BitStack.cs" />

src/System.Text.Json/src/System/Text/Json/JsonException.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ public JsonException(string message, string path, long? lineNumber, long? bytePo
4848
Path = path;
4949
}
5050

51+
/// <summary>
52+
/// Creates a new exception object with serialized data.
53+
/// </summary>
54+
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
55+
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
56+
/// <exception cref="ArgumentNullException">
57+
/// Thrown when <paramref name="info"/> is <see langword="null" />.
58+
/// </exception>
5159
protected JsonException(SerializationInfo info, StreamingContext context) : base(info, context)
5260
{
5361
LineNumber = (long?)info.GetValue("LineNumber", typeof(long?));

src/System.Text.Json/src/System/Text/Json/JsonTokenType.cs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,68 @@ public enum JsonTokenType : byte
1515
{
1616
// Do not re-order.
1717
// We rely on the ordering to quickly check things like IsTokenTypePrimitive
18+
19+
/// <summary>
20+
/// Indicates that there is no value (as distinct from <see cref="Null"/>).
21+
/// </summary>
22+
/// <remarks>
23+
/// This is the default token type if no data has been read by the <see cref="Utf8JsonReader"/>.
24+
/// </remarks>
1825
None,
26+
27+
/// <summary>
28+
/// Indicates that the token type is the start of a JSON object.
29+
/// </summary>
1930
StartObject,
31+
32+
/// <summary>
33+
/// Indicates that the token type is the end of a JSON object.
34+
/// </summary>
2035
EndObject,
36+
37+
/// <summary>
38+
/// Indicates that the token type is the start of a JSON array.
39+
/// </summary>
2140
StartArray,
41+
42+
/// <summary>
43+
/// Indicates that the token type is the end of a JSON array.
44+
/// </summary>
2245
EndArray,
46+
47+
/// <summary>
48+
/// Indicates that the token type is a JSON property name.
49+
/// </summary>
2350
PropertyName,
51+
52+
/// <summary>
53+
/// Indicates that the token type is a JSON string.
54+
/// </summary>
2455
String,
56+
57+
/// <summary>
58+
/// Indicates that the token type is a JSON number.
59+
/// </summary>
2560
Number,
61+
62+
/// <summary>
63+
/// Indicates that the token type is the JSON literal <c>true</c>.
64+
/// </summary>
2665
True,
66+
67+
/// <summary>
68+
/// Indicates that the token type is the JSON literal <c>false</c>.
69+
/// </summary>
2770
False,
71+
72+
/// <summary>
73+
/// Indicates that the token type is the JSON literal <c>null</c>.
74+
/// </summary>
2875
Null,
76+
77+
/// <summary>
78+
/// Indicates that the token type is the comment string.
79+
/// </summary>
2980
Comment,
3081
}
3182
}

src/System.Text.Json/src/System/Text/Json/Serialization/JsonIgnoreAttribute.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ namespace System.Text.Json.Serialization
1010
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
1111
public sealed class JsonIgnoreAttribute : JsonAttribute
1212
{
13+
/// <summary>
14+
/// Initializes a new instance of <see cref="JsonIgnoreAttribute"/>.
15+
/// </summary>
1316
public JsonIgnoreAttribute() { }
1417
}
1518
}

src/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ namespace System.Text.Json.Serialization
99
/// </summary>
1010
public abstract class JsonNamingPolicy
1111
{
12+
/// <summary>
13+
/// Initializes a new instance of <see cref="JsonNamingPolicy"/>.
14+
/// </summary>
1215
protected JsonNamingPolicy() { }
1316

1417
/// <summary>

0 commit comments

Comments
 (0)