public void DNETSerialize() { var values = new DateTimeEntity(); values.Populate(); var tested = DNETSerializeHelper.TestDNETSerialize(values); Compare(values, tested.Item3 as DateTimeEntity); Debug.WriteLine($"DateTimeTest.DNETSerialize - Bytes: {tested.Item2.ToString()} - Elapsed: {tested.Item1.ToString()}"); }
public void CustomSerialize() { var values = new DateTimeEntity(); values.Populate(); var sw = Stopwatch.StartNew(); var serialize = BinarySerialize.From <DateTimeEntity>(); var bytes = serialize.Serialize(values); var returnedValues = serialize.Deserialize(bytes); sw.Stop(); Compare(values, returnedValues); Debug.WriteLine($"DateTimeTest.CustomSerialize - Bytes: {bytes.Length.ToString()} - Elapsed: {sw.Elapsed.ToString()}"); }