< Summary

Information
Class: System.Net.Http.CurrentUserIdentityProvider
Assembly: System.Net.Http
File(s): D:\runner\runtime\src\libraries\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CurrentUserIdentityProvider.Windows.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 16
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
GetIdentity()100%110%

File(s)

D:\runner\runtime\src\libraries\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CurrentUserIdentityProvider.Windows.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
 4using System.Security.Principal;
 5
 6namespace System.Net.Http
 7{
 8    internal static class CurrentUserIdentityProvider
 9    {
 10        public static string GetIdentity()
 011        {
 012            using WindowsIdentity identity = WindowsIdentity.GetCurrent();
 013            return identity.Name;
 014        }
 15    }
 16}

Methods/Properties

GetIdentity()