< Summary

Information
Class: Dotnet.Installer.Core.Types.Native
Assembly: Dotnet.Installer.Core
File(s): /home/runner/work/dotnet-snap/dotnet-snap/src/Dotnet.Installer.Core/Types/Native.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
Total lines: 18
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 Crap Score Cyclomatic complexity Line coverage
GetCurrentEffectiveUserId()100%210%

File(s)

/home/runner/work/dotnet-snap/dotnet-snap/src/Dotnet.Installer.Core/Types/Native.cs

#LineLine coverage
 1using System.Runtime.InteropServices;
 2
 3namespace Dotnet.Installer.Core.Types;
 4
 5public static partial class Native
 6{
 7    public const int RootUid = 0;
 8
 9    [LibraryImport("libc.so.6")]
 10    private static partial int geteuid();
 11
 12    /// <summary>
 13    /// Returns the effective user ID of the calling process.
 14    /// This is a wrapper around <c>geteuid(2)</c>.
 15    /// </summary>
 16    /// <returns>The effective user ID of the calling process.</returns>
 017    public static int GetCurrentEffectiveUserId() => geteuid();
 18}

Methods/Properties

GetCurrentEffectiveUserId()