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

namespace StellaOps.Feedser.Source.Vndr.Vmware;

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

    public static string SourceName => "vmware";

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

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