using Microsoft.Extensions.DependencyInjection;
using StellaOps.Plugin;

namespace StellaOps.Feedser.Source.Ics.Cisa;

public sealed class IcsCisaConnectorPlugin : IConnectorPlugin
{
    public const string SourceName = "ics-cisa";

    public string Name => SourceName;

    public bool IsAvailable(IServiceProvider services) => services is not null;

    public IFeedConnector Create(IServiceProvider services)
    {
        ArgumentNullException.ThrowIfNull(services);
        return ActivatorUtilities.CreateInstance<IcsCisaConnector>(services);
    }
}
