From 4cb16c770517f39f90f5251e8a039c1908668a2a Mon Sep 17 00:00:00 2001 From: Jake Bolton Date: Tue, 5 Dec 2023 10:34:17 -0600 Subject: [PATCH] updated test --- Pwsh/Parameters/Using-ThrowIfNullOrWhiteSpace-OnObjects.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Pwsh/Parameters/Using-ThrowIfNullOrWhiteSpace-OnObjects.ps1 b/Pwsh/Parameters/Using-ThrowIfNullOrWhiteSpace-OnObjects.ps1 index 16eddf3..5d43d2f 100644 --- a/Pwsh/Parameters/Using-ThrowIfNullOrWhiteSpace-OnObjects.ps1 +++ b/Pwsh/Parameters/Using-ThrowIfNullOrWhiteSpace-OnObjects.ps1 @@ -1,4 +1,5 @@ function FormatDate { + [CmdletBinding()] param( [Parameter(Mandatory, ValueFromPipeline)] [datetime]$Dt, @@ -6,9 +7,9 @@ [Parameter()] [ArgumentCompletions( '([CultureInfo]::InvariantCulture)', 'en-us', 'de-de' )] - [CultureInfo]$Culture = ([CultureInfo]::InvariantCulture) + [CultureInfo]$Culture = [CultureInfo]::InvariantCulture ) - + $PSBoundParameters | ConvertTo-Json -Depth 1 -Compress | Write-debug $null -eq $Culture | Join-String -f 'Cult == $Null: ' | write-verbose -verb if( [String]::IsNullOrWhiteSpace( $Culture )) { throw "MandatoryCultureWasBlank!"