System.Net.BufferedReadStream.ReadAsyncResult.OnRead C# (CSharp) Method

OnRead() private static method

private static OnRead ( IAsyncResult result ) : void
result IAsyncResult
return void
            private static void OnRead(IAsyncResult result)
            {
                if (!result.CompletedSynchronously)
                {
                    ReadAsyncResult thisPtr = (ReadAsyncResult)result.AsyncState;
                    try
                    {
                        thisPtr._read += thisPtr._parent.BaseStream.EndRead(result);
                        thisPtr.InvokeCallback();
                    }
                    catch (Exception e)
                    {
                        if (thisPtr.IsCompleted)
                            throw;
                        thisPtr.InvokeCallback(e);
                    }
                }
            }
        }
BufferedReadStream.ReadAsyncResult