コード例 #1
0
ファイル: Activity.cs プロジェクト: HaroonSaid/datalake
        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: {
                    UserId = input.ReadString();
                    break;
                }

                case 16: {
                    Timestamp = input.ReadInt64();
                    break;
                }

                case 24: {
                    activityType_ = (global::Datalake.Schema.Activity.Types.ActivityType)input.ReadEnum();
                    break;
                }

                case 34: {
                    if (accountActivity_ == null)
                    {
                        accountActivity_ = new global::Datalake.Schema.AccountActivity();
                    }
                    input.ReadMessage(accountActivity_);
                    break;
                }

                case 42: {
                    if (userActivity_ == null)
                    {
                        userActivity_ = new global::Datalake.Schema.UserActivity();
                    }
                    input.ReadMessage(userActivity_);
                    break;
                }
                }
            }
        }
コード例 #2
0
ファイル: Activity.cs プロジェクト: HaroonSaid/datalake
 public void MergeFrom(Activity other)
 {
     if (other == null)
     {
         return;
     }
     if (other.UserId.Length != 0)
     {
         UserId = other.UserId;
     }
     if (other.Timestamp != 0L)
     {
         Timestamp = other.Timestamp;
     }
     if (other.ActivityType != 0)
     {
         ActivityType = other.ActivityType;
     }
     if (other.accountActivity_ != null)
     {
         if (accountActivity_ == null)
         {
             accountActivity_ = new global::Datalake.Schema.AccountActivity();
         }
         AccountActivity.MergeFrom(other.AccountActivity);
     }
     if (other.userActivity_ != null)
     {
         if (userActivity_ == null)
         {
             userActivity_ = new global::Datalake.Schema.UserActivity();
         }
         UserActivity.MergeFrom(other.UserActivity);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }