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

BeginReadUInt32() public method

public BeginReadUInt32 ( AsyncCallback callback, object state ) : IAsyncResult
callback AsyncCallback
state object
return IAsyncResult
        public IAsyncResult BeginReadUInt32(AsyncCallback callback, object state)
        {
            return AsyncMachine.BeginAsyncMachine(FillBuffer, 4, callback, state);
        }

Same methods

VhdDataReader::BeginReadUInt32 ( long offset, AsyncCallback callback, object state ) : IAsyncResult

Usage Example

        private IEnumerable <CompletionPort> CreateAsync(AsyncMachine <BlockAllocationTable> machine)
        {
            dataReader.SetPosition(header.TableOffset);

            var bat = new uint[header.MaxTableEntries];

            for (int block = 0; block < header.MaxTableEntries; block++)
            {
                dataReader.BeginReadUInt32(machine.CompletionCallback, null);
                yield return(CompletionPort.SingleOperation);

                bat[block] = dataReader.EndReadUInt32(machine.CompletionResult);
            }
            machine.ParameterValue = new BlockAllocationTable(header.MaxTableEntries, header.BlockSize, bat);
        }
All Usage Examples Of Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence.VhdDataReader::BeginReadUInt32