Beispiel #1
0
 public override void Write(Library.Collections.BitStream stream, ref TItem[] value, MySerializeInfo info)
 {
     stream.WriteVariant((uint)value.Length);
     for (int i = 0; i < value.Length; i++)
     {
         MySerializationHelpers.Write <TItem>(stream, ref value[i], m_itemSerializer, info.ItemInfo ?? MySerializeInfo.Default);
     }
 }
Beispiel #2
0
 public override void Write(Library.Collections.BitStream stream, ref UInt64 value, MySerializeInfo info)
 {
     if (info.IsVariant || info.IsVariantSigned)
     {
         stream.WriteVariant(value);
     }
     else
     {
         stream.WriteUInt64(value);
     }
 }
Beispiel #3
0
 public override void Write(Library.Collections.BitStream stream, ref Int32 value, MySerializeInfo info)
 {
     if (info.IsVariant)
     {
         stream.WriteVariant((UInt32)value);
     }
     else if (info.IsVariantSigned)
     {
         stream.WriteVariantSigned(value);
     }
     else
     {
         stream.WriteInt32(value);
     }
 }