We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc2f587 commit 24256ddCopy full SHA for 24256dd
src/EmbedIO/Sessions/LocalSessionManager.SessionImpl.cs
@@ -49,20 +49,23 @@ public bool IsEmpty
49
}
50
51
52
- public object this[string key]
+ public object? this[string key]
53
{
54
get
55
56
lock (_data)
57
58
- return _data[key];
+ return _data.TryGetValue(key, out var value) ? value : null;
59
60
61
set
62
63
64
65
- _data[key] = value;
+ if (value == null)
66
+ _data.Remove(key);
67
+ else
68
+ _data[key] = value;
69
70
71
0 commit comments