using System.Text.Json.Nodes; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; namespace XFEWorkflow.Desktop.Sdk; /// Created on the UI dispatcher. Navigation retains the page; disabling, uninstalling and application exit dispose it. public interface IWorkflowPage : IAsyncDisposable { FrameworkElement View { get; } ValueTask InitializeAsync(IPluginPageContext context, CancellationToken cancellationToken); } public interface IPluginPageContext { string PluginId { get; } string PluginDirectory { get; } string DataDirectory { get; } JsonObject Settings { get; } IReadOnlyList CredentialReferences { get; } string GetCredential(string reference); Task SetCredentialAsync(string reference, string value, CancellationToken cancellationToken = default); Task SaveSettingsAsync(JsonObject settings, CancellationToken cancellationToken = default); void InitializeWebView(WebView2 webView); FrameworkElement CreateVerticalSplitter(string key, double fallback, double minimum, double maximum, Func getSize, Action setSize, Func available); void Log(string message, bool error = false); string Redact(string text); }