Skip to content

Commit f034948

Browse files
[release/8.x] Bump Microsoft.Diagnostics.DbgShim (#8107)
Bumps [Microsoft.Diagnostics.DbgShim](https://github.com/dotnet/diagnostics) from 9.0.553101 to 9.0.621003. - [Release notes](https://github.com/dotnet/diagnostics/releases) - [Commits](dotnet/diagnostics@v9.0.553101...v9.0.621003) --- updated-dependencies: - dependency-name: Microsoft.Diagnostics.DbgShim dependency-version: 9.0.621003 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 87005bd commit f034948

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

eng/dependabot/nuget.org/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<!-- Import references updated by Dependabot. -->
33
<PropertyGroup>
44
<!-- dotnet/diagnostics references -->
5-
<MicrosoftDiagnosticsMonitoringShippedVersion>9.0.553101</MicrosoftDiagnosticsMonitoringShippedVersion>
5+
<MicrosoftDiagnosticsMonitoringShippedVersion>9.0.621003</MicrosoftDiagnosticsMonitoringShippedVersion>
66
</PropertyGroup>
77
</Project>

src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTestCommon/EndpointInfoSourceCallback.cs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
using System;
99
using System.Collections.Generic;
1010
using System.Linq;
11-
using System.Reflection;
1211
using System.Threading;
1312
using System.Threading.Tasks;
14-
using Xunit;
1513
using Xunit.Abstractions;
1614

1715
namespace Microsoft.Diagnostics.Monitoring.TestCommon
@@ -80,7 +78,9 @@ public virtual async Task OnBeforeResumeAsync(IEndpointInfo endpointInfo, Cancel
8078
{
8179
if (endpointInfo.RuntimeVersion.Major >= 8 && !string.IsNullOrEmpty(_startupHookPath))
8280
{
83-
await ApplyStartupHookAsync(new DiagnosticsClient(endpointInfo.ProcessId), _startupHookPath, token);
81+
DiagnosticsClient client = new(endpointInfo.ProcessId);
82+
83+
await client.ApplyStartupHookAsync(_startupHookPath, token);
8484
}
8585
}
8686

@@ -106,19 +106,6 @@ public Task OnRemovedEndpointInfoAsync(IEndpointInfo info, CancellationToken tok
106106
token);
107107
}
108108

109-
private static Task ApplyStartupHookAsync(DiagnosticsClient client, string path, CancellationToken token)
110-
{
111-
// DiagnosticsClient.ApplyStartupHookAsync currently is not public
112-
MethodBase applyStartupHookAsync =
113-
typeof(DiagnosticsClient).GetMethod(
114-
"ApplyStartupHookAsync",
115-
BindingFlags.Instance | BindingFlags.NonPublic);
116-
117-
Assert.NotNull(applyStartupHookAsync);
118-
119-
return (Task)applyStartupHookAsync.Invoke(client, new object[] { path, token });
120-
}
121-
122109
private static async Task<IEndpointInfo> WaitForCompletionAsync(string operation, SemaphoreSlim semaphore, List<CompletionEntry> entries, ITestOutputHelper outputHelper, AppRunner runner, TimeSpan timeout)
123110
{
124111
CompletionEntry entry = new(runner);

0 commit comments

Comments
 (0)