diff --git a/Hyperbar.Windows.Contextual/ContextualWidgetBuilder.cs b/Hyperbar.Windows.Contextual/ContextualWidgetProvider.cs similarity index 83% rename from Hyperbar.Windows.Contextual/ContextualWidgetBuilder.cs rename to Hyperbar.Windows.Contextual/ContextualWidgetProvider.cs index 0ee5d27..dc33a26 100644 --- a/Hyperbar.Windows.Contextual/ContextualWidgetBuilder.cs +++ b/Hyperbar.Windows.Contextual/ContextualWidgetProvider.cs @@ -3,8 +3,8 @@ using Microsoft.Extensions.DependencyInjection; namespace Hyperbar.Widget.Contextual; -public class ContextualWidgetBuilder : - IWidgetBuilder +public class ContextualWidgetProvider : + IWidgetProvider { public void Create(IServiceCollection services) => services .AddConfiguration() diff --git a/Hyperbar.Windows.Controls/Hyperbar.Windows.Controls.csproj b/Hyperbar.Windows.Controls/Hyperbar.Windows.Controls.csproj index 8258829..1e29107 100644 --- a/Hyperbar.Windows.Controls/Hyperbar.Windows.Controls.csproj +++ b/Hyperbar.Windows.Controls/Hyperbar.Windows.Controls.csproj @@ -2,7 +2,6 @@ net8.0-windows10.0.19041.0 10.0.17763.0 - Hyperbar.Windows.Controls win10-x86;win10-x64;win10-arm64 true true diff --git a/Hyperbar.Windows.Primary/IPrimaryCommand.cs b/Hyperbar.Windows.Primary/IPrimaryCommand.cs deleted file mode 100644 index 245bc25..0000000 --- a/Hyperbar.Windows.Primary/IPrimaryCommand.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace Hyperbar.Windows.Primary; - -public interface IPrimaryCommand -{ -} \ No newline at end of file diff --git a/Hyperbar.Windows.Primary/IPrimaryCommandConfiguration.cs b/Hyperbar.Windows.Primary/IPrimaryCommandConfiguration.cs new file mode 100644 index 0000000..859486a --- /dev/null +++ b/Hyperbar.Windows.Primary/IPrimaryCommandConfiguration.cs @@ -0,0 +1,5 @@ +namespace Hyperbar.Windows.Primary; + +public interface IPrimaryCommandConfiguration +{ +} \ No newline at end of file diff --git a/Hyperbar.Windows.Primary/KeyAcceleratorCommand.cs b/Hyperbar.Windows.Primary/KeyAcceleratorCommandConfiguration.cs similarity index 66% rename from Hyperbar.Windows.Primary/KeyAcceleratorCommand.cs rename to Hyperbar.Windows.Primary/KeyAcceleratorCommandConfiguration.cs index d8bb87e..0241bbf 100644 --- a/Hyperbar.Windows.Primary/KeyAcceleratorCommand.cs +++ b/Hyperbar.Windows.Primary/KeyAcceleratorCommandConfiguration.cs @@ -1,7 +1,7 @@ namespace Hyperbar.Windows.Primary; -public class KeyAcceleratorCommand : - IPrimaryCommand +public class KeyAcceleratorCommandConfiguration : + IPrimaryCommandConfiguration { public string? Icon { get; set; } diff --git a/Hyperbar.Windows.Primary/PrimaryWidgetConfiguration.cs b/Hyperbar.Windows.Primary/PrimaryWidgetConfiguration.cs index 16b454c..44a1b03 100644 --- a/Hyperbar.Windows.Primary/PrimaryWidgetConfiguration.cs +++ b/Hyperbar.Windows.Primary/PrimaryWidgetConfiguration.cs @@ -1,6 +1,6 @@ namespace Hyperbar.Windows.Primary; public class PrimaryWidgetConfiguration : - List + List { } \ No newline at end of file diff --git a/Hyperbar.Windows.Primary/PrimaryWidgetBuilder.cs b/Hyperbar.Windows.Primary/PrimaryWidgetProvider.cs similarity index 83% rename from Hyperbar.Windows.Primary/PrimaryWidgetBuilder.cs rename to Hyperbar.Windows.Primary/PrimaryWidgetProvider.cs index 9cdae6c..d0451ee 100644 --- a/Hyperbar.Windows.Primary/PrimaryWidgetBuilder.cs +++ b/Hyperbar.Windows.Primary/PrimaryWidgetProvider.cs @@ -3,8 +3,8 @@ using Microsoft.Extensions.DependencyInjection; namespace Hyperbar.Windows.Primary; -public class PrimaryWidgetBuilder : - IWidgetBuilder +public class PrimaryWidgetProvider : + IWidgetProvider { public void Create(IServiceCollection services) => services.AddConfiguration() .AddWidgetTemplate(); diff --git a/Hyperbar.Windows.Primary/PrimaryWidgetViewModel.cs b/Hyperbar.Windows.Primary/PrimaryWidgetViewModel.cs index 76a4a0c..cde7adf 100644 --- a/Hyperbar.Windows.Primary/PrimaryWidgetViewModel.cs +++ b/Hyperbar.Windows.Primary/PrimaryWidgetViewModel.cs @@ -4,15 +4,13 @@ public class PrimaryWidgetViewModel : WidgetViewModelBase { public PrimaryWidgetViewModel(ITemplateFactory templateFactory, - IServiceFactory serviceFactory) : base(templateFactory, serviceFactory) + IServiceFactory serviceFactory, + IMediator mediator) : base(templateFactory, serviceFactory) { - ; + Add("Start", new Action(() => mediator.Send(new KeyAcceleratorCommand(VirtualKey.LeftWindows)))); - Add("test 1", new Action(() => - { - })); - Add("test 2", new Action(() => { })); - Add("test 4", new Action(() => { })); - Add("test 5", new Action(() => { })); + //Add("test 2", new Action(() => { })); + //Add("test 4", new Action(() => { })); + //Add("test 5", new Action(() => { })); } } \ No newline at end of file diff --git a/Hyperbar.Windows.Win32/Extensions/HwndExtensions.cs b/Hyperbar.Windows.Win32/HwndExtensions.cs similarity index 100% rename from Hyperbar.Windows.Win32/Extensions/HwndExtensions.cs rename to Hyperbar.Windows.Win32/HwndExtensions.cs diff --git a/Hyperbar.Windows.Win32/Hyperbar.Windows.Win32.csproj b/Hyperbar.Windows.Win32/Hyperbar.Windows.Win32.csproj index 13db1f4..1aa5ff3 100644 --- a/Hyperbar.Windows.Win32/Hyperbar.Windows.Win32.csproj +++ b/Hyperbar.Windows.Win32/Hyperbar.Windows.Win32.csproj @@ -2,7 +2,6 @@ net8.0-windows10.0.19041.0 10.0.17763.0 - Hyperbar.Desktop.Win32 win10-x86;win10-x64;win10-arm64 true true diff --git a/Hyperbar.Windows.Win32/IVirtualKeyboard.cs b/Hyperbar.Windows.Win32/IVirtualKeyboard.cs new file mode 100644 index 0000000..931f3e2 --- /dev/null +++ b/Hyperbar.Windows.Win32/IVirtualKeyboard.cs @@ -0,0 +1,7 @@ +namespace Hyperbar.Windows.Win32 +{ + public interface IVirtualKeyboard + { + void Send(int key, params int[] modifierKeys); + } +} \ No newline at end of file diff --git a/Hyperbar.Windows.Win32/Internals/PInvoke.cs b/Hyperbar.Windows.Win32/PInvoke.cs similarity index 100% rename from Hyperbar.Windows.Win32/Internals/PInvoke.cs rename to Hyperbar.Windows.Win32/PInvoke.cs diff --git a/Hyperbar.Windows.Win32/KeyIntrop.cs b/Hyperbar.Windows.Win32/VirtualKeyboard.cs similarity index 55% rename from Hyperbar.Windows.Win32/KeyIntrop.cs rename to Hyperbar.Windows.Win32/VirtualKeyboard.cs index eaa6164..843a0e5 100644 --- a/Hyperbar.Windows.Win32/KeyIntrop.cs +++ b/Hyperbar.Windows.Win32/VirtualKeyboard.cs @@ -1,34 +1,35 @@ using System; using System.Linq; using System.Runtime.InteropServices; -using Windows.System; using Windows.Win32; using Windows.Win32.UI.KeyboardAndMouseInput; namespace Hyperbar.Windows.Win32; -public class KeyInterop +public class VirtualKeyboard : + IVirtualKeyboard { - private static readonly VirtualKey[] extendedKeys = [ - VirtualKey.Menu, - VirtualKey.LeftMenu, - VirtualKey.NumberKeyLock, - VirtualKey.Insert, - VirtualKey.Delete, - VirtualKey.Home, - VirtualKey.End, - VirtualKey.Up, - VirtualKey.Down, - VirtualKey.Left, - VirtualKey.Right, - VirtualKey.Application, - VirtualKey.RightWindows, - VirtualKey.LeftWindows]; + private readonly int[] extendedKeys = [ + 165, // RightMenu + 164, // LeftMenu + 144, // NumberKeyLock + 45, // Insert + 46, // Delete + 36, // Home + 35, // End + 36, // Up, + 40, // Down, + 37, // Left + 39, // Right, + 93, // Application, + 92, // RightWindows + 91 // LeftWindows + ]; - public static void Send(VirtualKey key, - params VirtualKey[] modifierKeys) + public void Send(int key, + params int[] modifierKeys) { - foreach (VirtualKey modiferKey in modifierKeys) + foreach (int modiferKey in modifierKeys) { Press(modiferKey); } @@ -36,17 +37,17 @@ public class KeyInterop Press(key); Release(key); - foreach (VirtualKey modifierKey in modifierKeys.Reverse()) + foreach (int modifierKey in modifierKeys.Reverse()) { Release(modifierKey); } } - private static void Press(VirtualKey key) => Send(key, true); + private void Press(int key) => Send(key, true); - private static void Release(VirtualKey key) => Send(key, false); + private void Release(int key) => Send(key, false); - private static unsafe void Send(VirtualKey key, + private unsafe void Send(int key, bool pressed) { INPUT input = new() @@ -69,7 +70,7 @@ public class KeyInterop flags |= KEYBD_EVENT_FLAGS.KEYEVENTF_KEYUP; } - if (extendedKeys.Contains(key)) + if (extendedKeys.Contains((int)key)) { flags |= KEYBD_EVENT_FLAGS.KEYEVENTF_EXTENDEDKEY; } diff --git a/Hyperbar.Windows.Win32/Extensions/WindowExtensions.cs b/Hyperbar.Windows.Win32/WindowExtensions.cs similarity index 100% rename from Hyperbar.Windows.Win32/Extensions/WindowExtensions.cs rename to Hyperbar.Windows.Win32/WindowExtensions.cs diff --git a/Hyperbar.Windows.Win32/Extensions/WindowPlacement.cs b/Hyperbar.Windows.Win32/WindowPlacement.cs similarity index 100% rename from Hyperbar.Windows.Win32/Extensions/WindowPlacement.cs rename to Hyperbar.Windows.Win32/WindowPlacement.cs diff --git a/Hyperbar.Windows.Win32/Extensions/WindowStyle.cs b/Hyperbar.Windows.Win32/WindowStyle.cs similarity index 100% rename from Hyperbar.Windows.Win32/Extensions/WindowStyle.cs rename to Hyperbar.Windows.Win32/WindowStyle.cs diff --git a/Hyperbar.Windows/App.xaml.cs b/Hyperbar.Windows/App.xaml.cs index 0358633..2a4bb3e 100644 --- a/Hyperbar.Windows/App.xaml.cs +++ b/Hyperbar.Windows/App.xaml.cs @@ -40,8 +40,8 @@ public partial class App : services.AddTransient(); services.AddContentTemplate(); - services.AddWidget(); - services.AddWidget(); + services.AddWidgetProvider(); + services.AddWidgetProvider(); services.AddTransient(provider => { diff --git a/Hyperbar.Windows/Commands/KeyAcceleratorCommandHandler.cs b/Hyperbar.Windows/Commands/KeyAcceleratorCommandHandler.cs new file mode 100644 index 0000000..a7e0507 --- /dev/null +++ b/Hyperbar.Windows/Commands/KeyAcceleratorCommandHandler.cs @@ -0,0 +1,13 @@ +using Hyperbar.Windows.Win32; + +namespace Hyperbar.Windows; + +public class KeyAcceleratorCommandHandler(IVirtualKeyboard virtualKeyboard) : + ICommandHandler +{ + public ValueTask Handle(KeyAcceleratorCommand command, + CancellationToken cancellationToken) + { virtualKeyboard.Send((int)command.Key); + return default; + } +} diff --git a/Hyperbar.Windows/Hyperbar.Windows.csproj b/Hyperbar.Windows/Hyperbar.Windows.csproj index a66a4fb..23a7b82 100644 --- a/Hyperbar.Windows/Hyperbar.Windows.csproj +++ b/Hyperbar.Windows/Hyperbar.Windows.csproj @@ -3,7 +3,6 @@ WinExe net8.0-windows10.0.19041.0 10.0.17763.0 - Hyperbar.Windows app.manifest x86;x64;ARM64 win-x86;win-x64;win-arm64 diff --git a/Hyperbar.Windows/Lifecycles/IServiceCollectionExtensions.cs b/Hyperbar.Windows/Lifecycles/IServiceCollectionExtensions.cs index a5b2c36..7c0cbf2 100644 --- a/Hyperbar.Windows/Lifecycles/IServiceCollectionExtensions.cs +++ b/Hyperbar.Windows/Lifecycles/IServiceCollectionExtensions.cs @@ -1,4 +1,5 @@ using Hyperbar.Extensions; +using Hyperbar.Windows.Win32; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -6,17 +7,21 @@ namespace Hyperbar.Windows { public static class IServiceCollectionExtensions { - public static IServiceCollection AddWidget(this IServiceCollection services) - where TCommandBuilder : - IWidgetBuilder, new() + public static IServiceCollection AddWidgetProvider(this IServiceCollection services) + where TWidgetProvider : + IWidgetProvider, new() { - TCommandBuilder builder = new(); + TWidgetProvider builder = new(); IHost? host = new HostBuilder() .ConfigureServices(isolatedServices => { - isolatedServices.AddSingleton(provider => new ServiceFactory((type, parameters) => ActivatorUtilities.CreateInstance(provider, type, parameters!))); + + isolatedServices.AddSingleton(); + + isolatedServices.AddSingleton(); + isolatedServices.AddHandler(); isolatedServices.AddTransient(); isolatedServices.AddContentTemplate(); diff --git a/Hyperbar.Windows/Mediators/KeyAcceleratorCommandHandler.cs b/Hyperbar.Windows/Mediators/KeyAcceleratorCommandHandler.cs deleted file mode 100644 index 49d51d0..0000000 --- a/Hyperbar.Windows/Mediators/KeyAcceleratorCommandHandler.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Hyperbar.Windows; - -public class KeyAcceleratorCommandHandler : - ICommandHandler -{ - public ValueTask Handle(KeyAcceleratorCommand command, - CancellationToken cancellationToken) - { - throw new NotImplementedException(); - } -} diff --git a/Hyperbar/Commands/KeyAcceleratorCommand.cs b/Hyperbar/Commands/KeyAcceleratorCommand.cs new file mode 100644 index 0000000..e01be53 --- /dev/null +++ b/Hyperbar/Commands/KeyAcceleratorCommand.cs @@ -0,0 +1,5 @@ +namespace Hyperbar; + +public record KeyAcceleratorCommand(VirtualKey Key, + VirtualKey[]? Modifiers = null) : + ICommand; diff --git a/Hyperbar/Commands/VirtualKey.cs b/Hyperbar/Commands/VirtualKey.cs new file mode 100644 index 0000000..d026703 --- /dev/null +++ b/Hyperbar/Commands/VirtualKey.cs @@ -0,0 +1,175 @@ +namespace Hyperbar; + +public enum VirtualKey +{ + None = 0, + LeftButton = 1, + RightButton = 2, + Cancel = 3, + MiddleButton = 4, + XButton1 = 5, + XButton2 = 6, + Back = 8, + Tab = 9, + Clear = 12, + Enter = 13, + Shift = 16, + Control = 17, + Menu = 18, + Pause = 19, + CapitalLock = 20, + Kana = 21, + Hangul = 21, + Junja = 23, + Final = 24, + Hanja = 25, + Kanji = 25, + Escape = 27, + Convert = 28, + NonConvert = 29, + Accept = 30, + ModeChange = 31, + Space = 32, + PageUp = 33, + PageDown = 34, + End = 35, + Home = 36, + Left = 37, + Up = 38, + Right = 39, + Down = 40, + Select = 41, + Print = 42, + Execute = 43, + Snapshot = 44, + Insert = 45, + Delete = 46, + Help = 47, + Number0 = 48, + Number1 = 49, + Number2 = 50, + Number3 = 51, + Number4 = 52, + Number5 = 53, + Number6 = 54, + Number7 = 55, + Number8 = 56, + Number9 = 57, + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + LeftWindows = 91, + RightWindows = 92, + Application = 93, + Sleep = 95, + NumberPad0 = 96, + NumberPad1 = 97, + NumberPad2 = 98, + NumberPad3 = 99, + NumberPad4 = 100, + NumberPad5 = 101, + NumberPad6 = 102, + NumberPad7 = 103, + NumberPad8 = 104, + NumberPad9 = 105, + Multiply = 106, + Add = 107, + Separator = 108, + Subtract = 109, + Decimal = 110, + Divide = 111, + F1 = 112, + F2 = 113, + F3 = 114, + F4 = 115, + F5 = 116, + F6 = 117, + F7 = 118, + F8 = 119, + F9 = 120, + F10 = 121, + F11 = 122, + F12 = 123, + F13 = 124, + F14 = 125, + F15 = 126, + F16 = 127, + F17 = 128, + F18 = 129, + F19 = 130, + F20 = 131, + F21 = 132, + F22 = 133, + F23 = 134, + F24 = 135, + NavigationView = 136, + NavigationMenu = 137, + NavigationUp = 138, + NavigationDown = 139, + NavigationLeft = 140, + NavigationRight = 141, + NavigationAccept = 142, + NavigationCancel = 143, + NumberKeyLock = 144, + Scroll = 145, + LeftShift = 160, + RightShift = 161, + LeftControl = 162, + RightControl = 163, + LeftMenu = 164, + RightMenu = 165, + GoBack = 166, + GoForward = 167, + Refresh = 168, + Stop = 169, + Search = 170, + Favorites = 171, + GoHome = 172, + GamepadA = 195, + GamepadB = 196, + GamepadX = 197, + GamepadY = 198, + GamepadRightShoulder = 199, + GamepadLeftShoulder = 200, + GamepadLeftTrigger = 201, + GamepadRightTrigger = 202, + GamepadDPadUp = 203, + GamepadDPadDown = 204, + GamepadDPadLeft = 205, + GamepadDPadRight = 206, + GamepadMenu = 207, + GamepadView = 208, + GamepadLeftThumbstickButton = 209, + GamepadRightThumbstickButton = 210, + GamepadLeftThumbstickUp = 211, + GamepadLeftThumbstickDown = 212, + GamepadLeftThumbstickRight = 213, + GamepadLeftThumbstickLeft = 214, + GamepadRightThumbstickUp = 215, + GamepadRightThumbstickDown = 216, + GamepadRightThumbstickRight = 217, + GamepadRightThumbstickLeft = 218 +} diff --git a/Hyperbar/Mediators/CommandClassHandlerWrapper.cs b/Hyperbar/Mediators/CommandClassHandlerWrapper.cs index 58bfe0e..2049992 100644 --- a/Hyperbar/Mediators/CommandClassHandlerWrapper.cs +++ b/Hyperbar/Mediators/CommandClassHandlerWrapper.cs @@ -16,6 +16,7 @@ public class CommandClassHandlerWrapper { MessageHandlerDelegate handlerCopy = handler; IPipelineBehavior pipelineCopy = pipeline; + handler = (TRequest message, CancellationToken cancellationToken) => pipelineCopy.Handle(message, handlerCopy, cancellationToken); } diff --git a/Hyperbar/Mediators/IMediator.cs b/Hyperbar/Mediators/IMediator.cs index 197cf61..5c3eb7f 100644 --- a/Hyperbar/Mediators/IMediator.cs +++ b/Hyperbar/Mediators/IMediator.cs @@ -2,21 +2,23 @@ public interface IMediator { - ValueTask Publish(TNotification notification, + ValueTask PublishAsync(TNotification notification, CancellationToken cancellationToken = default) where TNotification : INotification; - ValueTask Send(IRequest request, + void Send(ICommand command); + + ValueTask SendAsync(IRequest request, CancellationToken cancellationToken = default); - ValueTask Send(ICommand command, + ValueTask SendAsync(ICommand command, CancellationToken cancellationToken = default); - ValueTask Send(IQuery query, + ValueTask SendAsync(IQuery query, CancellationToken cancellationToken = default); - ValueTask Send(object message, CancellationToken + ValueTask SendAsync(object message, CancellationToken cancellationToken = default); void Subscribe(object subscriber); diff --git a/Hyperbar/Mediators/KeyAcceleratorCommand.cs b/Hyperbar/Mediators/KeyAcceleratorCommand.cs deleted file mode 100644 index 58a0f33..0000000 --- a/Hyperbar/Mediators/KeyAcceleratorCommand.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace Hyperbar; - -public record KeyAcceleratorCommand(string Key, - string[]? Modifiers = null) : - ICommand; diff --git a/Hyperbar/Mediators/Mediator.cs b/Hyperbar/Mediators/Mediator.cs index 5b95f0c..c58f399 100644 --- a/Hyperbar/Mediators/Mediator.cs +++ b/Hyperbar/Mediators/Mediator.cs @@ -8,7 +8,7 @@ public class Mediator(IServiceProvider provider) : { private readonly ConditionalWeakTable handlers = []; - public ValueTask Publish(TNotification notification, + public ValueTask PublishAsync(TNotification notification, CancellationToken cancellationToken = default) where TNotification : INotification @@ -36,7 +36,7 @@ public class Mediator(IServiceProvider provider) : return default; } - public ValueTask Send(IRequest request, + public ValueTask SendAsync(IRequest request, CancellationToken cancellationToken = default) { dynamic? handler = provider.GetService(typeof(RequestClassHandlerWrapper<,>) @@ -50,7 +50,7 @@ public class Mediator(IServiceProvider provider) : return default; } - public ValueTask Send(ICommand command, + public ValueTask SendAsync(ICommand command, CancellationToken cancellationToken = default) { dynamic? handler = provider.GetService(typeof(CommandClassHandlerWrapper<,>) @@ -64,7 +64,18 @@ public class Mediator(IServiceProvider provider) : return default; } - public ValueTask Send(IQuery query, + public void Send(ICommand command) + { + dynamic? handler = provider.GetService(typeof(CommandClassHandlerWrapper<,>) + .MakeGenericType(command.GetType(), typeof(TResponse))); + + if (handler is not null) + { + _ = handler.Handle((dynamic)command, default(CancellationToken)); + } + } + + public ValueTask SendAsync(IQuery query, CancellationToken cancellationToken = default) { dynamic? handler = provider.GetService(typeof(QueryClassHandlerWrapper<,>) @@ -78,7 +89,7 @@ public class Mediator(IServiceProvider provider) : return default; } - public ValueTask Send(object message, + public ValueTask SendAsync(object message, CancellationToken cancellationToken = default) { if (message.GetType().GetInterface(typeof(IRequest<>).Name) is { } requestType) diff --git a/Hyperbar/Mediators/QueryClassHandlerWrapper.cs b/Hyperbar/Mediators/QueryClassHandlerWrapper.cs index e96165f..6eb6edc 100644 --- a/Hyperbar/Mediators/QueryClassHandlerWrapper.cs +++ b/Hyperbar/Mediators/QueryClassHandlerWrapper.cs @@ -16,6 +16,7 @@ public class QueryClassHandlerWrapper { MessageHandlerDelegate handlerCopy = handler; IPipelineBehavior pipelineCopy = pipeline; + handler = (TRequest message, CancellationToken cancellationToken) => pipelineCopy.Handle(message, handlerCopy, cancellationToken); } diff --git a/Hyperbar/Lifecycles/IWidgetContext.cs b/Hyperbar/Widgets/IWidgetContext.cs similarity index 100% rename from Hyperbar/Lifecycles/IWidgetContext.cs rename to Hyperbar/Widgets/IWidgetContext.cs diff --git a/Hyperbar/Lifecycles/IWidgetBuilder.cs b/Hyperbar/Widgets/IWidgetProvider.cs similarity index 78% rename from Hyperbar/Lifecycles/IWidgetBuilder.cs rename to Hyperbar/Widgets/IWidgetProvider.cs index 7365e98..a8338aa 100644 --- a/Hyperbar/Lifecycles/IWidgetBuilder.cs +++ b/Hyperbar/Widgets/IWidgetProvider.cs @@ -2,7 +2,7 @@ namespace Hyperbar; -public interface IWidgetBuilder +public interface IWidgetProvider { void Create(IServiceCollection services); } \ No newline at end of file diff --git a/Hyperbar/Lifecycles/WidgetContext.cs b/Hyperbar/Widgets/WidgetContext.cs similarity index 100% rename from Hyperbar/Lifecycles/WidgetContext.cs rename to Hyperbar/Widgets/WidgetContext.cs