Example #1
0
        public void DNETSerialize()
        {
            var values = new IEnumerableEntity();

            values.Populate();

            var tested = DNETSerializeHelper.TestDNETSerialize(values);

            Compare(values, tested.Item3 as IEnumerableEntity);

            Debug.WriteLine($"ArrayTest.DNETSerialize - Bytes: {tested.Item2.ToString()} - Elapsed: {tested.Item1.ToString()}");
        }
Example #2
0
        public void CustomSerialize()
        {
            var values = new IEnumerableEntity();

            values.Populate();

            var sw = Stopwatch.StartNew();

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

            var bytes = serialize.Serialize(values);

            var returnedValues = serialize.Deserialize(bytes);

            sw.Stop();

            //Compare(values, returnedValues);

            Debug.WriteLine($"IEnumerableTest.CustomSerialize - Bytes: {bytes.Length.ToString()} - Elapsed: {sw.Elapsed.ToString()}");
        }
Example #3
0
 private void Compare(IEnumerableEntity from, IEnumerableEntity to)
 {
     CompareArray(from.IEnumerableInt, to.IEnumerableInt);
 }