This paradigm more accurately represents the RemoteQueryManager as a Service that can be started/stopped.
12 lines
364 B
C#
12 lines
364 B
C#
namespace Bts.DataStream.Services;
|
|
|
|
using BCG;
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
public static class DataStreamServices {
|
|
public static IServiceCollection AddRemoteQueryManager(this IServiceCollection services) =>
|
|
services.AddSingleton<RemoteQueryManager>()
|
|
.AddHostedService(sp => sp.GetRequiredService<RemoteQueryManager>());
|
|
}
|