コード例 #1
0
        private static string SendCommand(ConfigSetCommand command)
        {
            JsonSerializerOptions options = new JsonSerializerOptions();

            options.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
            var cmd = JsonSerializer.Serialize(command, options);

            return(getSocketResponse(cmd));
        }
コード例 #2
0
 public static SetUnsetConfig SetConfig(ConfigSetCommand cmd)
 {
     return(JsonSerializer.Deserialize <SetUnsetConfig>(SendCommand(cmd)));
 }