public ServiceMessage Send(ServiceMessage message)
        {

            if (!message.Type.Equals(typeof(String)) && !message.Type.Equals(typeof(PrintRequest)) && !message.Type.Equals(typeof(MenuCommand)))
            {
                throw new WrongMessageTypeException("ServiceMessage: Wrong message type: " + message.Type);
            }

            if (message.Type.Equals(typeof(MenuCommand)))
            {
                String query = (String)(((MenuCommand)message.Message).Name);
                switch (query)
                {
                    case "list":
                        catalog.SearchAll();
                        break;
                    case "search author":
                        catalog.SearchByAuthorName((String)((MenuCommand)message.Message).Arg);
                        break;
                    case "search name":
                        catalog.SearchByTrackName((String)((MenuCommand)message.Message).Arg);
                        break;
                    case "add":
                        catalog.Add(((MenuCommand)message.Message).Arg, ((MenuCommand)message.Message).Arg);
                        break;
                    case "del":
                        catalog.Remove(((MenuCommand)message.Message).Arg, ((MenuCommand)message.Message).Arg);
                        break;

                }
            }


            if (message.Type.Equals(typeof(PrintRequest)))
            {
                printService.Send(new ServiceMessage(typeof(String), message.Message));
            }

            return null;
        }