< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_StartRange()-100%100%
get_EndRange()-100%100%
.ctor(...)-100%100%
GetOcpRangeHeader()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\GetFileRequestByteRange.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
 5{
 6    using System;
 7
 8    /// <summary>
 9    /// The byte range to retrieve in a file download operation.
 10    /// </summary>
 11    public class GetFileRequestByteRange
 12    {
 13        private const string OcpRangeFormat = "bytes={0}-{1}";
 14
 15        /// <summary>
 16        /// Gets the start of the byte range to retrieve.
 17        /// </summary>
 818        public int StartRange { get; private set; }
 19
 20        /// <summary>
 21        /// Gets the end of the byte range to retrieve.
 22        /// </summary>
 823        public int EndRange { get; private set; }
 24
 25        /// <summary>
 26        /// Initializes a new instance of the <see cref="GetFileRequestByteRange"/> class.
 27        /// </summary>
 28        /// <param name="startRange">The start of the byte range to retrieve.</param>
 29        /// <param name="endRange">The end of the byte range to retrieve.</param>
 430        public GetFileRequestByteRange(int startRange, int endRange)
 31        {
 432            this.StartRange = startRange;
 433            this.EndRange = endRange;
 434        }
 35
 36        internal string GetOcpRangeHeader()
 37        {
 438            return string.Format(System.Globalization.CultureInfo.InvariantCulture, OcpRangeFormat, this.StartRange, thi
 39        }
 40    }
 41}