< Summary - Kestrun — Combined Coverage

Information
Class: Public.Middleware.Add-KrFaviconMiddleware
Assembly: Kestrun.PowerShell.Public
File(s): /home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Middleware/Add-KrFaviconMiddleware.ps1
Tag: Kestrun/Kestrun@6135d944f8787fb570e4dfbacac6e80312799a86
Line coverage
0%
Covered lines: 0
Uncovered lines: 2
Coverable lines: 2
Total lines: 35
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 12/01/2025 - 20:55:19 Line coverage: 0% (0/4) Total lines: 49 Tag: Kestrun/Kestrun@638a27c2dd54103f693f023b6ba5f56a884caafa01/08/2026 - 08:19:25 Line coverage: 0% (0/4) Total lines: 48 Tag: Kestrun/Kestrun@6ab94ca7560634c2ac58b36c2b98e2a9b1bf305d05/09/2026 - 21:51:36 Line coverage: 0% (0/2) Total lines: 35 Tag: Kestrun/Kestrun@6b24c7512a1bad61723a28d32446de0aa658293e

Coverage delta

Coverage delta 1 -1

Metrics

File(s)

/home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Middleware/Add-KrFaviconMiddleware.ps1

#LineLine coverage
 1<#
 2    .SYNOPSIS
 3        Adds a favicon to the Kestrun server.
 4    .DESCRIPTION
 5        This cmdlet allows you to register a favicon for the Kestrun server.
 6        It can be used to set a custom favicon for the server's web interface.
 7    .PARAMETER Server
 8        The Kestrun server instance to which the favicon will be added.
 9    .PARAMETER IconPath
 10        The path to the favicon file. If not specified, a default embedded favicon will be used.
 11    .PARAMETER PassThru
 12        If specified, returns the modified server instance after adding the favicon.
 13    .EXAMPLE
 14        Add-KrFaviconMiddleware -IconPath 'C:\path\to\favicon.ico'
 15        This example adds a custom favicon to the server from the specified path.
 16    .EXAMPLE
 17        Add-KrFaviconMiddleware
 18        This example adds the default embedded favicon to the server.
 19    .NOTES
 20        This cmdlet is used to register a favicon for the Kestrun server, allowing you to set a custom favicon for the s
 21        If no icon path is specified, the default embedded favicon will be used.
 22#>
 23function Add-KrFaviconMiddleware {
 24    [KestrunRuntimeApi('Definition')]
 25    [CmdletBinding()]
 26    [OutputType([Kestrun.Hosting.KestrunHost])]
 27    param(
 28        [Parameter()]
 29        [string]$IconPath = $null
 30    )
 31    # Ensure the server instance is resolved
 032    $Server = Resolve-KestrunServer
 33
 034    $Server.AddFavicon($IconPath) | Out-Null
 35}

Methods/Properties

Add-KrFaviconMiddleware()