public Task <UploadSingleObjectWithFileAsFormDataResult> ExecuteAsync(UploadSingleObjectWithFileAsFormDataParameters parameters, CancellationToken cancellationToken = default)
        {
            if (parameters is null)
            {
                throw new System.ArgumentNullException(nameof(parameters));
            }

            return(InvokeExecuteAsync(parameters, cancellationToken));
        }
コード例 #2
0
        public Task <ActionResult> UploadSingleObjectWithFileAsFormDataAsync(UploadSingleObjectWithFileAsFormDataParameters parameters, [FromServices] IUploadSingleObjectWithFileAsFormDataHandler handler, CancellationToken cancellationToken)
        {
            if (handler is null)
            {
                throw new ArgumentNullException(nameof(handler));
            }

            return(InvokeUploadSingleObjectWithFileAsFormDataAsync(parameters, handler, cancellationToken));
        }
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
        private async Task <UploadSingleObjectWithFileAsFormDataResult> InvokeExecuteAsync(UploadSingleObjectWithFileAsFormDataParameters parameters, CancellationToken cancellationToken)
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
        {
            throw new System.NotImplementedException();
        }
コード例 #4
0
 private static async Task <ActionResult> InvokeUploadSingleObjectWithFileAsFormDataAsync(UploadSingleObjectWithFileAsFormDataParameters parameters, IUploadSingleObjectWithFileAsFormDataHandler handler, CancellationToken cancellationToken)
 {
     return(await handler.ExecuteAsync(parameters, cancellationToken));
 }
 public Task <UploadSingleObjectWithFileAsFormDataResult> ExecuteAsync(UploadSingleObjectWithFileAsFormDataParameters parameters, CancellationToken cancellationToken = default)
 {
     return(Task.FromResult(UploadSingleObjectWithFileAsFormDataResult.Ok("Hallo world")));
 }