Microsoft.TeamFoundation.VersionControl.Client.UploadService.CopyStream C# (CSharp) Method

CopyStream() private method

private CopyStream ( Stream source, Stream destination ) : void
source Stream
destination Stream
return void
        private void CopyStream(Stream source, Stream destination)
        {
            byte[] buffer = new byte[ChunkSize];
            int cnt;
            while((cnt = source.Read(buffer, 0, ChunkSize)) > 0)
            {
                destination.Write(buffer, 0, cnt);
            }
            destination.Flush();
        }