예제 #1
0
        private ICommand MakeModifySectionCommand()
        {
            return(new Command(
                       "modify_section",

                       new ObjectSchema()
                       .WithRequiredProperty("id", TypeCode.String)
                       .WithOptionalProperty("update_params", null)
                       .WithOptionalProperty("increment_params", null),
                       async(correlationId, args) =>
            {
                string id = args.GetAsNullableString("id");
                Dictionary <string, dynamic> updateParams = args.GetAsParameters("update_params");
                Dictionary <string, dynamic> incrementParams = args.GetAsParameters("increment_params");
                return await _logic.ModifySectionAsync(correlationId, id, updateParams, incrementParams);
            }
                       ));
        }