Exemple #1
0
 public UserHandler(IMongoRepository mongoRepository) : base(mongoRepository)
 {
     _mongoRepository = mongoRepository;
     _handlerType = "UserHandler";
     _lastProcessedPosition = new LastProcessedPosition();
 }
Exemple #2
0
 // this is used by dispatchers on restart
 public void GetLastPositionProcessed()
 {
     _lastProcessedPosition = _mongoRepository.Get<LastProcessedPosition>(x => x.HandlerType == _handlerType)
         ??new LastProcessedPosition{CommitPosition = Position.Start.CommitPosition,PreparePosition = Position.Start.PreparePosition,HandlerType = _handlerType};
 }