public static Packer.MetaType UnpackDirect(Packer packer) { var meta = new Packer.MetaType(); meta.id = Int32Serializer.UnpackDirect(packer); meta.type = StringSerializer.UnpackDirect(packer); return(meta); }
public object Unpack(Packer packer) { var length = Int32Serializer.UnpackDirect(packer); var meta = new Packer.MetaType[length]; for (int i = 0; i < length; ++i) { meta[i] = packer.UnpackInternal <Packer.MetaType>(); } return(meta); }
public static Packer.MetaType[] UnpackDirect(Packer packer) { var length = Int32Serializer.UnpackDirect(packer); var meta = new Packer.MetaType[length]; for (int i = 0; i < length; ++i) { meta[i] = MetaTypeSerializer.UnpackDirect(packer); } return(meta); }
public static void PackDirect(Packer packer, Packer.Meta meta) { var arr = new Packer.MetaType[meta.meta.Count]; var i = 0; foreach (var kv in meta.meta) { arr[i++] = kv.Value; } MetaTypeArraySerializer.PackDirect(packer, arr); }
public void Pack(Packer packer, object obj) { var meta = (Packer.Meta)obj; var arr = new Packer.MetaType[meta.meta.Count]; var i = 0; foreach (var kv in meta.meta) { arr[i++] = kv.Value; } packer.PackInternal(arr); }
public static void PackDirect(Packer packer, Packer.MetaType meta) { Int32Serializer.PackDirect(packer, meta.id); StringSerializer.PackDirect(packer, meta.type); }