Esempio n. 1
0
        public void MergeFrom(RequestRPC other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.RequestsCase)
            {
            case RequestsOneofCase.ReqUserNew:
                if (ReqUserNew == null)
                {
                    ReqUserNew = new global::Google.Protobuf.ReqUserNew();
                }
                ReqUserNew.MergeFrom(other.ReqUserNew);
                break;

            case RequestsOneofCase.ReqUserUpdate:
                if (ReqUserUpdate == null)
                {
                    ReqUserUpdate = new global::Google.Protobuf.ReqUserUpdate();
                }
                ReqUserUpdate.MergeFrom(other.ReqUserUpdate);
                break;

            case RequestsOneofCase.ReqUsersUpdate:
                if (ReqUsersUpdate == null)
                {
                    ReqUsersUpdate = new global::Google.Protobuf.ReqUsersUpdate();
                }
                ReqUsersUpdate.MergeFrom(other.ReqUsersUpdate);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Esempio n. 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (requestsCase_ == RequestsOneofCase.ReqUserNew)
            {
                hash ^= ReqUserNew.GetHashCode();
            }
            if (requestsCase_ == RequestsOneofCase.ReqUserUpdate)
            {
                hash ^= ReqUserUpdate.GetHashCode();
            }
            if (requestsCase_ == RequestsOneofCase.ReqUsersUpdate)
            {
                hash ^= ReqUsersUpdate.GetHashCode();
            }
            hash ^= (int)requestsCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }