Esempio n. 1
0
 public void MergeFrom(RoleAttributes other) {
   if (other == null) {
     return;
   }
   if (other.HostName.Length != 0) {
     HostName = other.HostName;
   }
   if (other.HostIp.Length != 0) {
     HostIp = other.HostIp;
   }
   if (other.ProcessId != 0) {
     ProcessId = other.ProcessId;
   }
   if (other.NodeName.Length != 0) {
     NodeName = other.NodeName;
   }
   if (other.NodeId != 0UL) {
     NodeId = other.NodeId;
   }
   if (other.ChannelName.Length != 0) {
     ChannelName = other.ChannelName;
   }
   if (other.ChannelId != 0UL) {
     ChannelId = other.ChannelId;
   }
   if (other.MessageType.Length != 0) {
     MessageType = other.MessageType;
   }
   if (other.ProtoDesc.Length != 0) {
     ProtoDesc = other.ProtoDesc;
   }
   if (other.Id != 0UL) {
     Id = other.Id;
   }
   if (other.qosProfile_ != null) {
     if (qosProfile_ == null) {
       qosProfile_ = new global::Apollo.Cyber.Proto.QosProfile();
     }
     QosProfile.MergeFrom(other.QosProfile);
   }
   if (other.socketAddr_ != null) {
     if (socketAddr_ == null) {
       socketAddr_ = new global::Apollo.Cyber.Proto.SocketAddr();
     }
     SocketAddr.MergeFrom(other.SocketAddr);
   }
   if (other.ServiceName.Length != 0) {
     ServiceName = other.ServiceName;
   }
   if (other.ServiceId != 0UL) {
     ServiceId = other.ServiceId;
   }
 }
Esempio n. 2
0
 public override int GetHashCode() {
   int hash = 1;
   if (HostName.Length != 0) hash ^= HostName.GetHashCode();
   if (HostIp.Length != 0) hash ^= HostIp.GetHashCode();
   if (ProcessId != 0) hash ^= ProcessId.GetHashCode();
   if (NodeName.Length != 0) hash ^= NodeName.GetHashCode();
   if (NodeId != 0UL) hash ^= NodeId.GetHashCode();
   if (ChannelName.Length != 0) hash ^= ChannelName.GetHashCode();
   if (ChannelId != 0UL) hash ^= ChannelId.GetHashCode();
   if (MessageType.Length != 0) hash ^= MessageType.GetHashCode();
   if (ProtoDesc.Length != 0) hash ^= ProtoDesc.GetHashCode();
   if (Id != 0UL) hash ^= Id.GetHashCode();
   if (qosProfile_ != null) hash ^= QosProfile.GetHashCode();
   if (socketAddr_ != null) hash ^= SocketAddr.GetHashCode();
   if (ServiceName.Length != 0) hash ^= ServiceName.GetHashCode();
   if (ServiceId != 0UL) hash ^= ServiceId.GetHashCode();
   return hash;
 }
Esempio n. 3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Channel.Length != 0)
            {
                hash ^= Channel.GetHashCode();
            }
            if (qosProfile_ != null)
            {
                hash ^= QosProfile.GetHashCode();
            }
            if (PendingQueueSize != 0)
            {
                hash ^= PendingQueueSize.GetHashCode();
            }
            return(hash);
        }
Esempio n. 4
0
 public void MergeFrom(ReaderOption other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Channel.Length != 0)
     {
         Channel = other.Channel;
     }
     if (other.qosProfile_ != null)
     {
         if (qosProfile_ == null)
         {
             qosProfile_ = new global::Apollo.Cyber.Proto.QosProfile();
         }
         QosProfile.MergeFrom(other.QosProfile);
     }
     if (other.PendingQueueSize != 0)
     {
         PendingQueueSize = other.PendingQueueSize;
     }
 }