public override object unpack(ITransport transport) { int length = (int)Int32.unpack(transport); HashSet <T> obj = new HashSet <T> (); for (int i = 0; i < length; i++) { obj.Add((T)(type.unpack(transport))); } return(obj); }
public override object unpack(ITransport transport) { int length = (int)Int32.unpack(transport); List <T> lst = new List <T> (length); for (int i = 0; i < length; i++) { lst.Add((T)(type.unpack(transport))); } return(lst); }
public override object unpack(ITransport transport) { int length = (int)Int32.unpack(transport); Dictionary <K, V> map = new Dictionary <K, V>(length); for (int i = 0; i < length; i++) { K k = (K)(keytype.unpack(transport)); V v = (V)(valtype.unpack(transport)); map.Add(k, v); } return(map); }
public override Object unpack(ITransport transport) { int length = (int)Int32.unpack(transport); HeteroMap map = new HeteroMap(length); for (int i = 0; i < length; i++) { int keypid = (int)Int32.unpack(transport); AbstractPacker keypacker = getPacker(keypid); Object key = keypacker.unpack(transport); int valpid = (int)Int32.unpack(transport); AbstractPacker valpacker = getPacker(valpid); Object val = valpacker.unpack(transport); map.Add(key, keypacker, val, valpacker); } return(map); }