Exemplo n.º 1
0
 private void Publish(ICentralCommand command)
 {
     foreach (var sender in _msmqSenders)
     {
         sender.Send(command);
     }
 }
Exemplo n.º 2
0
        private bool TryParseUpdateStatusCommand(string input, out ICentralCommand command)
        {
            var regex = new Regex(_updateStatusTemplate);

            if (regex.IsMatch(input))
            {
                command = new UpdateStatusMessage();
                return(true);
            }

            command = null;
            return(false);
        }
Exemplo n.º 3
0
        private bool TryParseChangePageTimeoutCommand(string input, out ICentralCommand command)
        {
            var regex = new Regex(_changePageTimeoutTemplate);

            if (regex.IsMatch(input))
            {
                command = new UpdatePageTimeoutMessage
                {
                    Timeout = int.Parse(regex.Match(input).Groups[1].Value)
                };

                return(true);
            }

            command = null;
            return(false);
        }