5 ms·
How does that whole "pipe entire objects back and forth" thing work? I mean it seems that there must be some huge machinery to facilitate that kind of thing. Fo
by jpr 16y ago
How does that whole "pipe entire objects back and forth" thing work? I mean it seems that there must be some huge machinery to facilitate that kind of thing. For example, if I pipe object from my program to another, how does the other program know what to expect? It must have some sort of type information available, which imposes some pre-planning.
Also, when I pipe an object to another program, can the receiver call methods on it and are the changes visible to the sender?
- jules 16y agoI'm not sure how they do it and I've only used the basic features of powershell. That said, commands in powershell are .NET classes that define a method ProcessRecord. Inside this they can call WriteObject to write an object to the output stream. So it seems that they can just implement this without any parsing by passing objects around in the .NET runtime.