コード例 #1
0
        public void Process(DataCollectorCompletedTraining @event, EventSourceId dataCollectorId)
        {
            var dataCollector = _dataCollectors.GetById(dataCollectorId.Value);

            dataCollector.InTraining = false;

            _dataCollectors.Update(dataCollector);
        }
コード例 #2
0
        public void Process(DataCollectorCompletedTraining @event)
        {
            var inTraining    = false;
            var dataCollector = _dataCollectors.GetById(@event.DataCollectorId);

            dataCollector.InTraining = inTraining;

            _dataCollectors.Update(dataCollector);
        }
コード例 #3
0
 public void Process(DataCollectorCompletedTraining @event)
 {
     _dataCollectors.Update(d => d.Id == (DataCollectorId)@event.DataCollectorId,
                            Builders <DataCollector> .Update.Set(d => d.InTraining, false));
 }