Exemplo n.º 1
0
 public void MergeFrom(MessageEnvelope other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Kind.Length != 0)
     {
         Kind = other.Kind;
     }
     if (other.Payload.Length != 0)
     {
         Payload = other.Payload;
     }
     if (other.target_ != null)
     {
         if (target_ == null)
         {
             target_ = new global::FSharpActors.Remoting.ActorPID();
         }
         Target.MergeFrom(other.Target);
     }
     if (other.sender_ != null)
     {
         if (sender_ == null)
         {
             sender_ = new global::FSharpActors.Remoting.ActorPID();
         }
         Sender.MergeFrom(other.Sender);
     }
 }
Exemplo n.º 2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 10: {
                    Kind = input.ReadString();
                    break;
                }

                case 18: {
                    Payload = input.ReadBytes();
                    break;
                }

                case 26: {
                    if (target_ == null)
                    {
                        target_ = new global::FSharpActors.Remoting.ActorPID();
                    }
                    input.ReadMessage(target_);
                    break;
                }

                case 34: {
                    if (sender_ == null)
                    {
                        sender_ = new global::FSharpActors.Remoting.ActorPID();
                    }
                    input.ReadMessage(sender_);
                    break;
                }
                }
            }
        }