Ejemplo n.º 1
0
        public void DNETSerialize()
        {
            var values = new DictionaryEntity();

            values.Populate();

            var tested = DNETSerializeHelper.TestDNETSerialize(values);

            Compare(values, tested.Item3 as DictionaryEntity);

            Debug.WriteLine($"DictionaryTest.DNETSerialize - Bytes: {tested.Item2.ToString()} - Elapsed: {tested.Item1.ToString()}");
        }
Ejemplo n.º 2
0
        public void CustomSerialize()
        {
            var values = new DictionaryEntity();

            values.Populate();

            var sw = Stopwatch.StartNew();

            var serialize = BinarySerialize.From <DictionaryEntity>();

            var bytes = serialize.Serialize(values);

            var returnedValues = serialize.Deserialize(bytes);

            sw.Stop();

            Compare(values, returnedValues);

            Debug.WriteLine($"DictionaryTest.CustomSerialize - Bytes: {bytes.Length.ToString()} - Elapsed: {sw.Elapsed.ToString()}");
        }
Ejemplo n.º 3
0
 private void Compare(DictionaryEntity from, DictionaryEntity to)
 {
     CompareDictionary(from.Dic1, to.Dic1);
 }