lucidiot/HabitSharp
lucidiot
/
HabitSharp
Archived
1
0
Fork 0

Avoid deprecated AddHandler signature

This commit is contained in:
Lucidiot 2019-09-03 08:27:37 +02:00
parent dd7683bfa9
commit ab4ba0b577
Signed by: lucidiot
GPG Key ID: 3358C1CA6906FB8D
1 changed files with 8 additions and 5 deletions

View File

@ -24,11 +24,14 @@ namespace HabitSharp
this.Client.Authenticator = new HabiticaAuthenticator(UserID, ApiKey);
// Override JSON serialization
this.Client.AddHandler("application/json", NewtonsoftJsonSerializer.Default);
this.Client.AddHandler("text/json", NewtonsoftJsonSerializer.Default);
this.Client.AddHandler("text/x-json", NewtonsoftJsonSerializer.Default);
this.Client.AddHandler("text/javascript", NewtonsoftJsonSerializer.Default);
this.Client.AddHandler("*+json", NewtonsoftJsonSerializer.Default);
this.Client.AddHandler(
() => NewtonsoftJsonSerializer.Default,
"application/json",
"text/json",
"text/x-json",
"text/javascript",
"*+json"
);
this.Tags = new TagManager(this);
this.Notifications = new NotificationManager(this);