Microsoft.Azure.Amqp.ByteBuffer.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
        public void Dispose()
        {
            this.RemoveReference();
        }

Usage Example

Example #1
0
            void ReadBuffer()
            {
                try
                {
                    if (this.asyncIo.State == AmqpObjectState.End)
                    {
                        this.Cleanup();
                        ByteBuffer buffer = (ByteBuffer)this.readAsyncEventArgs.UserToken2;
                        if (buffer != null)
                        {
                            buffer.Dispose();
                        }
                    }
                    else
                    {
                        while (this.asyncIo.State != AmqpObjectState.End)
                        {
                            if (!this.asyncIo.transport.ReadAsync(this.readAsyncEventArgs))
                            {
                                if (!this.HandleReadBufferComplete(this.readAsyncEventArgs))
                                {
                                    break;
                                }
                            }
                            else
                            {
                                break;
                            }
                        }
                    }
                }
                catch (Exception exception)
                {
                    if (Fx.IsFatal(exception))
                    {
                        throw;
                    }

                    this.asyncIo.ioHandler.OnIoFault(exception);
                    this.Cleanup();
                }
            }
All Usage Examples Of Microsoft.Azure.Amqp.ByteBuffer::Dispose