Esempio n. 1
0
 public static void WriteStringDictionary(Dictionary <string, string> dictionary, BinaryWriter binaryWriter)
 {
     MyMwcMessageOut.WriteInt32(dictionary.Count, binaryWriter);
     foreach (var item in dictionary)
     {
         MyMwcMessageOut.WriteString(item.Key, binaryWriter);
         MyMwcMessageOut.WriteNullableString(item.Value, binaryWriter);
     }
 }
Esempio n. 2
0
        public static void WriteNullableString(string value, BinaryWriter binaryWriter)
        {
            bool hasValue = value != null;

            MyMwcMessageOut.WriteBool(hasValue, binaryWriter);
            if (hasValue)
            {
                MyMwcMessageOut.WriteString(value, binaryWriter);
            }
        }