Add JsonConstructor

pull/7380/head
Cody Robibero 2 years ago
parent e26446f9c0
commit dc1b224667

@ -2,14 +2,21 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace MediaBrowser.Model.Session
namespace MediaBrowser.Model.Session;
public class GeneralCommand
{
public class GeneralCommand
{
public GeneralCommand()
: this(new Dictionary<string, string>())
{
}
[JsonConstructor]
public GeneralCommand(Dictionary<string, string> arguments)
{
Arguments = new Dictionary<string, string>();
Arguments = arguments;
}
public GeneralCommandType Name { get; set; }
@ -17,5 +24,4 @@ namespace MediaBrowser.Model.Session
public Guid ControllingUserId { get; set; }
public Dictionary<string, string> Arguments { get; }
}
}

Loading…
Cancel
Save