From 85a5ee078d827def32c1c3a307ca394f4c252747 Mon Sep 17 00:00:00 2001 From: TheXamlGuy Date: Thu, 6 Jun 2024 20:42:24 +0100 Subject: [PATCH] It it now possible to create/edit item contents --- Toolkit.Foundation/DecoratorService.cs | 4 ++-- Toolkit.Foundation/IDecoratorService.cs | 4 ++-- Toolkit.Foundation/Query.cs | 10 ++++++++++ Toolkit.Foundation/QueryEventArgs.cs | 3 +++ Toolkit.Foundation/RequestEventArgs.cs | 2 +- 5 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 Toolkit.Foundation/Query.cs create mode 100644 Toolkit.Foundation/QueryEventArgs.cs diff --git a/Toolkit.Foundation/DecoratorService.cs b/Toolkit.Foundation/DecoratorService.cs index f3fcfb7..0958361 100644 --- a/Toolkit.Foundation/DecoratorService.cs +++ b/Toolkit.Foundation/DecoratorService.cs @@ -3,7 +3,7 @@ public class DecoratorService : IDecoratorService { - public T? Value { get; private set; } + public T? Service { get; private set; } - public void Set(T value) => Value = value; + public void Set(T value) => Service = value; } \ No newline at end of file diff --git a/Toolkit.Foundation/IDecoratorService.cs b/Toolkit.Foundation/IDecoratorService.cs index 4205fb3..b558d8d 100644 --- a/Toolkit.Foundation/IDecoratorService.cs +++ b/Toolkit.Foundation/IDecoratorService.cs @@ -2,7 +2,7 @@ public interface IDecoratorService { - T? Value { get; } + T? Service { get; } - void Set(T value); + void Set(T service); } \ No newline at end of file diff --git a/Toolkit.Foundation/Query.cs b/Toolkit.Foundation/Query.cs new file mode 100644 index 0000000..def084a --- /dev/null +++ b/Toolkit.Foundation/Query.cs @@ -0,0 +1,10 @@ +namespace Toolkit.Foundation; + +public class Query +{ + public static QueryEventArgs As(TValue value) => + new(value); + + public static QueryEventArgs As() where TValue : new() => + new(new TValue()); +} \ No newline at end of file diff --git a/Toolkit.Foundation/QueryEventArgs.cs b/Toolkit.Foundation/QueryEventArgs.cs new file mode 100644 index 0000000..91a3852 --- /dev/null +++ b/Toolkit.Foundation/QueryEventArgs.cs @@ -0,0 +1,3 @@ +namespace Toolkit.Foundation; + +public record QueryEventArgs(TValue Value); \ No newline at end of file diff --git a/Toolkit.Foundation/RequestEventArgs.cs b/Toolkit.Foundation/RequestEventArgs.cs index b625de6..109508e 100644 --- a/Toolkit.Foundation/RequestEventArgs.cs +++ b/Toolkit.Foundation/RequestEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record RequestEventArgs(TValue Value); \ No newline at end of file +public record RequestEventArgs(TValue Value);