< Summary - Kestrun — Combined Coverage

Information
Class: Public.Session.Clear-KrSession
Assembly: Kestrun.PowerShell.Public
File(s): /home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Session/Clear-KrSession.ps1
Tag: Kestrun/Kestrun@5f1d2b981c9d7292c11fd448428c6ab6c811c5de
Line coverage
0%
Covered lines: 0
Uncovered lines: 2
Coverable lines: 2
Total lines: 20
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

Coverage history

Coverage history 0 25 50 75 100 11/19/2025 - 17:40:50 Line coverage: 0% (0/2) Total lines: 20 Tag: Kestrun/Kestrun@fcf33342333cef0516fe0d0912a86709874fd026

Metrics

File(s)

/home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Session/Clear-KrSession.ps1

#LineLine coverage
 1<#
 2    .SYNOPSIS
 3        Clears all items from the session.
 4    .DESCRIPTION
 5        This function accesses the current HTTP context's session and clears all items stored in it.
 6    .EXAMPLE
 7        Clear-KrSession
 8        Clears all items from the current session.
 9    .OUTPUTS
 10        None. This function performs a state-changing operation on the session.
 11#>
 12function Clear-KrSession {
 13    [KestrunRuntimeApi('Route')]
 14    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
 15    [CmdletBinding()]
 16    param()
 017    if ($null -ne $Context.Session) {
 018        $Context.Session.Clear()
 19    }
 20}

Methods/Properties

Clear-KrSession()