Applies the house conventions consistently across this PR's own code rather than leaving them half-applied: BanChannel had Register/Stop converted while Start kept a foreach, and ConnectionFilters was foreach throughout. Converted every foreach over an array or List, and while doing so hoisted the _reporters/_filters static field reads into a local so the loops match the snapshot pattern Report/Retract/ShouldDeny already use. Left as foreach where there is no indexer: the Dictionary walks in Firewall.ExpireEntries, PromotedGuard.Sweep and BuildAlerts, and BuildAlerts' IEnumerable parameter. Dictionary field initializers become [] (it compiles, same lowering). The three remaining new List<T>(capacity) calls keep their form -- a collection expression cannot carry the capacity hint, and all three size the list exactly. Scoped to files this PR authored or moved; pre-existing loops in AdminGump, Main and Utility are left alone. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Bans | ||
| Encryption | ||
| NetState | ||
| Packets | ||
| ConnectionFilters.cs | ||
| EncodedPacketHandler.cs | ||
| EncodedReader.cs | ||
| IConnectionFilter.cs | ||
| IPRateLimiter.cs | ||
| MovementThrottle.cs | ||
| NetworkCompression.cs | ||
| PacketHandler.cs | ||
| PacketUtilities.cs | ||
| PingServer.cs | ||
| ServerInfo.cs | ||
| SocketHelper.cs | ||