示例#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);
        }
示例#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: {
                    global::Google.Protobuf.ReqUserNew subBuilder = new global::Google.Protobuf.ReqUserNew();
                    if (requestsCase_ == RequestsOneofCase.ReqUserNew)
                    {
                        subBuilder.MergeFrom(ReqUserNew);
                    }
                    input.ReadMessage(subBuilder);
                    ReqUserNew = subBuilder;
                    break;
                }

                case 18: {
                    global::Google.Protobuf.ReqUserUpdate subBuilder = new global::Google.Protobuf.ReqUserUpdate();
                    if (requestsCase_ == RequestsOneofCase.ReqUserUpdate)
                    {
                        subBuilder.MergeFrom(ReqUserUpdate);
                    }
                    input.ReadMessage(subBuilder);
                    ReqUserUpdate = subBuilder;
                    break;
                }

                case 26: {
                    global::Google.Protobuf.ReqUsersUpdate subBuilder = new global::Google.Protobuf.ReqUsersUpdate();
                    if (requestsCase_ == RequestsOneofCase.ReqUsersUpdate)
                    {
                        subBuilder.MergeFrom(ReqUsersUpdate);
                    }
                    input.ReadMessage(subBuilder);
                    ReqUsersUpdate = subBuilder;
                    break;
                }
                }
            }
        }