public static void Read <T1, T2>(this Dictionary <Tuple <T1, long>, T2> _this, AssetStream stream) where T1 : IAssetReadable, new() where T2 : IAssetReadable, new() { int count = stream.ReadInt32(); for (int i = 0; i < count; i++) { Tuple <T1, long> key = stream.ReadTupleTLong <T1>(); T2 value = new T2(); value.Read(stream); _this.Add(key, value); } }
public static void Read(this IDictionary <Tuple <ushort, ushort>, float> _this, AssetStream stream) { int count = stream.ReadInt32(); for (int i = 0; i < count; i++) { Tuple <ushort, ushort> key = stream.ReadTupleUInt16UInt16(); float value = stream.ReadSingle(); _this.Add(key, value); } }