static void topicTest_client_MessageReceived(object sender, MessageEventArgs <ServerMessageType> e)
 {
     switch (e.MessageType)
     {
     case ServerMessageType.SomeObject:
         SimpleObject obj = e.GetEmbeddedObject <SimpleObject>();
         Console.WriteLine("Message received, value -> " + obj.Value);
         break;
     }
 }
        static void server_MessageReceived(object sender, MessageEventArgs <ClientRequestType> e)
        {
            switch (e.MessageType)
            {
            case ClientRequestType.SomeObject:
                SimpleObject obj = e.GetEmbeddedObject <SimpleObject>();
                break;

            case ClientRequestType.Plain:
                Console.WriteLine("Client request received");
                break;
            }
        }
        static void client_MessageReceived(object sender, MessageEventArgs <ServerMessageType> e)
        {
            switch (e.MessageType)
            {
            case ServerMessageType.SomeObject:
                SimpleObject obj = e.GetEmbeddedObject <SimpleObject>();
                break;

            case ServerMessageType.Plain:
                Interlocked.Increment(ref _Counter);
                Console.WriteLine("Server message received");
                break;
            }
        }