public void Dispose() { if (Connection != null) { Connection.Close(); } if (Model != null) { Model.Abort(); } }
public void Dispose() { Debug.Print(Connection + "--------in iconnect rabbitmq-------" + Model); if (Connection != null) { Connection.Close(); Connection = null; } if (Model != null) { Model.Abort(); Model = null; } Debug.Print(Connection + "--------in iconnect rabbitmq-------" + Model); }
/// <summary> /// /// </summary> public virtual void Disconnect() { if (Connection != null) { if (Connection.IsOpen) { Connection.Close(); } Connection.Dispose(); } Connection = null; if (Model != null) { Model.Abort(); } Model = null; }