PSModuleBuildReleaseTemplate.psm1
|
#Region './prefix.ps1' -1 # The content of this file will be prepended to the top of the psm1 module file. This is useful for custom module setup is needed on import. $ScriptPath = Split-Path $MyInvocation.MyCommand.Path $PSModule = $ExecutionContext.SessionState.Module $PSModuleRoot = $PSModule.ModuleBase #EndRegion './prefix.ps1' 5 #Region './private/Add.ps1' -1 function Add { <# .SYNOPSIS Adds two numbers together. .DESCRIPTION The Add function takes two integers as input parameters and returns their sum. .PARAMETER a The first integer to add. .PARAMETER b The second integer to add. .EXAMPLE Add -a 2 -b 3 Returns 5. #> param ( [Parameter(Mandatory = $true)] [int]$a, [Parameter(Mandatory = $true)] [int]$b ) return $a + $b } #EndRegion './private/Add.ps1' 29 #Region './private/Subtract.ps1' -1 function Subtract { <# .SYNOPSIS Subtracts one number from another. .DESCRIPTION The Subtract function takes two integers as input parameters and returns their difference. .PARAMETER a The first integer. .PARAMETER b The second integer to subtract from the first. .EXAMPLE Subtract -a 5 -b 3 Returns 2. #> param ( [Parameter(Mandatory = $true)] [int]$a, [Parameter(Mandatory = $true)] [int]$b ) return $a - $b } #EndRegion './private/Subtract.ps1' 29 #Region './public/New-Addition.ps1' -1 function New-Addition { <# .SYNOPSIS Adds two numbers together. .DESCRIPTION The New-Addition function takes two integers as input parameters and returns their sum. .PARAMETER a The first integer to add. .PARAMETER b The second integer to add. .EXAMPLE New-Addition -a 2 -b 3 Returns 5. #> [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'FP')] param ( [Parameter(Mandatory = $true)] [int]$a, [Parameter(Mandatory = $true)] [int]$b ) Add -a $a -b $b } #EndRegion './public/New-Addition.ps1' 30 #Region './public/New-Subtract.ps1' -1 function New-Subtract { <# .SYNOPSIS Subtracts one number from another. .DESCRIPTION The New-Subtract function takes two integers as input parameters and returns their difference. .PARAMETER a The first integer. .PARAMETER b The second integer to subtract from the first. .EXAMPLE New-Subtract -a 5 -b 3 Returns 2. #> [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'FP')] param ( [Parameter(Mandatory = $true)] [int]$a, [Parameter(Mandatory = $true)] [int]$b ) Subtract -a $a -b $b } #EndRegion './public/New-Subtract.ps1' 30 #Region './suffix.ps1' -1 #EndRegion './suffix.ps1' 1 |