コード例 #1
0
 public void ShouldSerializeSimpleCustomISerializable()
 {
     const long value = 666L;
     var customSerializable = new CustomISerializable(value);
     var copy = SerializerClone(customSerializable);
     Assert.AreEqual(customSerializable.ValueAsLong, copy.ValueAsLong);
 }
コード例 #2
0
        public void ShouldSerializeSimpleCustomISerializable()
        {
            const long value = 666L;
            var        customSerializable = new CustomISerializable(value);
            var        copy = SerializerClone(customSerializable);

            Assert.AreEqual(customSerializable.ValueAsLong, copy.ValueAsLong);
        }
コード例 #3
0
        public void ShouldSerializeSimpleCustomISerializable()
        {
            var value = 666L;
            var customSerializable = new CustomISerializable(value);
            var copy = SerializerClone(customSerializable);

            Assert.AreEqual(customSerializable, copy);
        }
コード例 #4
0
            public override bool Equals(object obj)
            {
                if (obj == null)
                {
                    return(false);
                }
                if (ReferenceEquals(this, obj))
                {
                    return(true);
                }
                if (obj.GetType() != typeof(CustomISerializable))
                {
                    return(false);
                }
                CustomISerializable other = (CustomISerializable)obj;

                return(fakeIntPtr == other.fakeIntPtr);
            }