< 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
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 16
Line coverage: 100%
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%11100%

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    [LibraryImport("libc.so.6")]
 8    private static partial int geteuid();
 9
 10    /// <summary>
 11    /// Returns the effective user ID of the calling process.
 12    /// This is a wrapper around <c>geteuid(2)</c>.
 13    /// </summary>
 14    /// <returns>The effective user ID of the calling process.</returns>
 115    public static int GetCurrentEffectiveUserId() => geteuid();
 16}

Methods/Properties

GetCurrentEffectiveUserId()