Akka.Cluster.Tools.Client.Serialization.ClusterClientMessageSerializer.ToBinary C# (CSharp) 메소드

ToBinary() 공개 메소드

public ToBinary ( object o ) : byte[]
o object
리턴 byte[]
        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()));
        }