Skip to content

Commit c2c91fc

Browse files
authored
Port System.Diagnostics new docs (#10207)
1 parent f4d6991 commit c2c91fc

File tree

4 files changed

+52
-19
lines changed

4 files changed

+52
-19
lines changed

xml/System.Diagnostics.CodeAnalysis/FeatureGuardAttribute.xml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,15 @@
2828
</Attribute>
2929
</Attributes>
3030
<Docs>
31-
<summary>To be added.</summary>
32-
<remarks>To be added.</remarks>
31+
<summary>
32+
<para>Indicates that the specified public static boolean get-only property</para>
33+
<para>guards access to the specified feature.</para>
34+
</summary>
35+
<remarks>
36+
<para>Analyzers can use this to prevent warnings on calls to code that is</para>
37+
<para>annotated as requiring that feature, when the callsite is guarded by a</para>
38+
<para>call to the property.</para>
39+
</remarks>
3340
</Docs>
3441
<Members>
3542
<Member MemberName=".ctor">
@@ -48,8 +55,11 @@
4855
<Parameter Name="featureType" Type="System.Type" />
4956
</Parameters>
5057
<Docs>
51-
<param name="featureType">To be added.</param>
52-
<summary>To be added.</summary>
58+
<param name="featureType">The type that represents the feature guarded by the property.</param>
59+
<summary>
60+
<para>Initializes a new instance of the <see cref="T:System.Diagnostics.CodeAnalysis.FeatureGuardAttribute" /> class</para>
61+
<para>with the specified feature type.</para>
62+
</summary>
5363
<remarks>To be added.</remarks>
5464
</Docs>
5565
</Member>
@@ -69,7 +79,7 @@
6979
<ReturnType>System.Type</ReturnType>
7080
</ReturnValue>
7181
<Docs>
72-
<summary>To be added.</summary>
82+
<summary>The type that represents the feature guarded by the property.</summary>
7383
<value>To be added.</value>
7484
<remarks>To be added.</remarks>
7585
</Docs>

xml/System.Diagnostics.CodeAnalysis/FeatureSwitchDefinitionAttribute.xml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@
2828
</Attribute>
2929
</Attributes>
3030
<Docs>
31-
<summary>To be added.</summary>
32-
<remarks>To be added.</remarks>
31+
<summary>
32+
<para>Indicates that the specified public static boolean get-only property</para>
33+
<para>corresponds to the feature switch specified by name.</para>
34+
</summary>
35+
<remarks>
36+
<para>IL rewriters and compilers can use this to substitute the return value</para>
37+
<para>of the specified property with the value of the feature switch.</para>
38+
</remarks>
3339
</Docs>
3440
<Members>
3541
<Member MemberName=".ctor">
@@ -48,8 +54,11 @@
4854
<Parameter Name="switchName" Type="System.String" />
4955
</Parameters>
5056
<Docs>
51-
<param name="switchName">To be added.</param>
52-
<summary>To be added.</summary>
57+
<param name="switchName">The name of the feature switch that provides the value for the specified property.</param>
58+
<summary>
59+
<para>Initializes a new instance of the <see cref="T:System.Diagnostics.CodeAnalysis.FeatureSwitchDefinitionAttribute" /> class</para>
60+
<para>with the specified feature switch name.</para>
61+
</summary>
5362
<remarks>To be added.</remarks>
5463
</Docs>
5564
</Member>
@@ -69,7 +78,7 @@
6978
<ReturnType>System.String</ReturnType>
7079
</ReturnValue>
7180
<Docs>
72-
<summary>To be added.</summary>
81+
<summary>The name of the feature switch that provides the value for the specified property.</summary>
7382
<value>To be added.</value>
7483
<remarks>To be added.</remarks>
7584
</Docs>

xml/System.Diagnostics.Contracts/Contract.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,7 @@
884884
<paramref name="predicate" /> is <see langword="null" />.</exception>
885885
<exception cref="T:System.ArgumentException">
886886
<paramref name="toExclusive" /> is less than <paramref name="fromInclusive" />.</exception>
887+
<seealso cref="M:System.Collections.Generic.List`1.Exists(System.Predicate{`0})" />
887888
</Docs>
888889
</Member>
889890
<Member MemberName="Exists&lt;T&gt;">
@@ -949,6 +950,7 @@
949950
<exception cref="T:System.ArgumentNullException">
950951
<paramref name="collection" /> or <paramref name="predicate" /> is <see langword="null" />.</exception>
951952
<altmember cref="M:System.Collections.Generic.List`1.Exists(System.Predicate{`0})" />
953+
<seealso cref="M:System.Collections.Generic.List`1.Exists(System.Predicate{`0})" />
952954
</Docs>
953955
</Member>
954956
<Member MemberName="ForAll">
@@ -1022,6 +1024,7 @@
10221024
<exception cref="T:System.ArgumentException">
10231025
<paramref name="toExclusive" /> is less than <paramref name="fromInclusive" />.</exception>
10241026
<altmember cref="M:System.Collections.Generic.List`1.TrueForAll(System.Predicate{`0})" />
1027+
<seealso cref="M:System.Collections.Generic.List`1.TrueForAll(System.Predicate{`0})" />
10251028
</Docs>
10261029
</Member>
10271030
<Member MemberName="ForAll&lt;T&gt;">
@@ -1097,6 +1100,7 @@
10971100
<exception cref="T:System.ArgumentNullException">
10981101
<paramref name="collection" /> or <paramref name="predicate" /> is <see langword="null" />.</exception>
10991102
<altmember cref="M:System.Collections.Generic.List`1.TrueForAll(System.Predicate{`0})" />
1103+
<seealso cref="M:System.Collections.Generic.List`1.TrueForAll(System.Predicate{`0})" />
11001104
</Docs>
11011105
</Member>
11021106
<MemberGroup MemberName="Invariant">

xml/System.Diagnostics/DiagnosticMethodInfo.xml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
</Attribute>
2525
</Attributes>
2626
<Docs>
27-
<summary>To be added.</summary>
27+
<summary>
28+
<para>Represents diagnostic information about a method. Information provided by this class is similar to information</para>
29+
<para>provided by <see cref="T:System.Reflection.MethodBase" /> but it's meant for logging and tracing purposes.</para>
30+
</summary>
2831
<remarks>To be added.</remarks>
2932
</Docs>
3033
<Members>
@@ -54,9 +57,12 @@
5457
</Parameters>
5558
<Docs>
5659
<param name="delegate">To be added.</param>
57-
<summary>To be added.</summary>
60+
<summary>Creates a <see cref="T:System.Diagnostics.DiagnosticMethodInfo" /> that represents the target of the delegate.</summary>
5861
<returns>To be added.</returns>
59-
<remarks>To be added.</remarks>
62+
<remarks>
63+
<para>This returns the definition of the target method, with stripped instantiation information.</para>
64+
<para>The return value might be <see langword="null" /> if the `StackTraceSupport` feature switch is set to <see langword="false" />.</para>
65+
</remarks>
6066
</Docs>
6167
</Member>
6268
<Member MemberName="Create">
@@ -85,9 +91,13 @@
8591
</Parameters>
8692
<Docs>
8793
<param name="frame">To be added.</param>
88-
<summary>To be added.</summary>
94+
<summary>Creates a <see cref="T:System.Diagnostics.DiagnosticMethodInfo" /> that represents the method this stack frame is associtated with.</summary>
8995
<returns>To be added.</returns>
90-
<remarks>To be added.</remarks>
96+
<remarks>
97+
<para>This returns the definition of the target method, with stripped instantiation information.</para>
98+
<para>The return value might be <see langword="null" /> if the `StackTraceSupport` feature switch is set to <see langword="false" />.</para>
99+
<para>The return value might be <see langword="null" /> if the target method is unknown.</para>
100+
</remarks>
91101
</Docs>
92102
</Member>
93103
<Member MemberName="DeclaringAssemblyName">
@@ -106,7 +116,7 @@
106116
<ReturnType>System.String</ReturnType>
107117
</ReturnValue>
108118
<Docs>
109-
<summary>To be added.</summary>
119+
<summary>Gets the display name of the assembly that owns this method.</summary>
110120
<value>To be added.</value>
111121
<remarks>To be added.</remarks>
112122
</Docs>
@@ -127,7 +137,7 @@
127137
<ReturnType>System.String</ReturnType>
128138
</ReturnValue>
129139
<Docs>
130-
<summary>To be added.</summary>
140+
<summary>Gets the fully qualified name of the type that owns this method, including its namespace but not its assembly.</summary>
131141
<value>To be added.</value>
132142
<remarks>To be added.</remarks>
133143
</Docs>
@@ -148,9 +158,9 @@
148158
<ReturnType>System.String</ReturnType>
149159
</ReturnValue>
150160
<Docs>
151-
<summary>To be added.</summary>
161+
<summary>Gets the name of the method.</summary>
152162
<value>To be added.</value>
153-
<remarks>To be added.</remarks>
163+
<remarks>Only the simple name of the method is returned, without information about generic parameters or arity.</remarks>
154164
</Docs>
155165
</Member>
156166
</Members>

0 commit comments

Comments
 (0)