PscxInputObjectPathCommandBase question

Topics: Developer Forum
Developer
Jan 3, 2007 at 4:19 AM
Quick question: given the two distinct parameter sets handled by this class -- path and inputobject -- why does a piped object trigger both ProcessPath AND ProcessInputObject, yet a path only triggers ProcessPath? I would have thought that a piped object should not trigger process path?

- Oisin
Developer
Jan 3, 2007 at 4:23 AM
ok, never mind -- overriding InputSettings and setting settings.ProcessFileInfoAsPath = false; does the trick.

I'm getting there lads, have patience with me. ;)
Coordinator
Jan 3, 2007 at 4:56 AM
No problem. The base classes Jachym has put in place are pretty nice where you can use them and they are fairly flexible. You really realize this when you can write a parameter and pipeline aware cmdlet like Get-FileVersionInfo in so few lines of code. In many of my file oriented cmdlets I always set the ProcessDirectoryInfoAsPath property to false and then I register to ignore these objects.