Пример #1
0
        private ICommand MakeGetSectionsCommand()
        {
            return(new Command(
                       "get_sections",

                       new ObjectSchema()
                       .WithOptionalProperty("filter", new FilterParamsSchema())
                       .WithOptionalProperty("paging", new PagingParamsSchema()),
                       async(correlationId, args) =>
            {
                FilterParams filter = FilterParams.FromValue(args.Get("filter"));
                PagingParams paging = PagingParams.FromValue(args.Get("paging"));

                return await _logic.GetSectionsAsync(correlationId, filter, paging);
            }
                       ));
        }