fix: address code quality review findings for batch 1

- SubjectsCollide: split tokens once upfront instead of O(n²) TokenAt calls
- NatsHeaderParser: manual digit accumulation avoids string allocation and overflow
- NatsHeaders: use IReadOnlyDictionary for Headers, immutable Invalid sentinel
- PermissionLruCache: add missing Count property
This commit is contained in:
Joseph Doherty
2026-02-23 00:40:14 -05:00
parent dddced444e
commit 0ec5583422
3 changed files with 34 additions and 16 deletions

View File

@@ -35,6 +35,17 @@ public sealed class PermissionLruCache
}
}
public int Count
{
get
{
lock (_lock)
{
return _map.Count;
}
}
}
public void Set(string key, bool value)
{
lock (_lock)