< Summary

Class:Azure.Core.Http.Multipart.MultipartSection
Assembly:Azure.Storage.Blobs.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Blobs.Batch\src\Shared\MultipartSection.cs
Covered lines:2
Uncovered lines:7
Coverable lines:9
Total lines:51
Line coverage:22.2% (2 of 9)
Covered branches:0
Total branches:4
Branch coverage:0% (0 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_ContentType()-0%0%
get_ContentDisposition()-0%0%
get_Headers()-100%100%
get_Body()-100%100%
get_BaseStreamOffset()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Blobs.Batch\src\Shared\MultipartSection.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// Copied from https://github.com/aspnet/AspNetCore/tree/master/src/Http/WebUtilities/src
 5
 6using System.Collections.Generic;
 7using System.IO;
 8
 9#pragma warning disable IDE0018 // Inline declaration
 10
 11namespace Azure.Core.Http.Multipart
 12{
 13    internal class MultipartSection
 14    {
 15        public string ContentType
 16        {
 17            get
 18            {
 19                StringValues values;
 020                if (Headers.TryGetValue(HeaderNames.ContentType, out values))
 21                {
 022                    return values;
 23                }
 024                return null;
 25            }
 26        }
 27
 28        public string ContentDisposition
 29        {
 30            get
 31            {
 32                StringValues values;
 033                if (Headers.TryGetValue(HeaderNames.ContentDisposition, out values))
 34                {
 035                    return values;
 36                }
 037                return null;
 38            }
 39        }
 40
 254441        public Dictionary<string, StringValues> Headers { get; set; }
 42
 254443        public Stream Body { get; set; }
 44
 45        /// <summary>
 46        /// The position where the body starts in the total multipart body.
 47        /// This may not be available if the total multipart body is not seekable.
 48        /// </summary>
 049        public long? BaseStreamOffset { get; set; }
 50    }
 51}