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

namespace StellaOps.Feedser.Source.Distro.Debian;

public sealed class DebianConnectorPlugin : IConnectorPlugin
{
    public const string SourceName = "distro-debian";

    public string Name => SourceName;

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

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