Parameter Classes
Synopsis
Parameter Classes allow great flexibility and comfort for accepting input.
Key Features
- Bring Information, not Type
- Highly intuitive user experience
- Greater convenience in specifying input
- Extensible to understand custom input
Description
Parameter classes are C#-based data types, designed to be used as expected data type on parameters. For example:
[CmdletBinding()]
param (
[string]
$ComputerName
)
would become
[CmdletBinding()]
param (
[PSFComputer]
$ComputerName
)
This moves a lot of the input validation and all its interpretation into the parameter binding, making it easier to use for developers than regular types. They generally also offer greater flexibility in accepting input and are often considered a great improvement over regular user input.
Quick Start Guides
In depth Guides
Notes
Version | 1.0 |
Written on: | 2018-04-16 |
Updated on: | 2018-04-16 |