| @@ -1,7 +1,9 @@ | |||||
| using Model = Discord.API.Game; | |||||
| using System.Diagnostics; | |||||
| using Model = Discord.API.Game; | |||||
| namespace Discord | namespace Discord | ||||
| { | { | ||||
| [DebuggerDisplay(@"{DebuggerDisplay,nq}")] | |||||
| public struct Game | public struct Game | ||||
| { | { | ||||
| public string Name { get; } | public string Name { get; } | ||||
| @@ -18,5 +20,8 @@ namespace Discord | |||||
| : this(name, null, StreamType.NotStreaming) { } | : this(name, null, StreamType.NotStreaming) { } | ||||
| internal Game(Model model) | internal Game(Model model) | ||||
| : this(model.Name, model.StreamUrl.GetValueOrDefault(null), model.StreamType.GetValueOrDefault(null) ?? StreamType.NotStreaming) { } | : this(model.Name, model.StreamUrl.GetValueOrDefault(null), model.StreamType.GetValueOrDefault(null) ?? StreamType.NotStreaming) { } | ||||
| public override string ToString() => Name; | |||||
| private string DebuggerDisplay => StreamUrl != null ? $"{Name} ({StreamUrl})" : Name; | |||||
| } | } | ||||
| } | } | ||||