コード例 #1
0
        public void CanSerializeImmutableMessages()
        {
            var message = new ImmutableMessage(Tuple.Create("aaa", "bbb"));

            var serializer   = Sys.Serialization.FindSerializerFor(message);
            var serialized   = serializer.ToBinary(message);
            var deserialized = (ImmutableMessage)serializer.FromBinary(serialized, typeof(ImmutableMessage));

            Assert.Equal(message, deserialized);
        }
コード例 #2
0
 protected bool Equals(ImmutableMessage other)
 {
     return(string.Equals(Bar, other.Bar) && string.Equals(Foo, other.Foo));
 }
コード例 #3
0
        public void CanSerializeImmutableMessages()
        {
            var message = new ImmutableMessage(Tuple.Create("aaa", "bbb"));

            AssertEqual(message);
        }
コード例 #4
0
 protected bool Equals(ImmutableMessage other)
 {
     return string.Equals(Bar, other.Bar) && string.Equals(Foo, other.Foo);
 }