< Summary

Class:Azure.Storage.Errors
Assembly:Azure.Storage.Blobs.ChangeFeed
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Common\src\Shared\Errors.cs
Covered lines:0
Uncovered lines:14
Coverable lines:14
Total lines:49
Line coverage:0% (0 of 14)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
AccountMismatch(...)-0%100%
AccountSasMissingData()-0%100%
ArgumentNull(...)-0%100%
InvalidResourceType(...)-0%100%
TaskIncomplete()-0%100%
InvalidFormat(...)-0%100%
ParsingConnectionStringFailed()-0%100%
InvalidSasProtocol(...)-0%100%
InvalidService(...)-0%100%
InsufficientStorageTransferOptions(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Common\src\Shared\Errors.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using System.Globalization;
 6
 7namespace Azure.Storage
 8{
 9
 10    /// <summary>
 11    /// Create exceptions for common error cases.
 12    /// </summary>
 13    internal partial class Errors
 14    {
 15        public static ArgumentException AccountMismatch(string accountNameCredential, string accountNameValue)
 016            => new ArgumentException(string.Format(
 017                CultureInfo.CurrentCulture,
 018                "Account Name Mismatch: {0} != {1}",
 019                accountNameCredential,
 020                accountNameValue));
 21
 22        public static InvalidOperationException AccountSasMissingData()
 023            => new InvalidOperationException($"Account SAS is missing at least one of these: ExpiryTime, Permissions, Se
 24
 25        public static ArgumentNullException ArgumentNull(string paramName)
 026            => new ArgumentNullException(paramName);
 27
 28        public static ArgumentException InvalidResourceType(char s)
 029            => new ArgumentException($"Invalid resource type: '{s}'");
 30
 31        public static InvalidOperationException TaskIncomplete()
 032            => new InvalidOperationException("Task is not completed");
 33
 34        public static FormatException InvalidFormat(string err)
 035            => new FormatException(err);
 36
 37        public static ArgumentException ParsingConnectionStringFailed()
 038            => new ArgumentException("Connection string parsing error");
 39
 40        public static ArgumentOutOfRangeException InvalidSasProtocol(string protocol, string sasProtocol)
 041            => new ArgumentOutOfRangeException(protocol, $"Invalid {sasProtocol} value");
 42
 43        public static ArgumentException InvalidService(char s)
 044            => new ArgumentException($"Invalid service: '{s}'");
 45
 46        public static ArgumentException InsufficientStorageTransferOptions(long streamLength, long statedMaxBlockSize, l
 047            => new ArgumentException($"Cannot upload {streamLength} bytes with a maximum transfer size of {statedMaxBloc
 48    }
 49}