< Summary

Class:Microsoft.Azure.Batch.Common.NoRetry
Assembly:Microsoft.Azure.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Common\NoRetry.cs
Covered lines:1
Uncovered lines:0
Coverable lines:1
Total lines:27
Line coverage:100% (1 of 1)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ShouldRetryAsync(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Common\NoRetry.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License. See License.txt in the project root for license information.
 3
 4namespace Microsoft.Azure.Batch.Common
 5{
 6    using System;
 7    using System.Threading.Tasks;
 8
 9    /// <summary>
 10    /// Represents a retry policy that performs no retries.
 11    /// </summary>
 12    public class NoRetry : IRetryPolicy
 13    {
 14        /// <summary>
 15        /// Determines if the operation should be retried and how long to wait until the next retry. This
 16        /// implementation always returns <see cref="RetryDecision.NoRetry"/>.
 17        /// </summary>
 18        /// <param name="exception">An <see cref="Exception"/> object that represents the last exception encountered.</p
 19        /// <param name="operationContext">An <see cref="OperationContext"/> object for tracking the current operation.<
 20        /// <returns>A <see cref="RetryDecision"/> object which specifies if a retry should be performed.This
 21        /// implementation always returns <see cref="RetryDecision.NoRetry"/>.</returns>
 22        public Task<RetryDecision> ShouldRetryAsync(Exception exception, OperationContext operationContext)
 23        {
 124            return Task.FromResult(RetryDecision.NoRetry);
 25        }
 26    }
 27}

Methods/Properties

ShouldRetryAsync(...)