internal void ThrowIfDetaching(string operation)
{
if (this.IsDetaching)
{
throw new AmqpException(this.Error ??
new Error()
{
Condition = ErrorCode.IllegalState,
Description = Fx.Format(SRAmqp.AmqpIllegalOperationState, operation, this.state)
});
}
}