Example #1
0
        /// <summary>
        /// Set method on request and execute request
        /// </summary>
        /// <param name="request">The request</param>
        /// <param name="cancellationToken">The cancellation token</param>
        /// <returns>The response</returns>
        public Task <ApiResponse <TResponse> > Execute(ApiRequest <TRequest> request, CancellationToken cancellationToken)
        {
            Argument.NotNull(request, nameof(request));

            if (request.Context == null)
            {
                request.Context = new RequestContext();
            }

            if (request.Context.Method.HasValue == false)
            {
                request.Context.Method = _methodProvider.GetMethod();
            }

            return(_apiClient.Execute(request, cancellationToken));
        }
Example #2
0
 public Method(IMethodProvider methodProvider)
 {
     methodProvider.GetMethod(out numOfSteps, out methodOrder, out y1, out y1_, out a, out c);
 }