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

namespace StellaOps.Feedser.Source.Jvn;

public sealed class JvnConnectorPlugin : IConnectorPlugin
{
    public string Name => SourceName;

    public static string SourceName => "jvn";

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

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