/// <summary>
        /// Execute example
        /// </summary>
        /// <param name="cancellationToken">The cancellation token</param>
        /// <returns>The task</returns>
        public async Task Execute(CancellationToken cancellationToken)
        {
            var integrationExportId = Guid.Parse("64064995-E24B-4C38-8DCA-DD32C29793AB");

            var request = new RejectIntegrationExportV1Request
            {
                IntegrationExportId = integrationExportId,
                Message             = "Not configured for this integration",
            };

            var response = await _client
                           .Execute(request, cancellationToken)
                           .ThrowIfFailed()
                           .ConfigureAwait(Await.Default);

            Require.NotNull(response, nameof(response));
        }
コード例 #2
0
        private async Task <DownloadIntegrationExportCommandResult> Reject(
            DownloadIntegrationExportCommand command,
            CancellationToken cancellationToken)
        {
            var request = new RejectIntegrationExportV1Request
            {
                IntegrationExportId = command.IntegrationExportId,
                Message             = "Not configured for this integration",
            };

            _ = await _apiClient
                .Execute(request, cancellationToken)
                .ThrowIfFailed()
                .ConfigureAwait(Await.Default);

            var commandResult = new DownloadIntegrationExportCommandResult
            {
                Success   = false,
                Message   = request.Message,
                Exception = null,
            };

            return(commandResult);
        }