示例#1
0
        public void MergeFrom(ResponseDownloadFile other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.TypeCase)
            {
            case TypeOneofCase.Started:
                if (Started == null)
                {
                    Started = new global::SnackTime.MediaServer.Service.File.Started();
                }
                Started.MergeFrom(other.Started);
                break;

            case TypeOneofCase.Progress:
                if (Progress == null)
                {
                    Progress = new global::SnackTime.MediaServer.Service.File.Chunk();
                }
                Progress.MergeFrom(other.Progress);
                break;

            case TypeOneofCase.Done:
                if (Done == null)
                {
                    Done = new global::SnackTime.MediaServer.Service.File.Done();
                }
                Done.MergeFrom(other.Done);
                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::SnackTime.MediaServer.Service.File.Started subBuilder = new global::SnackTime.MediaServer.Service.File.Started();
                    if (typeCase_ == TypeOneofCase.Started)
                    {
                        subBuilder.MergeFrom(Started);
                    }
                    input.ReadMessage(subBuilder);
                    Started = subBuilder;
                    break;
                }

                case 18: {
                    global::SnackTime.MediaServer.Service.File.Chunk subBuilder = new global::SnackTime.MediaServer.Service.File.Chunk();
                    if (typeCase_ == TypeOneofCase.Progress)
                    {
                        subBuilder.MergeFrom(Progress);
                    }
                    input.ReadMessage(subBuilder);
                    Progress = subBuilder;
                    break;
                }

                case 26: {
                    global::SnackTime.MediaServer.Service.File.Done subBuilder = new global::SnackTime.MediaServer.Service.File.Done();
                    if (typeCase_ == TypeOneofCase.Done)
                    {
                        subBuilder.MergeFrom(Done);
                    }
                    input.ReadMessage(subBuilder);
                    Done = subBuilder;
                    break;
                }
                }
            }
        }