Beispiel #1
0
        public void OnBeforeSerialize()
        {
            if (_keys == null)
            {
                _keys = new SRList <TKey>(_internalDict.Count);
            }

            if (_values == null)
            {
                _values = new SRList <TValue>(_internalDict.Count);
            }

            _keys.Clear(true);
            _values.Clear(true);

            _keys.AddRange(_internalDict.Keys);
            _values.AddRange(_internalDict.Values);
        }