Skip to content

Commit 7bc1fd9

Browse files
sywhangcarlossanlop
authored andcommitted
Add docs for EventCounter.Dispose() and DiagnosticsListener.IsEnabled (#3235)
* Add docs for EventCounter.Dispose() and DiagnosticsListener.IsEnabled * Update xml/System.Diagnostics/DiagnosticListener.xml Co-Authored-By: Carlos Sanchez Lopez <[email protected]> * spacing + cref to EventSource * Update xml/System.Diagnostics/DiagnosticListener.xml Co-Authored-By: Noah Falk <[email protected]> * Update xml/System.Diagnostics.Tracing/EventCounter.xml Co-Authored-By: Noah Falk <[email protected]> * Update xml/System.Diagnostics/DiagnosticListener.xml Co-Authored-By: Noah Falk <[email protected]> * address suggestions by carlossanlop * Point the see cref to the member group without %2A * suggestion by gewarren (Overload)
1 parent 65602bd commit 7bc1fd9

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

xml/System.Diagnostics.Tracing/EventCounter.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,16 @@ For an example of how to use the <xref:System.Diagnostics.Tracing.EventCounter>
109109
</ReturnValue>
110110
<Parameters />
111111
<Docs>
112-
<summary>Releases the resources used by the current instance of the <see cref="T:System.Diagnostics.Tracing.EventCounter" /> class.</summary>
113-
<remarks>To be added.</remarks>
112+
<summary>Removes the counter from the set that the <see cref="T:System.Diagnostics.Tracing.EventSource" /> will report on.</summary>
113+
<remarks>
114+
<format type="text/markdown"><![CDATA[
115+
116+
## Remarks
117+
118+
After being disposed, this counter will stop reporting values. If an <xref:System.Diagnostics.Tracing.EventCounter> is not explicitly disposed it will stop reporting automatically when the <xref:System.Diagnostics.Tracing.EventSource> it is attached to is disposed.
119+
120+
]]></format>
121+
</remarks>
114122
</Docs>
115123
</Member>
116124
<Member MemberName="ToString">

xml/System.Diagnostics/DiagnosticListener.xml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ If setup for the notification is expensive, you can call `IsEnabled()` before pe
213213
<Parameter Name="arg2" Type="System.Object" Index="2" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
214214
</Parameters>
215215
<Docs>
216-
<param name="name">To be added.</param>
217-
<param name="arg1">To be added.</param>
218-
<param name="arg2">To be added.</param>
219-
<summary>Checks if the DiagnosticListener is enabled.</summary>
216+
<param name="name">The name of the event to check.</param>
217+
<param name="arg1">The object that represents a context.</param>
218+
<param name="arg2">The object that represents a context.</param>
219+
<summary>Checks if any subscriber to the diagnostic events is interested in receiving events with this name. Subscribers indicate their interest using a delegate provided in <see cref="Overload:System.Diagnostics.DiagnosticListener.Subscribe" />.</summary>
220220
<returns>
221221
<see langword="true" /> if it is enabled, <see langword="false" /> otherwise.</returns>
222222
<remarks>To be added.</remarks>
@@ -298,6 +298,18 @@ If setup for the notification is expensive, you can call `IsEnabled()` before pe
298298
<remarks>To be added.</remarks>
299299
</Docs>
300300
</Member>
301+
<MemberGroup MemberName="Subscribe">
302+
<AssemblyInfo>
303+
<AssemblyName>System.Diagnostics.DiagnosticSource</AssemblyName>
304+
<AssemblyVersion>4.0.2.0</AssemblyVersion>
305+
<AssemblyVersion>4.0.2.1</AssemblyVersion>
306+
<AssemblyVersion>4.0.3.0</AssemblyVersion>
307+
<AssemblyVersion>4.0.4.0</AssemblyVersion>
308+
</AssemblyInfo>
309+
<Docs>
310+
<summary>These methods allow adding a subscriber, and some of them provide optional event filtering methods.</summary>
311+
</Docs>
312+
</MemberGroup>
301313
<Member MemberName="Subscribe">
302314
<MemberSignature Language="C#" Value="public IDisposable Subscribe (IObserver&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt; observer);" FrameworkAlternate="netcore-1.0;netcore-1.1" />
303315
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.IDisposable Subscribe(class System.IObserver`1&lt;valuetype System.Collections.Generic.KeyValuePair`2&lt;string, object&gt;&gt; observer) cil managed" />

0 commit comments

Comments
 (0)