1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
| namespace Moli.Desktop.Plugins;
|
| /// <summary>Strongly typed plugin identifier.</summary>
| public readonly record struct PluginId(string Value)
| {
| public override string ToString() => Value;
| }
|
| /// <summary>Supported plugin entry category.</summary>
| public enum PluginType
| {
| Wallpaper,
| Widget
| }
|
| /// <summary>Lifecycle state persisted for a plugin.</summary>
| public enum PluginState
| {
| Discovered,
| Loaded,
| Running,
| Paused,
| Enabled,
| Disabled,
| Invalid,
| Error,
| Removed
| }
|
| public sealed record PluginRuntimeState
| {
| public required PluginId Id { get; init; }
| public required string Name { get; init; }
| public required PluginType Type { get; init; }
| public required PluginState State { get; init; }
| public string? ErrorCode { get; init; }
| public string? Entry { get; init; }
| }
|
|