using System.Runtime.Loader; using AcDream.Plugin.Abstractions; namespace AcDream.Core.Plugins; /// /// Outcome of a plugin load attempt. /// On success, is the instantiated plugin, /// owns its assembly, and is null. /// On failure, and are null and /// describes what went wrong. /// public sealed record LoadedPlugin( PluginManifest Manifest, IAcDreamPlugin? Plugin, AssemblyLoadContext? LoadContext, Exception? Error) { public bool Success => Plugin is not null && Error is null; }