Exemple #1
0
        void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
                    break;

                case 13: {
                    Score = input.ReadFloat();
                    break;
                }

                case 26: {
                    global::Google.Cloud.Automl.V1Beta1.TextSegment subBuilder = new global::Google.Cloud.Automl.V1Beta1.TextSegment();
                    if (annotationCase_ == AnnotationOneofCase.TextSegment)
                    {
                        subBuilder.MergeFrom(TextSegment);
                    }
                    input.ReadMessage(subBuilder);
                    TextSegment = subBuilder;
                    break;
                }
                }
            }
        }
Exemple #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
            input.ReadRawMessage(this);
    #else
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 13: {
                    Score = input.ReadFloat();
                    break;
                }

                case 26: {
                    global::Google.Cloud.Automl.V1Beta1.TextSegment subBuilder = new global::Google.Cloud.Automl.V1Beta1.TextSegment();
                    if (annotationCase_ == AnnotationOneofCase.TextSegment)
                    {
                        subBuilder.MergeFrom(TextSegment);
                    }
                    input.ReadMessage(subBuilder);
                    TextSegment = subBuilder;
                    break;
                }
                }
            }
    #endif
        }