G
Guest
HI,
I am using Process.RedirectStandardOutput to read the output of a console process, quite successfully. (I am basically just doing "cmd.exe /c dir *.csproj /s /b" to list out all the .csproj files), however, instead of appending >textfile.txt to the end, I can use a StreamReader to read the data. This *seems* to be working successfully, but i was wondering what would happen if the application reading the data couldn't read (and process) it as fast as the process was outputting it?
Or does it (as I'm hoping) know that if its standard output redirected flag is true, then it needs to wait for each line that it outputs to be read before it can continue? I was hoping somebody could confirm this behaviour or tell me what it really is.
Thanks!
I am using Process.RedirectStandardOutput to read the output of a console process, quite successfully. (I am basically just doing "cmd.exe /c dir *.csproj /s /b" to list out all the .csproj files), however, instead of appending >textfile.txt to the end, I can use a StreamReader to read the data. This *seems* to be working successfully, but i was wondering what would happen if the application reading the data couldn't read (and process) it as fast as the process was outputting it?
Or does it (as I'm hoping) know that if its standard output redirected flag is true, then it needs to wait for each line that it outputs to be read before it can continue? I was hoping somebody could confirm this behaviour or tell me what it really is.
Thanks!