You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DiagnosticSource.StartActivity returns the activity instance that was passed as an argument. The analyzer suggests to also dispose the returned activity, however it is already being disposed with the using on the first line:
usingvaractivity=new Activity("Do work");
activity.SetParentId(parentId);
↓diagnosticSource.StartActivity(activity,new{ work });
However with a pattern like the following, we should still raise IDISP0004 as expected:
diagnosticSource.StartActivity(↓new Activity("Do work"),new{ work });
The text was updated successfully, but these errors were encountered:
DiagnosticSource.StartActivity returns the
activity
instance that was passed as an argument. The analyzer suggests to also dispose the returned activity, however it is already being disposed with the using on the first line:However with a pattern like the following, we should still raise IDISP0004 as expected:
The text was updated successfully, but these errors were encountered: