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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user