Example #1
0
        public static void Main(string[] args)
        {
            var connection = new ServerConnection("192.168.1.10", 6543);
            connection.Open();

            var command = new ServerCommand(connection) {CommandText = "MYTH_PROTO_VERSION 40"};
            var result = command.Execute();
            Console.WriteLine(string.Format("{0}:{1}", result[0], result[1]));

            command.CommandText = "ANN Monitor Cena 0";
            result = command.Execute();
            Console.WriteLine(result[0]);

            command.CommandText = "QUERY_RECORDINGS Delete";
            result = command.Execute();
            Console.WriteLine(result.Length);

            var recordings = CreateRecordings(result);
            for (var recording = 0; recording < recordings.GetLength(0); recording++)
            {
                for (var field = 0; field < recordings.GetLength(1); field++)
                {
                    Console.Write(recordings[recording, field] + "\t");
                }
                Console.Write("\n");
            }

            command.CommandText = "DONE";
            result = command.Execute();
            Console.WriteLine(result);

            Console.ReadLine();
        }
        public void CanConvertResultToRecording()
        {
            var connection = new ServerConnection("192.168.1.10");
            connection.Open();

            var command = new ServerCommand(connection);
            command.CommandText = "MYTH_PROTO_VERSION 40";
            var result = command.Execute();
            Console.WriteLine(result);

            command.CommandText = "ANN Monitor Cena 0";
            result = command.Execute();
            Console.WriteLine(result);

            command.CommandText = "QUERY_RECORDINGS Play";
            result = command.Execute();
            Console.WriteLine(result);

            command.CommandText = "DONE";
            command.Execute();
        }
 public void CanConnectToMythBackend()
 {
     var connection = new ServerConnection("192.168.1.10", 6543);
     connection.Open();
     Assert.AreEqual(true, connection.Connected);
 }