Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence.VhdDataReader.ReadBytesAsync C# (CSharp) Method

ReadBytesAsync() private method

private ReadBytesAsync ( AsyncMachine machine, long offset, int count ) : IEnumerable
machine AsyncMachine
offset long
count int
return IEnumerable
        private IEnumerable<CompletionPort> ReadBytesAsync(AsyncMachine<byte[]> machine, long offset, int count)
        {
            StreamHelper.BeginReadBytes(this.reader.BaseStream, offset, count, machine.CompletionCallback, null);
            yield return CompletionPort.SingleOperation;
            byte[] values = StreamHelper.EndReadBytes(machine.CompletionResult);
            machine.ParameterValue = values;
        }