Пример #1
0
        public ResponseContext Then()
        {
            if (_httpActionContext.IsLoadTest())
            {
                StartCallsForLoad();
            }

            var response = AsyncContext.Run(async() => await ExecuteCall());

            return(BuildFromResponse(response));
        }
Пример #2
0
        public ResponseContext Then()
        {
            if (_httpActionContext.IsLoadTest())
            {
                if (_httpActionContext.IsLoadSetByCount())
                {
                    StartCallsForLoadCount();
                }
                else
                {
                    StartCallsForLoad();
                }
            }

            // var response = AsyncContext.Run(async () => await ExecuteCall());
            var response = ExecuteCall().GetAwaiter().GetResult();

            return(BuildFromResponse(response));
        }