Advertisement
Suchiman

Untitled

Jul 31st, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1. private Task WriteToPipe()
  2. {
  3.     return Task.Run(() =>
  4.     {
  5.         int read = 0;
  6.         do
  7.         {
  8.             read = await commandProcess.StandardOutput.BaseStream.Read(ReadBuffer, 0, ReadBuffer.Length);
  9.             if (read != 0)
  10.             {
  11.                 QueuePipe.Add((byte[])ReadBuffer.Clone(), cancelPipeToken.Token);
  12.             }
  13.         }
  14.         while (read != 0);
  15.     });
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement