This commit is contained in:
StellaOps Bot
2025-12-14 23:20:14 +02:00
parent 3411e825cd
commit b058dbe031
356 changed files with 68310 additions and 1108 deletions

View File

@@ -0,0 +1,26 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using StellaOps.DependencyInjection;
using StellaOps.DependencyInjection.Validation;
namespace StellaOps.Plugin.MyConnector;
/// <summary>
/// Registers MyConnector services with the dependency injection container.
/// </summary>
public sealed class MyConnectorDependencyInjectionRoutine : IDependencyInjectionRoutine
{
/// <inheritdoc />
public IServiceCollection Register(IServiceCollection services, IConfiguration configuration)
{
// Register options with fail-fast validation
services.AddOptionsWithValidation<MyConnectorOptions, MyConnectorOptionsValidator>(
MyConnectorOptions.SectionName);
// Register the connector plugin
services.AddSingleton<IConnectorPlugin, MyConnectorPlugin>();
return services;
}
}