public void When(NewProjectionVersionIsNowLive e)
 {
     Id = e.Id;
     Versions.Add(e.ProjectionVersion);
     LastVersionRequestTimebox = LastVersionRequestTimebox.Reset();
     HashHistoryOfLiveVersions.Add(e.ProjectionVersion.Hash);
 }
Ejemplo n.º 2
0
 public void FinalizeVersionRequest(ProjectionVersion version)
 {
     var buildingVersion = state.All.Where(x => x == version).SingleOrDefault();
     // if (ReferenceEquals(null, buildingVersion) == false)
     {
         var @event = new NewProjectionVersionIsNowLive(state.Id, buildingVersion.WithStatus(ProjectionStatus.Live));
         Apply(@event);
     }
 }
Ejemplo n.º 3
0
        public void FinalizeVersionRequest(ProjectionVersion version)
        {
            var isVersionFound = state.Versions.Contains(version);

            if (isVersionFound)
            {
                var @event = new NewProjectionVersionIsNowLive(state.Id, version.WithStatus(ProjectionStatus.Live));
                Apply(@event);
            }

            EnsureThereIsNoOutdatedBuildingVersions();
        }
Ejemplo n.º 4
0
 public void Handle(NewProjectionVersionIsNowLive @event)
 {
     projectionVersionStore.Cache(@event.ProjectionVersion);
 }
 public Task HandleAsync(NewProjectionVersionIsNowLive @event)
 {
     projectionVersionStore.Cache(@event.ProjectionVersion);
     return(Task.CompletedTask);
 }
Ejemplo n.º 6
0
 public void Handle(NewProjectionVersionIsNowLive @event)
 {
     State.Id = @event.Id;
     State.AllVersions.Add(@event.ProjectionVersion);
 }
 public void Handle(NewProjectionVersionIsNowLive @event)
 {
     State.Id       = @event.Id;
     State.Building = null;
     State.Live     = @event.ProjectionVersion;
 }
Ejemplo n.º 8
0
 public Task HandleAsync(NewProjectionVersionIsNowLive @event)
 {
     State.Id = @event.Id;
     State.AllVersions.Add(@event.ProjectionVersion);
     return(Task.CompletedTask);
 }