Wrap FluentAvalonia controls within same named classes allowing us to declare the xmlns namespace in our assembly

This commit is contained in:
Daniel Clark
2022-12-10 15:52:58 +00:00
parent 3d9a7e4438
commit 4f243eba2e
94 changed files with 121 additions and 85 deletions
@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
namespace Toolkit.Foundation
{
public interface IEventParameter
{
List<object> GetValues(EventArgs args);
}
}
@@ -0,0 +1,13 @@
namespace Toolkit.Foundation
{
public interface INavigationConfirmation
{
ValueTask<bool> CanConfirm();
}
public interface INavigated
{
ValueTask Navigated();
}
}
@@ -0,0 +1,9 @@
namespace Toolkit.Foundation
{
public interface INavigationRouteDescriptor
{
object Route { get; }
string? Name { get; }
}
}
@@ -0,0 +1,8 @@
using System.Collections.Generic;
namespace Toolkit.Foundation
{
public interface INavigationRouteDescriptorCollection : IList<INavigationRouteDescriptor>
{
}
}
@@ -0,0 +1,9 @@
namespace Toolkit.Foundation
{
public interface IParameter
{
string? Key { get; }
KeyValuePair<string, object>? GetValue(object target);
}
}
@@ -0,0 +1,29 @@
using Mediator;
namespace Toolkit.Foundation
{
public record Navigate : IRequest
{
public Navigate(string name, params object?[] parameters)
{
Name = name;
Parameters = parameters;
}
public Navigate(Type type, params object?[] parameters)
{
Type = type;
Parameters = parameters;
}
public Type? Type { get; }
public object? Route { get; init; }
public string? Name { get; }
public string? FriendlyName { get; init; }
public object?[] Parameters { get; }
}
}
@@ -0,0 +1,7 @@
using Mediator;
namespace Toolkit.Foundation
{
public record NavigateBack(object Route) : IRequest;
}
@@ -0,0 +1,6 @@
using Mediator;
namespace Toolkit.Foundation
{
public record NavigationRoute(string Name, object Route) : IRequest;
}
@@ -0,0 +1,15 @@
namespace Toolkit.Foundation
{
public record NavigationRouteDescriptor : INavigationRouteDescriptor
{
public NavigationRouteDescriptor(string name, object route)
{
Name = name;
Route = route;
}
public string Name { get; }
public object Route { get; }
}
}
@@ -0,0 +1,9 @@
namespace Toolkit.Foundation
{
public class NavigationRouteDescriptorCollection : List<INavigationRouteDescriptor>, INavigationRouteDescriptorCollection
{
public NavigationRouteDescriptorCollection(IEnumerable<INavigationRouteDescriptor> collection) : base(collection)
{
}
}
}