Ejemplo n.º 1
0
        public async Task <Stream> GetArtifactContentZipAsync(Guid projectId, int buildId, string artifactName, CancellationToken cancellationToken)
        {
            var retryEventHandler = new RetryEventHandler("Vsts_GetArtifactContentZipAsync", eventProperties: null, cancellationToken: cancellationToken, brokerInstrumentation: null);

            return(await retryer.TryActionAsync(
                       async() => await this.client.GetArtifactContentZipAsync(projectId, buildId, artifactName, userState : null, cancellationToken : cancellationToken).ConfigureAwait(false),
                       retryEventHandler).ConfigureAwait(false));
        }
Ejemplo n.º 2
0
        public async Task AppendTimelineRecordFeedAsync(Guid scopeIdentifier, string planType, Guid planId, Guid timelineId, Guid recordId, IEnumerable <string> lines, CancellationToken cancellationToken, object userState)
        {
            var retryEventHandler = GetRetryEventHandler("Vsts_AppendTimelineRecordFeedAsync", scopeIdentifier, planId, cancellationToken);

            await retryer.TryActionAsync(
                async() =>
            {
                await this.client.AppendTimelineRecordFeedAsync(scopeIdentifier, planType, planId, timelineId, recordId, lines, cancellationToken, userState).ConfigureAwait(false);
                return(true);
            },
                retryEventHandler).ConfigureAwait(false);
        }