< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 82
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%110%
ToString()0%220%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Net.Security/src/System/Net/SecurityStatusPal.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4namespace System.Net
 5{
 6    internal readonly struct SecurityStatusPal
 7    {
 8        public readonly SecurityStatusPalErrorCode ErrorCode;
 9        public readonly Exception? Exception;
 10
 11        public SecurityStatusPal(SecurityStatusPalErrorCode errorCode, Exception? exception = null)
 012        {
 013            ErrorCode = errorCode;
 014            Exception = exception;
 015        }
 16
 17        public override string ToString()
 018        {
 019            return Exception == null ?
 020                $"{nameof(ErrorCode)}={ErrorCode}" :
 021                $"{nameof(ErrorCode)}={ErrorCode}, {nameof(Exception)}={Exception}";
 022        }
 23    }
 24
 25    internal enum SecurityStatusPalErrorCode
 26    {
 27        NotSet = 0,
 28        OK,
 29        ContinueNeeded,
 30        CompleteNeeded,
 31        CompAndContinue,
 32        ContextExpired,
 33        CredentialsNeeded,
 34        Renegotiate,
 35        TryAgain,
 36        HandshakeStarted,
 37        CertValidationNeeded,
 38
 39        // Errors
 40        OutOfMemory,
 41        InvalidHandle,
 42        Unsupported,
 43        TargetUnknown,
 44        InternalError,
 45        PackageNotFound,
 46        NotOwner,
 47        CannotInstall,
 48        InvalidToken,
 49        CannotPack,
 50        QopNotSupported,
 51        NoImpersonation,
 52        LogonDenied,
 53        UnknownCredentials,
 54        NoCredentials,
 55        MessageAltered,
 56        OutOfSequence,
 57        NoAuthenticatingAuthority,
 58        IncompleteMessage,
 59        IncompleteCredentials,
 60        BufferNotEnough,
 61        WrongPrincipal,
 62        TimeSkew,
 63        UntrustedRoot,
 64        IllegalMessage,
 65        CertUnknown,
 66        CertExpired,
 67        DecryptFailure,
 68        AlgorithmMismatch,
 69        SecurityQosFailed,
 70        SmartcardLogonRequired,
 71        UnsupportedPreauth,
 72        BadBinding,
 73        DowngradeDetected,
 74        ApplicationProtocolMismatch,
 75        NoRenegotiation,
 76        KeySetDoesNotExist,
 77        ContextExpiredError,
 78        CertValidationFailed,
 79        MutualAuthFailed
 80    }
 81}
 82