< Summary - Kestrun — Combined Coverage

Information
Class: Private.Assembly.Get-KrDocSet
Assembly: Kestrun.PowerShell.Private
File(s): /home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Private/Assembly/Get-KrDocSet.ps1
Tag: Kestrun/Kestrun@9d3a582b2d63930269564a7591aa77ef297cadeb
Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 79
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

Metrics

File(s)

/home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Private/Assembly/Get-KrDocSet.ps1

#LineLine coverage
 1
 2<#
 3    .SYNOPSIS
 4        Get a set of documentation for Kestrun commands.
 5
 6    .DESCRIPTION
 7        This function retrieves a set of documentation for Kestrun commands based on the specified context.
 8    .PARAMETER Name
 9        The name of the documentation set to retrieve.
 10    .PARAMETER Module
 11        The name of the module to search for commands.
 12    .PARAMETER IncludeNonExported
 13        Whether to include non-exported commands in the search.
 14    .EXAMPLE
 15        # All Definition-only commands (pure)
 16        Get-KrDocSet -Name DefinitionOnly
 17    .EXAMPLE
 18        # All commands that are *only* Route
 19        Get-KrDocSet -Name RouteOnly
 20    .EXAMPLE
 21        # All Route+Schedule commands (pure composite)
 22        Get-KrDocSet -Name RouteAndSchedule
 23    .EXAMPLE
 24        # Everything usable in runtime (pure composite of Route|Schedule)
 25        Get-KrDocSet -Name Runtime
 26    .EXAMPLE
 27        # All config-only commands (pure Definition, no runtime use)
 28        Get-KrDocSet -Name ConfigOnly
 29#>
 30function Get-KrDocSet {
 31    [CmdletBinding()]
 32    param(
 33        [Parameter(Mandatory)]
 34        [ValidateSet(
 35            'DefinitionOnly',
 36            'RouteOnly',
 37            'ScheduleOnly',
 38            'RouteAndSchedule',
 39            'ScheduleAndDefinition',
 40            'Runtime',   # Route|Schedule
 41            'Everywhere',
 42            'ConfigOnly' # Definition but not Route/Schedule
 43        )]
 44        [string]$Name,
 45
 46        [string]$Module = 'Kestrun',
 47        [switch]$IncludeNonExported,
 48        [object[]]$Functions
 49    )
 50
 051    switch ($Name) {
 52        'DefinitionOnly' {
 053            Get-KrCommandsByContext -AnyOf Definition -Exact -Module $Module -IncludeNonExported:$IncludeNonExported -Fu
 54        }
 55        'RouteOnly' {
 056            Get-KrCommandsByContext -AnyOf Route -Exact -Module $Module -IncludeNonExported:$IncludeNonExported -Functio
 57        }
 58        'ScheduleOnly' {
 059            Get-KrCommandsByContext -AnyOf Schedule -Exact -Module $Module -IncludeNonExported:$IncludeNonExported -Func
 60        }
 61        'RouteAndSchedule' {
 062            Get-KrCommandsByContext -AllOf Route, Schedule -Exact -Module $Module -IncludeNonExported:$IncludeNonExporte
 63        }
 64        'ScheduleAndDefinition' {
 065            Get-KrCommandsByContext -AnyOf ScheduleAndDefinition -Exact -Module $Module -IncludeNonExported:$IncludeNonE
 66        }
 67        'Runtime' {
 068            Get-KrCommandsByContext -AnyOf Runtime -Exact -Module $Module -IncludeNonExported:$IncludeNonExported -Funct
 69        }
 70        'Everywhere' {
 071            Get-KrCommandsByContext -AnyOf Everywhere -Exact -Module $Module -IncludeNonExported:$IncludeNonExported -Fu
 72        }
 73        'ConfigOnly' {
 74            # Definition but NOT Route or Schedule
 075            Get-KrCommandsByContext -AnyOf Definition -Exact -Module $Module -IncludeNonExported:$IncludeNonExported -Fu
 76        }
 77    }
 78}
 79

Methods/Properties

Get-KrDocSet()