示例#1
0
        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);
            }
        }