Esempio n. 1
0
        public void Code(Type t, ref ICountableDictSet dictSet)
        {
            long count = CodeCountLong(ref dictSet, v => v.LongCount);

            if (count < 1L)
            {
                return;
            }
            var keyType = dictSet.KeyType;

            foreach (var obj in dictSet.Objects)
            {
                var key = obj;
                TypeCoder.Write(this, keyType, ref key);
            }
        }
Esempio n. 2
0
        public void Code(Type t, ref ICountableDictSet dictSet)
        {
            int count = CodeCount(ref dictSet,
                                  n => (ICountableDictSet)Activator.CreateInstance(t, n));

            if (count < 1)
            {
                return;
            }

            var keyType = dictSet.KeyType;

            while (count-- > 0)
            {
                object key = null;
                TypeCoder.Read(this, keyType, ref key);
                dictSet.AddObject(key);
            }
        }
 public void Code(Type t, ref ICountableDictSet dict)
 {
     throw new NotImplementedException();
 }