Browse Source

Ignore errors when deserializing Game

tags/1.0-rc
RogueException 8 years ago
parent
commit
5389f98042
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      src/Discord.Net.Core/API/Common/Game.cs

+ 8
- 0
src/Discord.Net.Core/API/Common/Game.cs View File

@@ -1,5 +1,7 @@
#pragma warning disable CS1591 #pragma warning disable CS1591
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Runtime.Serialization;


namespace Discord.API namespace Discord.API
{ {
@@ -11,5 +13,11 @@ namespace Discord.API
public Optional<string> StreamUrl { get; set; } public Optional<string> StreamUrl { get; set; }
[JsonProperty("type")] [JsonProperty("type")]
public Optional<StreamType?> StreamType { get; set; } public Optional<StreamType?> StreamType { get; set; }

[OnError]
internal void OnError(StreamingContext context, ErrorContext errorContext)
{
errorContext.Handled = true;
}
} }
} }

Loading…
Cancel
Save