Esempio n. 1
0
        public string GetMessage()
        {
            PacketProp[] props = m_TimePacket.Packet.GetPacketProperties();
            if (props == null)
            {
                return("Unknown message");
            }
            else if (props.Length == 0)
            {
                return("Empty message");
            }

            StringBuilder sb = new StringBuilder();
            int           i  = 0;

            while (true)
            {
                PacketProp prop = props[i];
                sb.Append(prop.PropInfo.Name + ": \"" + prop.GetStringValue() + "\"");

                if (++i < props.Length)
                {
                    sb.Append(" ");
                }
                else
                {
                    break;
                }
            }
            return(sb.ToString());
        }