Example #1
0
 public void MergeFrom(Date other)
 {
     if (other == null)
     {
         return;
     }
     if (other.year_ != null)
     {
         if (year_ == null)
         {
             Year = new global::Year();
         }
         Year.MergeFrom(other.Year);
     }
     if (other.month_ != null)
     {
         if (month_ == null)
         {
             Month = new global::Month();
         }
         Month.MergeFrom(other.Month);
     }
     if (other.day_ != null)
     {
         if (day_ == null)
         {
             Day = new global::Day();
         }
         Day.MergeFrom(other.Day);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Example #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 10: {
                if (year_ == null)
                {
                    Year = new global::Year();
                }
                input.ReadMessage(Year);
                break;
            }

            case 18: {
                if (month_ == null)
                {
                    Month = new global::Month();
                }
                input.ReadMessage(Month);
                break;
            }

            case 26: {
                if (day_ == null)
                {
                    Day = new global::Day();
                }
                input.ReadMessage(Day);
                break;
            }
            }
        }
    }