AddProperty() public method

public AddProperty ( string txt ) : void
txt string
return void
Beispiel #1
0
        internal static Txt Get(BinaryReader reader)
        {
            Txt    txt = new Txt();
            ushort byteCount = BinaryHelper.ReadUInt16(reader), byteRead = 0;

            while (byteRead < byteCount)
            {
                byte propertyLength = reader.ReadByte();
                byteRead += (ushort)(propertyLength + 1);
                txt.AddProperty(Encoding.UTF8.GetString(reader.ReadBytes(propertyLength), 0, propertyLength));
            }
            return(txt);
        }
Beispiel #2
0
 internal static Txt Get(BinaryReader reader)
 {
     Txt txt = new Txt();
     ushort byteCount, byteRead = 0;
     //Useless Datalength
     Message.FromBytes(reader.ReadBytes(2), out byteCount);
     while (byteRead < byteCount)
     {
         byte propertyLength = reader.ReadByte();
         byteRead += (ushort)(propertyLength + 1);
         txt.AddProperty(Encoding.UTF8.GetString(reader.ReadBytes(propertyLength), 0, propertyLength));
     }
     return txt;
 }