示例#1
0
        private void Test_Deep_Clone(ObjectSerializerBase sf)
        {
            var foo  = TestHelper.GetFoo();
            var foo2 = sf.DeepClone(foo);

            Assert.NotEqual(foo, foo2);
            Assert.Equal(foo.ToString(), foo2.ToString());
        }
示例#2
0
 internal StateSerializer(ObjectSerializerBase schema)
 {
     this.schema      = schema ?? throw new ArgumentNullException(nameof(schema));
     this.serialize   = new Lazy <Action <BinaryEncoder, T> >(GenerateSerializer);
     this.deserialize = new Lazy <Func <BinaryDecoder, T> >(GenerateDeserializer);
 }
示例#3
0
 private void Test_Deep_Clone(ObjectSerializerBase sf) {
     var foo = TestHelper.GetFoo();
     var foo2 = sf.DeepClone(foo);
     Assert.NotEqual(foo, foo2);
     Assert.Equal(foo.ToString(), foo2.ToString());
 }
示例#4
0
 internal StateSerializer(ObjectSerializerBase schema) => this.schema = schema ?? throw new ArgumentNullException(nameof(schema));