Exemple #1
0
        static async Task Main(string[] args)
        {
            ReduxConnection   reduxConnection   = new ReduxConnection("CheckMate", SocketOptions.Default);
            CancellationToken cancellationToken = CancellationToken.None;

            await reduxConnection.ConnectAsync(cancellationToken);

            CheckMateState state = new CheckMateState();


            reduxConnection.UpdateState(state, "Setup");

            int count = 0;

            while (!cancellationToken.IsCancellationRequested)
            {
                count++;

                if (count % 2 == 0)
                {
                    state.ChangelistCount++;
                }
                else
                {
                    state.Server = $"Server {Guid.NewGuid():D}";
                }

                reduxConnection.UpdateState(state, "Update Loop");

                await Task.Delay(5000);
            }

            reduxConnection.Disconnect();
        }
Exemple #2
0
 public Middleware(ReduxConnection connection, ActionDispatchDelegate next)
 {
     m_connection = connection;
     m_next       = next;
 }
Exemple #3
0
 public Reducer(ReduxConnection connection)
 {
     m_connection = connection;
 }