コード例 #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;
   }
 }
コード例 #2
0
ファイル: ComponentConf.cs プロジェクト: zakirIndia/simulator
 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;
     }
 }