Bruce Payette
3a4c410499
Fix for #6855 - Measure-Object should handle scriptblock properties. ( #6934 )
...
Measure-Object should handle `ScriptBlock` properties. Fixed by renaming `MshExpression` to `PSPropertyExpression` and making it public. Then in `MeasureObjectCommand`, lifting it up to the parameter level. Previously the implementation exposed the Property as a string and
wrapped it internally as a `PSPropertyExpression`. Now the parameter type is `PSPropertyExpression` directly allowing for both wildcard strings and `ScriptBlock`.
`PSPropertyExpression` now lives in a public namespace where it can be used by cmdlet and script authors to easily add the same type of functionality to their commands. I also modified `PSPropertyExpression` to handle hashtables properly as objects so
@{prop = 3} | measure-object prop
and
@{prop = 3} | measure-object {$_.prop}
will work the same. (Previously the example using just the property name would fail.)
2018-06-20 00:23:11 -07:00
..
2018-06-08 10:49:03 +05:00
2018-03-23 10:26:23 -07:00
2018-04-25 22:40:26 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:32:13 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-05-17 14:42:04 -07:00
2018-04-24 10:04:42 +05:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-04-03 11:17:05 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-06-20 00:23:11 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-06-12 23:48:34 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-02-13 09:23:53 -08:00
2018-05-23 07:57:03 +05:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-06-08 10:49:03 +05:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-05-17 14:42:04 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00
2018-03-23 10:26:23 -07:00