#region ========================================================================= USING ===================================================================================== using Nemera.Infrastructure.Core.Plugins; using Nemera.Plugins.Contracts.Core.Plugins; using System.Collections.Generic; #endregion namespace Nemera.Infrastructure.Common.Models.DTO.Plugins; /// /// Data transfer object for the result of loading the plugins from the plugins directory. /// /// The plugins that were loaded successfully. /// /// The load contexts of the successfully loaded plugins. The contexts are kept referenced here for the lifetime of the host, because a collectible /// load context is only kept alive by a direct reference to the context object itself, and the garbage collector would otherwise unload the plugin assemblies mid-request, /// when a lazily resolved dependency is first used. /// /// The errors that occurred while loading the plugins. internal sealed record PluginLoadResultDto( IReadOnlyList Plugins, IReadOnlyList LoadContexts, IReadOnlyList Errors );