public void ReleaseTest() { SendBuffer target = new SendBuffer(); // TODO: 初始化为适当的值 target.Release(); Assert.Inconclusive("无法验证不返回值的方法。"); }
/// <summary> /// 清除数据 /// </summary> public void Clear() { m_LockFlushAndPending.Enter(); { while (m_PendingBuffer.Count > 0) { m_PendingBuffer.Dequeue().Release(); } if (m_FlushBuffer.IsNull == false) { m_FlushBuffer.Release(); m_FlushBuffer = SendBuffer.NullBuffer; } // 清空 m_WaitSendSize = 0; } m_LockFlushAndPending.Exit(); }