Exemple #1
0
        public void AddItem(IPoderosaLogCategory category, string text) {
            lock (this) {
                PoderosaLogItem item = new PoderosaLogItem(this, category, text, _items.Count);
                _items.AddLast(item);
                while (_items.Count > _capacity)
                    _items.RemoveFirst();

                if (_listeners.Count > 0) {
                    foreach (IPoderosaLogListener l in _listeners)
                        l.OnNewItem(item);
                }
            }
        }
        public void AddItem(IPoderosaLogCategory category, string text)
        {
            lock (this) {
                PoderosaLogItem item = new PoderosaLogItem(this, category, text, _items.Count);
                _items.AddLast(item);
                while (_items.Count > _capacity)
                {
                    _items.RemoveFirst();
                }

                if (_listeners.Count > 0)
                {
                    foreach (IPoderosaLogListener l in _listeners)
                    {
                        l.OnNewItem(item);
                    }
                }
            }
        }