Skip to content

Commit 8298b5e

Browse files
BillWagnergewarren
andauthored
Add link from each attribute class to conceptual article (dotnet#6626)
* Add link from each attribute class to conceptual article See dotnet/csharplang#4623 (reply in thread) The conceptual article on these types covers all the attributes, including examples and scenarios for their use. Instead of replicating that, link to it so readers can quickly find all the information they need to annotate their APIs. * Apply suggestions from code review Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> * Respond to code review - add a "Related" tag" - fix typo shown in review comments. Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
1 parent b1fe4b8 commit 8298b5e

11 files changed

+22
-11
lines changed

xml/System.Diagnostics.CodeAnalysis/AllowNullAttribute.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
</Attributes>
3333
<Docs>
3434
<summary>Specifies that <see langword="null" /> is allowed as an input even if the corresponding type disallows it.</summary>
35-
<remarks>To override a method that has a parameter annotated with this attribute, use the <code>?</code> operator. For example: <code>override ISet&lt;Enum&gt; ReadJson(JsonReader reader, Type objectType, ISet&lt;Enum&gt;? existingValue, bool hasExistingValue, JsonSerializer serializer)</code>.</remarks>
35+
<remarks>To override a method that has a parameter annotated with this attribute, use the <code>?</code> operator. For example: <code>override ISet&lt;Enum&gt; ReadJson(JsonReader reader, Type objectType, ISet&lt;Enum&gt;? existingValue, bool hasExistingValue, JsonSerializer serializer)</code>. For more information, see <see href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</see> in the C# guide.</remarks>
36+
<related type="Article" href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</related>
3637
</Docs>
3738
<Members>
3839
<Member MemberName=".ctor">

xml/System.Diagnostics.CodeAnalysis/DisallowNullAttribute.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
</Attributes>
3333
<Docs>
3434
<summary>Specifies that <see langword="null" /> is disallowed as an input even if the corresponding type allows it.</summary>
35-
<remarks>To be added.</remarks>
35+
<remarks>For more information, see <see href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</see> in the C# guide.</remarks>
36+
<related type="Article" href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</related>
3637
</Docs>
3738
<Members>
3839
<Member MemberName=".ctor">

xml/System.Diagnostics.CodeAnalysis/DoesNotReturnAttribute.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
</Attributes>
3333
<Docs>
3434
<summary>Specifies that a method that will never return under any circumstance.</summary>
35-
<remarks>To be added.</remarks>
35+
<remarks>For more information, see <see href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</see> in the C# guide.</remarks>
36+
<related type="Article" href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</related>
3637
</Docs>
3738
<Members>
3839
<Member MemberName=".ctor">

xml/System.Diagnostics.CodeAnalysis/DoesNotReturnIfAttribute.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
</Attributes>
3333
<Docs>
3434
<summary>Specifies that the method will not return if the associated <see cref="T:System.Boolean" /> parameter is passed the specified value.</summary>
35-
<remarks>To be added.</remarks>
35+
<remarks>For more information, see <see href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</see> in the C# guide.</remarks>
36+
<related type="Article" href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</related>
3637
</Docs>
3738
<Members>
3839
<Member MemberName=".ctor">

xml/System.Diagnostics.CodeAnalysis/MaybeNullAttribute.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
</Attributes>
3333
<Docs>
3434
<summary>Specifies that an output may be <see langword="null" /> even if the corresponding type disallows it.</summary>
35-
<remarks>To be added.</remarks>
35+
<remarks>For more information, see <see href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</see> in the C# guide.</remarks>
36+
<related type="Article" href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</related>
3637
</Docs>
3738
<Members>
3839
<Member MemberName=".ctor">

xml/System.Diagnostics.CodeAnalysis/MaybeNullWhenAttribute.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
</Attributes>
3333
<Docs>
3434
<summary>Specifies that when a method returns <see cref="P:System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute.ReturnValue" />, the parameter may be <see langword="null" /> even if the corresponding type disallows it.</summary>
35-
<remarks>To be added.</remarks>
35+
<remarks>For more information, see <see href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</see> in the C# guide.</remarks>
36+
<related type="Article" href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</related>
3637
</Docs>
3738
<Members>
3839
<Member MemberName=".ctor">

xml/System.Diagnostics.CodeAnalysis/MemberNotNullAttribute.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
</Attributes>
2323
<Docs>
2424
<summary>Specifies that the method or property will ensure that the listed field and property members have values that aren't <see langword="null" />.</summary>
25-
<remarks>To be added.</remarks>
25+
<remarks>For more information, see <see href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</see> in the C# guide.</remarks>
26+
<related type="Article" href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</related>
2627
</Docs>
2728
<Members>
2829
<Member MemberName=".ctor">

xml/System.Diagnostics.CodeAnalysis/MemberNotNullWhenAttribute.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
</Attributes>
2323
<Docs>
2424
<summary>Specifies that the method or property will ensure that the listed field and property members have non-null values when returning with the specified return value condition.</summary>
25-
<remarks>To be added.</remarks>
25+
<remarks>For more information, see <see href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</see> in the C# guide.</remarks>
26+
<related type="Article" href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</related>
2627
</Docs>
2728
<Members>
2829
<Member MemberName=".ctor">

xml/System.Diagnostics.CodeAnalysis/NotNullAttribute.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
</Attributes>
3333
<Docs>
3434
<summary>Specifies that an output is not <see langword="null" /> even if the corresponding type allows it. Specifies that an input argument was not <see langword="null" /> when the call returns.</summary>
35-
<remarks>To be added.</remarks>
35+
<remarks>For more information, see <see href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</see> in the C# guide.</remarks>
36+
<related type="Article" href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</related>
3637
</Docs>
3738
<Members>
3839
<Member MemberName=".ctor">

xml/System.Diagnostics.CodeAnalysis/NotNullIfNotNullAttribute.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
</Attributes>
3333
<Docs>
3434
<summary>Specifies that the output will be non-null if the named parameter is non-null.</summary>
35-
<remarks>To be added.</remarks>
35+
<remarks>For more information, see <see href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</see> in the C# guide.</remarks>
36+
<related type="Article" href="/dotnet/csharp/language-reference/attributes/nullable-analysis">Nullable static analysis</related>
3637
</Docs>
3738
<Members>
3839
<Member MemberName=".ctor">

0 commit comments

Comments
 (0)