예제 #1
0
        private void OnCommandCompleted(CommandCompletedEventArgs e)
        {
            var handler = CommandCompleted;

            if (handler != null)
            {
                handler(this, e);
            }
        }
예제 #2
0
        private void ParseNextResponse(object userState)
        {
            var line      = reader.ReadLine();
            var arguments = line.Split(',');

            var offset = DateTimeOffset.Parse(arguments[0]);

            nextResponse = new CommandCompletedEventArgs(Convert.ToByte(arguments[1]), Convert.FromBase64String(arguments[2]), null, false, userState);
            responseTimer.Change(0, (int)offset.Offset.TotalMilliseconds);
        }
예제 #3
0
        void manager_CommandCompleted(object sender, CommandCompletedEventArgs e)
        {
            var line = string.Format("{0},{1},{2}", DateTimeOffset.Now, e.Command, Convert.ToBase64String(e.Response));

            writer.WriteLine(line);
        }