using System.Reflection;

namespace StellaOps.Plugin.Hosting;

public sealed class PluginAssembly
{
    internal PluginAssembly(string assemblyPath, Assembly assembly, PluginLoadContext loadContext)
    {
        AssemblyPath = assemblyPath;
        Assembly = assembly;
        LoadContext = loadContext;
    }

    public string AssemblyPath { get; }

    public Assembly Assembly { get; }

    internal PluginLoadContext LoadContext { get; }

    public override string ToString() => Assembly.FullName ?? AssemblyPath;
}