Variables.psm1
function Get-DeclareVariableCode { param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [String]$name, [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [String]$value, [Parameter(Mandatory=$false)] [Switch]$const ) # Create the line and return $line = "$($name) = $($value);" if ($const) { $line = "const $($line)" } return $line } |