Example #1
0
 public static bool TryParse(int length, ref byte[] buffer, out string[] result)
 {
     result = new string[length];
     for (int i = 0; i < length; i++)
     {
         McString.TryParse(ref buffer, out result[i]);
     }
     return(true);
 }
Example #2
0
        public static byte[] ToBytes(string[] value)
        {
            List <byte> bytes = new List <byte>();

            foreach (string str in value)
            {
                bytes.AddRange(McString.ToBytes(str));
            }
            return(bytes.ToArray());
        }
Example #3
0
        public static byte[] ToBytes(Chat value)
        {
            string chatString = JsonConvert.SerializeObject(value);

            return(McString.ToBytes(chatString));
        }