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()); }
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); }
internal StateSerializer(ObjectSerializerBase schema) => this.schema = schema ?? throw new ArgumentNullException(nameof(schema));