[PSS2016]Primal Sense for $PSBoundParameters.ContainsKey

Post feature requests, product enhancement ideas, and other product-specific suggestions here. Do not post bug reports.
Forum rules
Do not post any licensing information in this forum.
This topic is 7 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
Bosparan
Posts: 290
Last visit: Fri Oct 08, 2021 11:59 am

[PSS2016]Primal Sense for $PSBoundParameters.ContainsKey

Post by Bosparan »

Hi,

a few months ago, I noticed a breaking change in how Enumerations were evaluated within boolean expressions. Which lead me from switching one of my most ancients behaviors: How to check whether a parameter was bound:

Previously
  1. if ($PSBoundParameters["BackgroundColor"])
  2.     # ...
  3. }
... to ...

currently
  1. if ($PSBoundParameters.ContainsKey("BackgroundColor"))
  2.     # ...
  3. }
As it happens, this is actually the definitive way to determine, whether a parameter was bound - the previous way was unreliable to begin with.

Soooo ... I know you implemented Primal Sense for the previous method at my request back then (many thanks, it has served me well), would you mind also adding Primal Sense for the precise method of determining whether a parameter was bound?

Cheers,
Bosparan
This topic is 7 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked