コード例 #1
0
        /// <summary>
        /// Downloads execution media by job id
        /// </summary>
        /// <remarks>
        /// Client Credentials Flow required permissions: Monitoring or
        /// Monitoring.Read.
        ///
        /// Required permissions: ExecutionMedia.View.
        /// </remarks>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='jobId'>
        /// </param>
        /// <param name='xUIPATHOrganizationUnitId'>
        /// Folder/OrganizationUnit Id
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        public static async Task <Stream> DownloadMediaByJobIdAsync(this IExecutionMedia operations, long jobId, long?xUIPATHOrganizationUnitId = default(long?), CancellationToken cancellationToken = default(CancellationToken))
        {
            var _result = await operations.DownloadMediaByJobIdWithHttpMessagesAsync(jobId, xUIPATHOrganizationUnitId, null, cancellationToken).ConfigureAwait(false);

            _result.Request.Dispose();
            return(_result.Body);
        }
        /// <summary>
        /// Call operation  DownloadMediaByJobId
        /// </summary>
        /// <remarks>
        /// Required permissions: ExecutionMedia.View.
        /// </remarks>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='jobId'>
        /// parameter: jobId
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        public static async Task <Stream> DownloadMediaByJobIdAsync(this IExecutionMedia operations, long jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            var _result = await operations.DownloadMediaByJobIdWithHttpMessagesAsync(jobId, null, cancellationToken).ConfigureAwait(false);

            _result.Request.Dispose();
            return(_result.Body);
        }