예제 #1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 8: {
                    Id = input.ReadInt32();
                    break;
                }

                case 18: {
                    Name = input.ReadString();
                    break;
                }

                case 24: {
                    stype_ = (global::Pb.People.Person.Types.SType)input.ReadEnum();
                    break;
                }

                case 34: {
                    Email = input.ReadString();
                    break;
                }

                case 42: {
                    if (dog_ == null)
                    {
                        dog_ = new global::Pb.Animal.Dog();
                    }
                    input.ReadMessage(dog_);
                    break;
                }

                case 50: {
                    if (house_ == null)
                    {
                        house_ = new global::Pb.Environment.House();
                    }
                    input.ReadMessage(house_);
                    break;
                }
                }
            }
        }
예제 #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 8: {
                    Id = input.ReadInt32();
                    break;
                }

                case 18: {
                    Name = input.ReadString();
                    break;
                }

                case 24: {
                    Stype = (global::Pb.People.Person.Types.SType)input.ReadEnum();
                    break;
                }

                case 34: {
                    Email = input.ReadString();
                    break;
                }

                case 42: {
                    if (dog_ == null)
                    {
                        Dog = new global::Pb.Animal.Dog();
                    }
                    input.ReadMessage(Dog);
                    break;
                }

                case 50: {
                    if (house_ == null)
                    {
                        House = new global::Pb.Environment.House();
                    }
                    input.ReadMessage(House);
                    break;
                }
                }
            }
        }
예제 #3
0
 public void MergeFrom(Person other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id != 0)
     {
         Id = other.Id;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.Stype != global::Pb.People.Person.Types.SType.Male)
     {
         Stype = other.Stype;
     }
     if (other.Email.Length != 0)
     {
         Email = other.Email;
     }
     if (other.dog_ != null)
     {
         if (dog_ == null)
         {
             Dog = new global::Pb.Animal.Dog();
         }
         Dog.MergeFrom(other.Dog);
     }
     if (other.house_ != null)
     {
         if (house_ == null)
         {
             House = new global::Pb.Environment.House();
         }
         House.MergeFrom(other.House);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
예제 #4
0
 public void MergeFrom(Person other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id != 0)
     {
         Id = other.Id;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.Stype != 0)
     {
         Stype = other.Stype;
     }
     if (other.Email.Length != 0)
     {
         Email = other.Email;
     }
     if (other.dog_ != null)
     {
         if (dog_ == null)
         {
             dog_ = new global::Pb.Animal.Dog();
         }
         Dog.MergeFrom(other.Dog);
     }
     if (other.house_ != null)
     {
         if (house_ == null)
         {
             house_ = new global::Pb.Environment.House();
         }
         House.MergeFrom(other.House);
     }
 }