public void CanSerializeImmutableMessagesWithPrivateCtor() { var message = new ImmutableMessageWithPrivateCtor(Tuple.Create("aaa", "bbb")); var serializer = Sys.Serialization.FindSerializerFor(message); var serialized = serializer.ToBinary(message); var deserialized = (ImmutableMessageWithPrivateCtor)serializer.FromBinary(serialized, typeof(ImmutableMessageWithPrivateCtor)); Assert.Equal(message, deserialized); }
protected bool Equals(ImmutableMessageWithPrivateCtor other) { return String.Equals(Bar, other.Bar) && String.Equals(Foo, other.Foo); }
protected bool Equals(ImmutableMessageWithPrivateCtor other) { return(string.Equals(Bar, other.Bar) && string.Equals(Foo, other.Foo)); }
public void CanSerializeImmutableMessagesWithPrivateCtor() { var message = new ImmutableMessageWithPrivateCtor(Tuple.Create("aaa", "bbb")); AssertEqual(message); }
public void Can_serialize_immutable_messages_with_private_ctor() { var message = new ImmutableMessageWithPrivateCtor(Tuple.Create("aaa", "bbb")); AssertEqual(message); }