This shows the different behavior between the accelerated and unaccelerated types after importing and using the module.
Import the module.
Import-Module ./CustomTypeExample.psd1Check the following completions:
[Usabl<tab>- nothing[Accelerat<tab>-[AcceleratedClass- tab again for[AcceleratedEnum[UsableClass]::<tab>- nothing[UsableEnum]::<tab>- nothing[AccleratedClass]::<tab>- Cycle through available static properties and methods[AccleratedEnum]::<tab>- Cycle through available enumerations and static methods(New-UsableClass) | Select-Object -Property <tab>- cycle through non-hidden properties(New-AcceleratedClass) | Select-Object -Property <tab>- cycle through non-hidden properties
Run the using statement to load the types.
using module ./CustomTypeExample.psd1Check the following completions:
[Usabl<tab>- nothing[Accelerat<tab>-[AcceleratedClass- tab again for[AcceleratedEnum[UsableClass]::<tab>- Cycle through available static properties and methods[UsableEnum]::<tab>- Cycle through available enumerations and static methods[AccleratedClass]::<tab>- Cycle through available static properties and methods[AccleratedEnum]::<tab>- Cycle through available enumerations and static methods(New-UsableClass) | Select-Object -Property <tab>- cycle through non-hidden properties(New-AcceleratedClass) | Select-Object -Property <tab>- cycle through non-hidden properties