public override byte[] ToBinary(object o)
{
if (o is ClusterReceptionist.Contacts) return ContactsToProto((ClusterReceptionist.Contacts)o).ToByteArray();
if (o is ClusterReceptionist.GetContacts) return EmptyBytes;
if (o is ClusterReceptionist.Heartbeat) return EmptyBytes;
if (o is ClusterReceptionist.HeartbeatRsp) return EmptyBytes;
throw new ArgumentException(string.Format("Can't serialize object of type [{0}] in [{1}]", o.GetType(), GetType()));
}