public override int EndRead(IAsyncResult asyncResult)
{
// todo: check if it is of same reference
asyncResult.AsyncWaitHandle.WaitOne();
var ar = (CombinationStreamAsyncResult)asyncResult;
if (ar.Exception != null)
{
throw ar.Exception;
}
return ar.BytesRead;
}