|
@@ -2,6 +2,7 @@
|
|
using System;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
+using System.Linq;
|
|
|
|
|
|
namespace InABox.Core
|
|
namespace InABox.Core
|
|
{
|
|
{
|
|
@@ -19,6 +20,9 @@ namespace InABox.Core
|
|
FormData = new Dictionary<string, object?>();
|
|
FormData = new Dictionary<string, object?>();
|
|
BlobData = new Dictionary<string, object?>();
|
|
BlobData = new Dictionary<string, object?>();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public int Count() => FormData.Count();
|
|
|
|
+
|
|
|
|
|
|
public void AddValue(string key, object? value)
|
|
public void AddValue(string key, object? value)
|
|
{
|
|
{
|
|
@@ -88,6 +92,11 @@ namespace InABox.Core
|
|
{
|
|
{
|
|
public Dictionary<string, object?> FormData { get; private set; } = new Dictionary<string, object?>();
|
|
public Dictionary<string, object?> FormData { get; private set; } = new Dictionary<string, object?>();
|
|
|
|
|
|
|
|
+ public DFLoadStorage() : this(new Dictionary<string, object?>(), null)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
public DFLoadStorage(Dictionary<string, object?> formData, Dictionary<string, object?>? blobData)
|
|
public DFLoadStorage(Dictionary<string, object?> formData, Dictionary<string, object?>? blobData)
|
|
{
|
|
{
|
|
Load(formData, blobData);
|
|
Load(formData, blobData);
|
|
@@ -115,6 +124,10 @@ namespace InABox.Core
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public void Clear() => FormData.Clear();
|
|
|
|
+
|
|
|
|
+ public int Count() => FormData.Count();
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Get a value from the storage, returning <see langword="null"/> if the key does not exist.
|
|
/// Get a value from the storage, returning <see langword="null"/> if the key does not exist.
|