Example #1
0
 public ProjectionsDispatcher(
     IEventStoreConnection eventStoreConnection,
     IPositionStore positionStore,
     IEnumerable <IProjection> projections,
     ILog log)
 {
     EventStoreConnection = eventStoreConnection;
     this.positionStore   = positionStore;
     this.projections     = projections;
     this.log             = log;
 }
Example #2
0
 /// <summary>
 /// Compare two instances of IPositionStore, if they have same staff member and ShiftType, then return true
 /// </summary>
 /// <param name="positionX">Position Store.</param>
 /// <param name="positionY">Position Store.</param>
 /// <value>Is Equal.</value>
 public static bool PositionStoreEqual(IPositionStore positionX, IPositionStore positionY)
 {
     if (positionX == null && positionY == null)
     {
         return(true);
     }
     if (positionX?.StaffMember == positionY?.StaffMember && positionX?.ShiftType == positionY?.ShiftType)
     {
         return(true);
     }
     return(false);
 }
 public PositionManager(IPositionStore baseStore)
     : base(baseStore)
 {
     PositionStore = baseStore;
 }
Example #4
0
 public Event(IPositionStore positionStore)
 {
     PositionStore = positionStore;
 }
Example #5
0
 /// <summary>
 /// 创建
 /// </summary>
 /// <param name="config"></param>
 public Platform(IConfig config)
 {
     Config           = config ?? throw new ArgumentNullException();
     AccessTokenStore = new Provider.InProcess.AccessTokenStore();
     PositionStore    = new Provider.InProcess.PositionStore();
 }