Skip to content

Commit

Permalink
Adding the Dispose information to the Activity remarks (#9227)
Browse files Browse the repository at this point in the history
  • Loading branch information
askpt authored Aug 29, 2023
1 parent 26cdba4 commit 695b963
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xml/System.Diagnostics/Activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Activities should be created by calling the constructor, configured as necessary
When an activity is finished, it should be stopped with the <xref:System.Diagnostics.Activity.Stop?displayProperty=nameWithType> method.
However, if you dispose the `Activity` object, that stops it so you don't need to explicitly call <xref:System.Diagnostics.Activity.Stop?displayProperty=nameWithType>. That simplifies the coding pattern. For more information, see the <xref:System.Diagnostics.Activity.Dispose%2A> method.
No `Activity` methods allow exceptions to escape as a response to bad inputs. They are thrown and caught (which allows debuggers and monitors to see the error), but the exception is suppressed, and the operation does something reasonable (typically it does nothing).
]]></format>
Expand Down

0 comments on commit 695b963

Please sign in to comment.