PowerShell/test/tools/Modules
Dan Thompson ce3cb68551 Make Select-Object/ForEach-Object/Where-Object see dynamic properties (#6898)
Dynamic (DLR) objects work in some places today, but not others.  This change expands that support to ForEach-Object, Where-Object and the family of cmdlets that use 'MshExpression' (Select-Object, etc.).

This change addresses both wildcard and non-wildcard cases. In wildcard cases, it uses the existing support of generating PSDynamicMember objects for names returned by GetDynamicMemberNames.

In non-wildcard cases, a dynamic property access is attempted whether or not the name shows up in GetDynamicMemberNames, but a truly "blind" access is only attempted if we see that the base object is an IDMOP. If the dynamic access fails, you'll get the same or a similar error experience as before ("The property 'Blarg' cannot be found", or no error at all, depending on the cmdlet and the strict mode setting).

The included test coverage includes a stub for the.ForEach operator--once people are happy with this change, I can continue by adding support there.

This change should allegedly also have positive perf impact, though in actual perf testing, although it does seem ever-so-slightly faster, I found it difficult to measure much difference at all.
2018-06-12 23:48:34 -07:00
..
HelpersCommon Make Select-Object/ForEach-Object/Where-Object see dynamic properties (#6898) 2018-06-12 23:48:34 -07:00
HelpersHostCS Update copyright and license headers (#6134) 2018-02-13 09:23:53 -08:00
HelpersLanguage Rename some tests because they are duplicates (#6312) 2018-03-07 10:25:49 -08:00
HelpersRemoting Update copyright and license headers (#6134) 2018-02-13 09:23:53 -08:00
HttpListener Update links that contain 'en-us' culture (#7013) 2018-06-08 10:49:03 +05:00
PSSysLog Add PowerShell logging tests for macOS and Linux (#6025) 2018-03-29 14:46:08 -07:00
WebListener Add -Resume Feature to Web Cmdlets (#6447) 2018-03-26 12:23:24 -07:00