public virtual void AddLogData(string key, object value) { if (key == null) { throw new ArgumentNullException(nameof(key)); } if (LogData.Any(ld => ld.Value == value)) { return; } ((BlockingCollection <LogData>)LogData).Add(new LogData { Key = key, Value = value }); }