fix(plugins): close LA5 host lifecycle review
This commit is contained in:
parent
95f4be94db
commit
fbe9c8a288
25 changed files with 1043 additions and 120 deletions
|
|
@ -7,14 +7,17 @@ namespace AcDream.Core.Plugins;
|
|||
/// Outcome of a plugin load attempt.
|
||||
/// <para>On success, <see cref="Plugin"/> is the instantiated plugin, <see cref="LoadContext"/>
|
||||
/// owns its assembly, and <see cref="Error"/> is null.</para>
|
||||
/// <para>On failure, <see cref="Plugin"/> and <see cref="LoadContext"/> are null and
|
||||
/// <see cref="Error"/> describes what went wrong.</para>
|
||||
/// <para>On failure, <see cref="Plugin"/> and <see cref="LoadContext"/> are null,
|
||||
/// <see cref="Error"/> describes what went wrong, and
|
||||
/// <see cref="ReleasedLoadContext"/> weakly observes any collectible context
|
||||
/// that was already released during rollback.</para>
|
||||
/// </summary>
|
||||
public sealed record LoadedPlugin(
|
||||
PluginManifest Manifest,
|
||||
IAcDreamPlugin? Plugin,
|
||||
AssemblyLoadContext? LoadContext,
|
||||
Exception? Error)
|
||||
Exception? Error,
|
||||
WeakReference? ReleasedLoadContext = null)
|
||||
{
|
||||
public bool Success => Plugin is not null && Error is null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue