private static string ConvertActionType(VivoxAction action) { switch (action) { case VivoxAction.Login: return("login"); break; case VivoxAction.JoinChannel: return("join"); default: throw new NotImplementedException($"TODO: Implement string generation for VivoxAction: {action}"); } }
public VivoxTokenClaimsCreationContext(int characterId, VivoxAction action, VivoxChannelData channel = null) { if (characterId <= 0) { throw new ArgumentOutOfRangeException(nameof(characterId)); } if (!Enum.IsDefined(typeof(VivoxAction), action)) { throw new InvalidEnumArgumentException(nameof(action), (int)action, typeof(VivoxAction)); } CharacterId = characterId; Action = action; //Channel data is optional, we don't need to null check it. //it's not my fault that it's designed this dumb way Channel = channel; }