Microsoft.Azure.Amqp.AsyncIO.AsyncReader.OnReadBufferComplete C# (CSharp) Method

OnReadBufferComplete() static private method

static private OnReadBufferComplete ( TransportAsyncCallbackArgs args ) : void
args Microsoft.Azure.Amqp.Transport.TransportAsyncCallbackArgs
return void
            static void OnReadBufferComplete(TransportAsyncCallbackArgs args)
            {
                var thisPtr = (AsyncReader)args.UserToken;
                bool shouldContine;
                try
                {
                    shouldContine = thisPtr.HandleReadBufferComplete(args);
                }
                catch (Exception exception)
                {
                    if (Fx.IsFatal(exception))
                    {
                        throw;
                    }

                    thisPtr.asyncIo.ioHandler.OnIoFault(exception);
                    thisPtr.Cleanup();
                    shouldContine = false;
                }

                if (shouldContine)
                {
                    thisPtr.ReadBuffer();
                }
            }