Add one or more type abbreviations, like the built-in [xml] for System.Xml.XmlDocument.
Extends the built-in set of type abbreviations with user declared ones. Two common abbreviations are supplied as switch parameters, and then others can be added free-form.
Add-Accelerator -XDocument
Add [xdoc] the easy way
Add-Accelerator -Mapping @{ "xdoc" = [type]::gettype("System.Xml.Linq.XDocument")
Add [xdoc] by the long way round
public class AddAcceleratorCommand : PSCmdlet
| name | description |
|---|---|
| AddAcceleratorCommand() | The default constructor. |
| Accelerator { get; set; } | Add [accelerators] for the accelerator type |
| Mapping { get; set; } | Mapping of name to type |
| XDocument { get; set; } | Add [xdoc] for the System.Xml.Linq.XDocument type |
| override BeginProcessing() | Initialise the map of accelerator to type |
| override EndProcessing() | Apply the new accelerator to type mappings |
| override ProcessRecord() | Accumulate new accelerator to type mappings |