Esempio n. 1
0
        public async Task <ResponseGetChairs> GetChairsAsync(ParametersGetChairs parameters)
        {
            ValidateEnvironment();

            var request = CreateRequestBuildDirector <ParametersGetChairs>()
                          .Construct(CreateConstructionData(parameters, nameof(GetChairs)));

            return(await RequestExecutionWrapper
                   .ExecuteAsync <CoreResponseGetChairs, ResponseGetChairs>(request)
                   .ConfigureAwait(false));
        }
Esempio n. 2
0
        public async Task <ResponseBan> BanAsync(ParametersBan parameters)
        {
            ValidateEnvironment();

            var request = CreateRequestBuildDirector <ParametersBan>()
                          .Construct(CreateConstructionData(parameters, nameof(Ban)));

            return(new ResponseBan
            {
                Result = await RequestExecutionWrapper
                         .ExecuteAsync <int, bool>(request)
                         .ConfigureAwait(false)
            });
        }