Esempio n. 1
0
        public Dictionary <string, MUSPropListItem> ReadPropList()
        {
            Dictionary <string, MUSPropListItem> props = new Dictionary <string, MUSPropListItem>();

            int lenght = this.ReadInt32();

            for (int i = 0; i < lenght; i++)
            {
                this.ReadShort(); //Symbol type, allways string

                string key = this.ReadEvenPaddedString();

                MUSType dataType = (MUSType)this.ReadShort();

                byte[] data = this.ReadBytes(dataType == MUSType.Integer ? 4 : this.ReadInt32());
                if (data.Length % 2 != 0)
                {
                    this.ReadByte();
                }

                props.Add(key, new MUSPropListItem(dataType, data));
            }

            return(props);
        }
Esempio n. 2
0
        public MUSServerMessage(string subject, MUSType type)
        {
            this.Data = new List <byte>();

            this.WriteInt32(0); //error code
            this.WriteInt32(0); //timestamp
            this.WriteEvenPaddedString(subject);
            this.WriteEvenPaddedString("System");

            this.WriteInt32(1);              //RECEIVERS AMOUNT
            this.WriteEvenPaddedString("*"); //RECEIVER
            this.WriteShort((short)type);
        }
Esempio n. 3
0
 public MUSPropListItem(MUSType type, byte[] data)
 {
     this.Type = type;
     this.Data = data;
 }