Added artemis:// protocol support

This commit is contained in:
Robert committed 2023-09-24 20:10:21 +02:00
1 parent 9bf38f54a8
commit 0a5cc6955e
12 files changed
+162 -5

No files matched your search

@@ -0,0 +1,21 @@
using System.Threading.Tasks;
namespace Artemis.UI.Shared.Providers;
/// <summary>
/// Represents a provider associating with a custom protocol, e.g. artemis://
/// </summary>
public interface IProtocolProvider
{
/// <summary>
/// Associate Artemis with the provided custom protocol.
/// </summary>
/// <param name="protocol">The protocol to associate Artemis with.</param>
Task AssociateWithProtocol(string protocol);
/// <summary>
/// Disassociate Artemis with the provided custom protocol.
/// </summary>
/// <param name="protocol">The protocol to disassociate Artemis with.</param>
Task DisassociateWithProtocol(string protocol);
}
@@ -72,6 +72,7 @@ internal class Router : CorePropertyChanged, IRouter, IDisposable
/// <inheritdoc />
public async Task Navigate(string path, RouterNavigationOptions? options = null)
{
path = path.ToLower().Trim(' ', '/', '\\');
options ??= new RouterNavigationOptions();
// Routing takes place on the UI thread with processing heavy tasks offloaded by the router itself