Пример #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
 public void MergeFrom(pb::CodedInputStream input) {
   uint tag;
   while ((tag = input.ReadTag()) != 0) {
     switch(tag) {
       default:
         input.SkipLastField();
         break;
       case 10: {
         HostName = input.ReadString();
         break;
       }
       case 18: {
         HostIp = input.ReadString();
         break;
       }
       case 24: {
         ProcessId = input.ReadInt32();
         break;
       }
       case 34: {
         NodeName = input.ReadString();
         break;
       }
       case 40: {
         NodeId = input.ReadUInt64();
         break;
       }
       case 50: {
         ChannelName = input.ReadString();
         break;
       }
       case 56: {
         ChannelId = input.ReadUInt64();
         break;
       }
       case 66: {
         MessageType = input.ReadString();
         break;
       }
       case 74: {
         ProtoDesc = input.ReadBytes();
         break;
       }
       case 80: {
         Id = input.ReadUInt64();
         break;
       }
       case 90: {
         if (qosProfile_ == null) {
           qosProfile_ = new global::Apollo.Cyber.Proto.QosProfile();
         }
         input.ReadMessage(qosProfile_);
         break;
       }
       case 98: {
         if (socketAddr_ == null) {
           socketAddr_ = new global::Apollo.Cyber.Proto.SocketAddr();
         }
         input.ReadMessage(socketAddr_);
         break;
       }
       case 106: {
         ServiceName = input.ReadString();
         break;
       }
       case 112: {
         ServiceId = input.ReadUInt64();
         break;
       }
     }
   }
 }