< Summary - Kestrun — Combined Coverage

Information
Class: Public.Runtime.Get-KrFeatureSupport
Assembly: Kestrun.PowerShell.Public
File(s): /home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Runtime/Get-KrFeatureSupport.ps1
Tag: Kestrun/Kestrun@2d87023b37eb91155071c91dd3d6a2eeb3004705
Line coverage
100%
Covered lines: 13
Uncovered lines: 0
Coverable lines: 13
Total lines: 47
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

Coverage history

Coverage history 0 25 50 75 100 10/13/2025 - 16:52:37 Line coverage: 100% (13/13) Total lines: 47 Tag: Kestrun/Kestrun@10d476bee71c71ad215bb8ab59f219887b5b4a5e

Metrics

File(s)

/home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Runtime/Get-KrFeatureSupport.ps1

#LineLine coverage
 1<#
 2.SYNOPSIS
 3    Gets the support status of known features in the current Kestrun runtime environment.
 4.DESCRIPTION
 5    This cmdlet retrieves the support status of all known features defined in the Kestrun runtime.
 6    It provides information about whether each feature is supported based on the runtime version and configuration.
 7.PARAMETER Capabilities
 8    If specified, only the feature name and support status will be returned, omitting the built TFM.
 9.OUTPUTS
 10    A custom object with the following properties:
 11    - Feature: The name of the feature.
 12    - BuiltTFM: The target framework version that Kestrun was built against.
 13    - Supported: A boolean indicating whether the feature is supported in the current runtime environment.
 14.EXAMPLE
 15    Get-KrFeatureSupport
 16    This example retrieves the support status of all known features in the current Kestrun runtime environment.
 17    The output will be a collection of objects, each representing a feature and its support status.
 18#>
 19function Get-KrFeatureSupport {
 20    [KestrunRuntimeApi('Everywhere')]
 21    [CmdletBinding(DefaultParameterSetName = 'Full')]
 22    [OutputType([pscustomobject])]
 23    param(
 24        [Parameter(ParameterSetName = 'Capabilities')]
 25        [switch] $Capabilities
 26    )
 27
 128    $built = [Kestrun.KestrunRuntimeInfo]::GetBuiltTargetFrameworkVersion()
 129    $features = [enum]::GetNames([Kestrun.KestrunRuntimeInfo+KnownFeature])
 30
 131    foreach ($name in $features) {
 132        $enum = [Kestrun.KestrunRuntimeInfo+KnownFeature]::$name
 133        $supported = [Kestrun.KestrunRuntimeInfo]::Supports($enum)
 134        if ($Capabilities) {
 135            [pscustomobject]@{
 136                Feature = $name
 137                Supported = $supported
 38            }
 39        } else {
 140            [pscustomobject]@{
 141                Feature = $name
 142                BuiltTFM = $built
 143                Supported = $supported
 44            }
 45        }
 46    }
 47}

Methods/Properties

Get-KrFeatureSupport()