| 1 | using AgentForge.Abstractions; |
| 2 | using Microsoft.Extensions.DependencyInjection; |
| 3 | |
| 4 | namespace AgentForge.Plugin.RepositoryImport.GitHub.Core; |
| 5 | |
| 6 | public static class GitHubImportServiceCollectionExtensions |
| 7 | { |
| 8 | public static IServiceCollection AddGitHubImportCore(this IServiceCollection services) |
| 9 | { |
| 10 | if (services.Any(d => d.ServiceType == typeof(ForgeGitHubImportCoreServicesMarker))) |
| 11 | return services; |
| 12 | |
| 13 | services.AddSingleton<ForgeGitHubImportCoreServicesMarker>(); |
| 14 | services.AddHttpClient<GitHubRepositoryClient>(); |
| 15 | services.AddSingleton<ForgeImportCatalogLoader>(); |
| 16 | services.AddSingleton<ForgeImportCatalogMatcher>(); |
| 17 | services.AddScoped<ForgeGitHubRepositoryImportEngine>(); |
| 18 | return services; |
| 19 | } |
| 20 | } |
| 21 | |
View only · write via MCP/CIDE