Ignore errors when deserializing Game

This commit is contained in:
RogueException
2016-10-16 00:50:50 -03:00
parent 123fc90efc
commit 5389f98042

View File

@@ -1,5 +1,7 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Runtime.Serialization;
namespace Discord.API
{
@@ -11,5 +13,11 @@ namespace Discord.API
public Optional<string> StreamUrl { get; set; }
[JsonProperty("type")]
public Optional<StreamType?> StreamType { get; set; }
[OnError]
internal void OnError(StreamingContext context, ErrorContext errorContext)
{
errorContext.Handled = true;
}
}
}