Skip to content

Commit 858b250

Browse files
author
Immo Landwerth
committed
Provide more details for marking APIs as preview
1 parent 2d9290c commit 858b250

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

xml/System.Diagnostics.CodeAnalysis/ExperimentalAttribute.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@
3030
</Attributes>
3131
<Docs>
3232
<summary>Indicates that an API is experimental and it may change in the future.</summary>
33-
<remarks>This attribute allows call sites to be flagged with a diagnostic that indicates that an experimental feature is used. Authors can use this attribute to ship preview features in their assemblies.</remarks>
33+
<remarks>
34+
<format type="text/markdown"><![CDATA[
35+
<xref:System.Diagnostics.CodeAnalysis.ExperimentalAttribute> allows call sites to be flagged with a diagnostic that indicates that an experimental feature is used. You can use this attribute to ship preview features in otherwise stable libraries.
36+
37+
For more information about using how APIs can be marked as preview, see [Attributes](dotnet/fundamentals/apicompat/preview-apis).
38+
]]></format>
39+
</remarks>
3440
<seealso cref="T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute" />
3541
</Docs>
3642
<Members>

xml/System.Runtime.Versioning/RequiresPreviewFeaturesAttribute.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@
3232
</Attributes>
3333
<Docs>
3434
<summary>Indicates that an API is in preview. This attribute allows call sites to be flagged with a diagnostic that indicates that a preview feature is used. Authors can use this attribute to ship preview features in their assemblies.</summary>
35-
<remarks>To be added.</remarks>
35+
<remarks>
36+
<format type="text/markdown"><![CDATA[
37+
<xref:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute> marks an API as requiring preview functionality from the .NET runtime, its core libraries, and the compilers. This API generally shouldn't be used by your code and is instead reserved for platform provided functionality.
38+
39+
If you want to ship preview functionality in your own libraries, you should use <xref:System.Diagnostics.CodeAnalysis.ExperimentalAttribute>.
40+
41+
For more information about using how APIs can be marked as preview, see [Attributes](dotnet/fundamentals/apicompat/preview-apis).
42+
]]></format>
43+
</remarks>
3644
<related type="Article" href="https://aka.ms/dotnet-warnings/preview-features">Preview Features</related>
3745
</Docs>
3846
<Members>

0 commit comments

Comments
 (0)