You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

VoiceDevice.cs 629 B

12345678910111213141516171819202122232425
  1. using System.Diagnostics;
  2. using Model = Discord.API.Rpc.VoiceDevice;
  3. namespace Discord.Rpc
  4. {
  5. [DebuggerDisplay(@"{DebuggerDisplay,nq}")]
  6. public struct VoiceDevice
  7. {
  8. public string Id { get; }
  9. public string Name { get; }
  10. internal VoiceDevice(string id, string name)
  11. {
  12. Id = id;
  13. Name = name;
  14. }
  15. internal static VoiceDevice Create(Model model)
  16. {
  17. return new VoiceDevice(model.Id, model.Name);
  18. }
  19. public override string ToString() => $"{Name}";
  20. private string DebuggerDisplay => $"{Name} ({Id})";
  21. }
  22. }