< Summary

Class:Microsoft.Azure.Batch.BatchClientParallelOptions
Assembly:Microsoft.Azure.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\BatchClientParallelOptions.cs
Covered lines:6
Uncovered lines:2
Coverable lines:8
Total lines:50
Line coverage:75% (6 of 8)
Covered branches:1
Total branches:2
Branch coverage:50% (1 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_MaxDegreeOfParallelism()-100%100%
set_MaxDegreeOfParallelism(...)-66.67%50%
get_CancellationToken()-0%100%
.ctor()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\BatchClientParallelOptions.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
 4using System;
 5using System.Threading;
 6
 7namespace Microsoft.Azure.Batch
 8{
 9    /// <summary>
 10    /// Stores options that configure the operation of methods on Batch client parallel operations.
 11    /// </summary>
 12    public class BatchClientParallelOptions
 13    {
 14        private int _maxDegreeOfParallelism;
 15
 16        /// <summary>
 17        /// Gets or sets the maximum number of concurrent tasks enabled by this <see cref="BatchClientParallelOptions"/>
 18        /// The default value is 1.
 19        /// </summary>
 20        public int MaxDegreeOfParallelism
 21        {
 1622            get { return this._maxDegreeOfParallelism; }
 23            set
 24            {
 1125                if (value > 0)
 26                {
 1127                    this._maxDegreeOfParallelism = value;
 28                }
 29                else
 30                {
 031                    throw new ArgumentOutOfRangeException("value");
 32                }
 33            }
 34        }
 35
 36        /// <summary>
 37        /// Gets or sets the <see cref=" System.Threading.CancellationToken"/> associated with this <see cref="BatchClie
 38        /// The default is <see cref=" System.Threading.CancellationToken.None"/>.
 39        /// </summary>
 040        public CancellationToken CancellationToken { get; set; }
 41
 42        /// <summary>
 43        /// Initializes a new instance of the <see cref="BatchClientParallelOptions"/> class.
 44        /// </summary>
 745        public BatchClientParallelOptions()
 46        {
 747            this.MaxDegreeOfParallelism = 1;
 748        }
 49    }
 50}