2026-03-09 12:27:33 +08:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace LanMountainDesktop.PluginSdk;
|
|
|
|
|
|
|
|
|
|
public interface IPluginContext
|
|
|
|
|
{
|
|
|
|
|
PluginManifest Manifest { get; }
|
|
|
|
|
|
|
|
|
|
string PluginDirectory { get; }
|
|
|
|
|
|
|
|
|
|
string DataDirectory { get; }
|
|
|
|
|
|
|
|
|
|
IServiceProvider Services { get; }
|
|
|
|
|
|
|
|
|
|
IReadOnlyDictionary<string, object?> Properties { get; }
|
|
|
|
|
|
|
|
|
|
T? GetService<T>();
|
|
|
|
|
|
|
|
|
|
bool TryGetProperty<T>(string key, out T? value);
|
|
|
|
|
|
2026-03-09 14:14:50 +08:00
|
|
|
void RegisterService<TService>(TService service)
|
|
|
|
|
where TService : class;
|
|
|
|
|
|
2026-03-09 12:27:33 +08:00
|
|
|
void RegisterSettingsPage(PluginSettingsPageRegistration registration);
|
|
|
|
|
|
|
|
|
|
void RegisterDesktopComponent(PluginDesktopComponentRegistration registration);
|
|
|
|
|
}
|