コード例 #1
0
        /// <see cref="IMiddleware.AfterDispatch(IAction)"/>
        public override void AfterDispatch(IAction action)
        {
            ReduxDevToolsInterop.Dispatch(action, GetState());

            // As actions can only be executed if not in a historical state (yes, "a" historical, pronounce your H!)
            // ensure the latest is incremented, and the current = latest
            SequenceNumberOfLatestState++;
            SequenceNumberOfCurrentState = SequenceNumberOfLatestState;
        }
コード例 #2
0
 /// <summary>
 /// Creates a new instance of the middleware
 /// </summary>
 public ReduxDevToolsMiddleware(ReduxDevToolsInterop reduxDevToolsInterop)
 {
     ReduxDevToolsInterop = reduxDevToolsInterop;
     SerializationOptions = new JsonSerializerOptions {
         PropertyNameCaseInsensitive = true,
         WriteIndented = false
     };
     ReduxDevToolsInterop.OnJumpToState = OnJumpToState;
     ReduxDevToolsInterop.OnCommit      = OnCommit;
 }
コード例 #3
0
 private void OnCommit(object sender, EventArgs e)
 {
     ReduxDevToolsInterop.Init(GetState());
     SequenceNumberOfCurrentState = SequenceNumberOfLatestState;
 }
コード例 #4
0
 public override void Initialize(IStore store)
 {
     base.Initialize(store);
     ReduxDevToolsInterop.Init(GetState());
 }
コード例 #5
0
 public override string GetClientScripts()
 {
     return(ReduxDevToolsInterop.GetClientScripts());
 }