docs(inventory): annotate GrantSource gap + For() exception

Add comment above AdminGrant = 99 explaining the intentional 16–98 gap,
and add <exception> XML doc on GrantSourceMessages.For() so IDE tooling
surfaces the ArgumentOutOfRangeException.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-09 14:11:45 -04:00
parent 9f65326449
commit 645c32e11c

View File

@@ -28,6 +28,7 @@ public enum GrantSource
AchievementReward = 13, AchievementReward = 13,
SerialCodeRedeem = 14, SerialCodeRedeem = 14,
CardCosmeticCascade = 15, CardCosmeticCascade = 15,
// Reserved high to stay visually distinct from gameplay sources; 1698 are intentionally unused.
AdminGrant = 99, AdminGrant = 99,
} }
@@ -37,6 +38,7 @@ public enum GrantSource
/// </summary> /// </summary>
public static class GrantSourceMessages public static class GrantSourceMessages
{ {
/// <exception cref="ArgumentOutOfRangeException">An unmapped <see cref="GrantSource"/> value was passed.</exception>
public static string For(GrantSource source) => source switch public static string For(GrantSource source) => source switch
{ {
GrantSource.Unknown => "Unknown", GrantSource.Unknown => "Unknown",