Bug fixes
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public record Activate
|
||||
{
|
||||
public static ActivateEventArgs<TSender> As<TSender>(TSender sender) => new(sender);
|
||||
|
||||
public static ActivateEventArgs<TSender> As<TSender>() where TSender : new() => new(new TSender());
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public record ActivateEventArgs<TSender>(TSender? Sender = default);
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public record Close
|
||||
{
|
||||
public static CloseEventArgs<TSender> As<TSender>(TSender sender) => new(sender);
|
||||
|
||||
public static CloseEventArgs<TSender> As<TSender>() where TSender : new() => new(new TSender());
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public record CloseEventArgs<TSender>(TSender? Sender = default);
|
||||
@@ -51,7 +51,6 @@ public class ComponentBuilder :
|
||||
where TConfiguration : ComponentConfiguration, new()
|
||||
{
|
||||
TConfiguration configuration = new();
|
||||
|
||||
if (configurationDelegate is not null)
|
||||
{
|
||||
configurationDelegate(configuration);
|
||||
|
||||
@@ -74,14 +74,7 @@ public class ConfigurationSource<TConfiguration>(IConfigurationFile<TConfigurati
|
||||
string currentKey = segments[i];
|
||||
if (currentNode[currentKey] is null)
|
||||
{
|
||||
if (int.TryParse(segments[i + 1], out int _))
|
||||
{
|
||||
currentNode[currentKey] = new JsonArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
currentNode[currentKey] = new JsonObject();
|
||||
}
|
||||
currentNode[currentKey] = new JsonObject();
|
||||
}
|
||||
|
||||
currentNode = currentNode[currentKey];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
public class DecoratorService<T> :
|
||||
IDecoratorService<T>
|
||||
{
|
||||
public T? Service { get; private set; }
|
||||
public T? Value { get; private set; }
|
||||
|
||||
public void Set(T value) => Service = value;
|
||||
public void Set(T? value) => Value = value;
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public interface IDecoratorService<T>
|
||||
{
|
||||
T? Service { get; }
|
||||
T? Value { get; }
|
||||
|
||||
void Set(T service);
|
||||
void Set(T? value);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public record Open
|
||||
{
|
||||
public static OpenEventArgs<TSender> As<TSender>(TSender sender) => new(sender);
|
||||
|
||||
public static OpenEventArgs<TSender> As<TSender>() where TSender : new() => new(new TSender());
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public record OpenEventArgs<TSender>(TSender? Sender = default);
|
||||
Reference in New Issue
Block a user