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:
@@ -28,6 +28,7 @@ public enum GrantSource
|
||||
AchievementReward = 13,
|
||||
SerialCodeRedeem = 14,
|
||||
CardCosmeticCascade = 15,
|
||||
// Reserved high to stay visually distinct from gameplay sources; 16–98 are intentionally unused.
|
||||
AdminGrant = 99,
|
||||
}
|
||||
|
||||
@@ -37,6 +38,7 @@ public enum GrantSource
|
||||
/// </summary>
|
||||
public static class GrantSourceMessages
|
||||
{
|
||||
/// <exception cref="ArgumentOutOfRangeException">An unmapped <see cref="GrantSource"/> value was passed.</exception>
|
||||
public static string For(GrantSource source) => source switch
|
||||
{
|
||||
GrantSource.Unknown => "Unknown",
|
||||
|
||||
Reference in New Issue
Block a user