< Summary

Class:Azure.Core.RetryOptions
Assembly:Azure.Core
File(s):C:\Git\azure-sdk-for-net\sdk\core\Azure.Core\src\RetryOptions.cs
Covered lines:6
Uncovered lines:1
Coverable lines:7
Total lines:44
Line coverage:85.7% (6 of 7)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
get_MaxRetries()-100%100%
get_Delay()-100%100%
get_MaxDelay()-0%100%
get_Mode()-100%100%
get_NetworkTimeout()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\core\Azure.Core\src\RetryOptions.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5
 6namespace Azure.Core
 7{
 8    /// <summary>
 9    ///  The set of options that can be specified to influence how
 10    ///  retry attempts are made, and a failure is eligible to be retried.
 11    /// </summary>
 12    public class RetryOptions
 13    {
 9414        internal RetryOptions()
 15        {
 9416        }
 17
 18        /// <summary>
 19        /// The maximum number of retry attempts before giving up.
 20        /// </summary>
 15421        public int MaxRetries { get; set; } = 3;
 22
 23        /// <summary>
 24        /// The delay between retry attempts for a fixed approach or the delay
 25        /// on which to base calculations for a backoff-based approach.
 26        /// </summary>
 17027        public TimeSpan Delay { get; set; } = TimeSpan.FromSeconds(0.8);
 28
 29        /// <summary>
 30        /// The maximum permissible delay between retry attempts.
 31        /// </summary>
 032        public TimeSpan MaxDelay { get; set; } = TimeSpan.FromMinutes(1);
 33
 34        /// <summary>
 35        /// The approach to use for calculating retry delays.
 36        /// </summary>
 15437        public RetryMode Mode { get; set; } = RetryMode.Exponential;
 38
 39        /// <summary>
 40        /// The timeout applied to an individual network operations.
 41        /// </summary>
 16642        public TimeSpan NetworkTimeout { get; set; } = TimeSpan.FromSeconds(100);
 43    }
 44}