public static void DeserializeList <T>(BinaryTypesReader br, List <T> list, ReadDataDelegate <T> itemReader, object objParam) { //Clear the list before work starts. In case the list is null it will throw exception list.Clear(); int count = br.Read7BitInt(); for (int i = 0; i < count; i++) { T item = itemReader(br, objParam); list.Add(item); } }
public static void DeserializeDictionary <K, V>( BinaryTypesReader br, IDictionary <K, V> map, ReadDataDelegate <K> keyReader, object keyObjParam, ReadDataDelegate <V> valReader, object valObjParam) { int count = br.Read7BitInt(); for (int i = 0; i < count; i++) { K key = keyReader(br, keyObjParam); V val = valReader(br, valObjParam); map.Add(key, val); } }
public GenericTypeDefinition(string name, Type dataType, ReadDataDelegate readData) : base(name, dataType) { _readData = readData; }
public SimpleCollection(BinaryReader br, ReadDataDelegate delg) { ReadData = delg; Read(br); }
public SimpleCollection(ReadDataDelegate delg) { ReadData = delg; }
public SimpleArray(BinaryReader br, int count, ReadDataDelegate delg) : this(count, delg) { Read(br); }
public SimpleArray(int count, ReadDataDelegate delg) { Count = count; ReadData = delg; }