public Timeline(TStateType initialState, ITimelineStorage <TStateType> historyStorage, AdvanceTimeAction advanceTimeAction, ProcessCommandAction processCommandAction) { CurrentFrame = 0u; LatestFrame = 0u; OldestNewCommandFrame = 0; NeedRewind = false; _history = historyStorage; _history[CurrentFrame] = initialState; _advanceTimeAction = advanceTimeAction; _processCommandAction = processCommandAction; _commands = new Dictionary <uint, List <TCommandType> >(); InitialState = initialState; }
public Timeline(TStateType initialState, uint historySize, AdvanceTimeAction advanceTime, ProcessCommandAction processCommand) : this(initialState, new TimelineStorage <TStateType>(historySize), advanceTime, processCommand) { }