.NET Purview Middleware: Improve Background Job Runner Injection (#3256)

* Clean up background job dependency injection

* Fix xml documentation grammar
This commit is contained in:
eoindoherty1
2026-01-16 19:20:35 +00:00
committed by GitHub
parent b773830e4b
commit a151f10cc2
5 changed files with 36 additions and 12 deletions
@@ -12,7 +12,7 @@ namespace Microsoft.Agents.AI.Purview;
/// <summary>
/// Service that runs jobs in background threads.
/// </summary>
internal sealed class BackgroundJobRunner
internal sealed class BackgroundJobRunner : IBackgroundJobRunner
{
private readonly IChannelHandler _channelHandler;
private readonly IPurviewClient _purviewClient;
@@ -70,4 +70,12 @@ internal sealed class BackgroundJobRunner
break;
}
}
/// <summary>
/// Shutdown the job runners.
/// </summary>
public async Task ShutdownAsync()
{
await this._channelHandler.StopAndWaitForCompletionAsync().ConfigureAwait(false);
}
}