ModernUO/Projects/Server/Utilities
Kamron Batman 9df169946c
style: use indexed for over arrays/lists and [] initializers
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>
2026-07-25 11:17:33 -07:00
..
ActivatorExtensions.cs fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
BitMask256.cs fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
EntityActivatorExtensions.cs fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
HashUtility.cs feat(pathfinding): JSONL recorder + public bake helpers (#2449) 2026-05-06 13:06:28 -07:00
Html.cs fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
IPAddressUtility.cs style: use indexed for over arrays/lists and [] initializers 2026-07-25 11:17:33 -07:00
NetworkUtilities.cs refactor(network): move Firewall to UOContent; core keeps only the filter seam 2026-07-25 01:18:42 -07:00
PathUtility.cs fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
Utility.cs refactor(network): collapse Firewall to a single-threaded persisted store 2026-07-23 20:37:19 -07:00