Esempio n. 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (HasAgentId)
            {
                hash ^= AgentId.GetHashCode();
            }
            if (HasUserDescription)
            {
                hash ^= UserDescription.GetHashCode();
            }
            if (HasProgram)
            {
                hash ^= Program.GetHashCode();
            }
            if (HasUserOptions)
            {
                hash ^= UserOptions.GetHashCode();
            }
            if (HasClubOptions)
            {
                hash ^= ClubOptions.GetHashCode();
            }
            hash ^= (int)typeCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 2
0
        public void MergeFrom(SubmitReportRequest other)
        {
            if (other == null)
            {
                return;
            }
            if (other.HasAgentId)
            {
                if (!HasAgentId)
                {
                    AgentId = new global::Bgs.Protocol.Account.V1.AccountId();
                }
                AgentId.MergeFrom(other.AgentId);
            }
            if (other.HasUserDescription)
            {
                UserDescription = other.UserDescription;
            }
            switch (other.TypeCase)
            {
            case TypeOneofCase.UserOptions:
                if (UserOptions == null)
                {
                    UserOptions = new global::Bgs.Protocol.Report.V2.UserOptions();
                }
                UserOptions.MergeFrom(other.UserOptions);
                break;

            case TypeOneofCase.ClubOptions:
                if (ClubOptions == null)
                {
                    ClubOptions = new global::Bgs.Protocol.Report.V2.ClubOptions();
                }
                ClubOptions.MergeFrom(other.ClubOptions);
                break;

            case TypeOneofCase.EntityOptions:
                if (EntityOptions == null)
                {
                    EntityOptions = new global::Bgs.Protocol.Report.V2.EntityOptions();
                }
                EntityOptions.MergeFrom(other.EntityOptions);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }