2025-11-30 13:37:33 -06:00
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2025-12-01 00:45:01 -06:00
|
|
|
using Microsoft.Iris.Debug;
|
2025-11-30 13:37:33 -06:00
|
|
|
|
|
|
|
|
namespace Microsoft.Iris.DebugAdapter.Server;
|
|
|
|
|
|
|
|
|
|
internal static class ServiceCollectionExtensions
|
|
|
|
|
{
|
2025-12-01 00:45:01 -06:00
|
|
|
public static IServiceCollection AddIrisDebugServices(this IServiceCollection services, IDebuggerServer debuggerServer, string symbolDir, string? sourceDir)
|
2025-11-30 13:37:33 -06:00
|
|
|
{
|
|
|
|
|
DebugSymbolResolver symbolResolver = new(symbolDir, sourceDir);
|
|
|
|
|
|
|
|
|
|
return services
|
2025-12-01 00:45:01 -06:00
|
|
|
.AddSingleton(symbolResolver)
|
|
|
|
|
.AddSingleton(debuggerServer);
|
2025-11-30 13:37:33 -06:00
|
|
|
}
|
|
|
|
|
}
|