BeginReadUInt32() public method

public BeginReadUInt32 ( AsyncCallback callback, object state ) : IAsyncResult
callback AsyncCallback
state object
return IAsyncResult
コード例 #1
0
        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);
        }
コード例 #2
0
 private IAsyncResult BeginReadReserved1(VhdPropertyAttribute attribute, AsyncCallback callback, object state)
 {
     return(dataReader.BeginReadUInt32(headerOffset + attribute.Offset, callback, state));
 }
コード例 #3
0
 private IAsyncResult BeginReadCheckSum(VhdPropertyAttribute attribute, AsyncCallback callback, object state)
 {
     return(dataReader.BeginReadUInt32(this.GetFooterOffset() + attribute.Offset, callback, state));
 }
コード例 #4
0
 private IAsyncResult BeginReadPlatformCode(VhdPropertyAttribute attribute, AsyncCallback callback, object state)
 {
     return(dataReader.BeginReadUInt32(offset + attribute.Offset, callback, state));
 }