Meebey.SmartIrc4net.IrcConnection.WriteThread._CheckBelowMediumBuffer C# (CSharp) Method

_CheckBelowMediumBuffer() private method

private _CheckBelowMediumBuffer ( ) : bool
return bool
            private bool _CheckBelowMediumBuffer()
            {
                if ((_BelowMediumCount > 0) &&
                    (_BelowMediumSentCount < _BelowMediumThresholdCount)) {
                    string data = (string)((Queue)_Connection._SendBuffer[Priority.BelowMedium]).Dequeue();
                    if (_Connection._WriteLine(data) == false) {
                #if LOG4NET
                        Logger.Queue.Warn("Sending data was not sucessful, data is requeued!");
                #endif
                        ((Queue)_Connection._SendBuffer[Priority.BelowMedium]).Enqueue(data);
                    }
                    _BelowMediumSentCount++;

                    if (_BelowMediumSentCount < _BelowMediumThresholdCount) {
                        return false;
                    }
                }

                return true;
            }