Enhance dictionary safety with SafeGet, SafeSet, and SafeRemove methods. Adjust IWebContext and related tests to support nullable value types in dictionary operations. Refactor GetRequestParameter for clarity and consistency.

This commit is contained in:
2025-07-29 02:05:28 +02:00
parent bab8898841
commit b7b7c472af
12 changed files with 55 additions and 34 deletions

View File

@@ -22,7 +22,7 @@ public class FakeWebContext : IWebContext
public Dictionary<string, string?> RequestHeader { get; } = new();
public Dictionary<string, string> RequestCookies { get; } = new();
public Dictionary<string, string?> RequestCookies { get; } = new();
public Dictionary<string, string?> RequestQuery { get; } = new();
@@ -32,7 +32,7 @@ public class FakeWebContext : IWebContext
public long? RequestContentLength { get; }
public byte[]? RequestReadBin()
public byte[] RequestReadBin()
{
throw new NotImplementedException();
}