< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
Append(...)-0%100%
Append(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Blobs.Batch\src\Shared\PrimitiveExtensions.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/Extensions/tree/master/src/Primitives/src/Extensions.cs
 5
 6using System;
 7using System.Text;
 8
 9namespace Azure.Core.Http.Multipart
 10{
 11    internal static class PrimitiveExtensions
 12    {
 13        /// <summary>
 14        /// Add the given <see cref="StringSegment"/> to the <see cref="StringBuilder"/>.
 15        /// </summary>
 16        /// <param name="builder">The <see cref="StringBuilder"/> to add to.</param>
 17        /// <param name="segment">The <see cref="StringSegment"/> to add.</param>
 18        /// <returns>The original <see cref="StringBuilder"/>.</returns>
 19        public static StringBuilder Append(this StringBuilder builder, StringSegment segment)
 20        {
 021            return builder.Append(segment.Buffer, segment.Offset, segment.Length);
 22        }
 23
 24        public static StringBuilder Append(this StringBuilder builder, ReadOnlySpan<char> span)
 25        {
 26            // Quick and dirty hack to work around missing extension
 027            return builder.Append(span.ToString());
 28        }
 29    }
 30}

Methods/Properties

Append(...)
Append(...)