示例#1
0
        public void Event_seen_reported_on_collect()
        {
            // Act
            _errorEventAggregator.Collect(new ErrorEventWireModel(_attribValues, false, 0.1f));

            // Assert
            Mock.Assert(() => _agentHealthReporter.ReportErrorEventSeen());
        }
        public override void Collect(ErrorEventWireModel errorEventWireModel)
        {
            _agentHealthReporter.ReportErrorEventSeen();

            _readerWriterLock.EnterReadLock();
            try
            {
                AddEventToCollection(errorEventWireModel);
            }
            finally
            {
                _readerWriterLock.ExitReadLock();
            }
        }