Exemplo n.º 1
0
        public void VisitPlaceholderTag(IPlaceholderTag tag)
        {
            PlaceholderTags.Add((IPlaceholderTag)tag.Clone());


            if (tag.Properties.HasTextEquivalent && !IncludeTagText)
            {
                var objTag = new Tag
                {
                    AlignmentAnchor = "",
                    Anchor          = TagCounter.ToString(),
                    TagId           = tag.TagProperties.TagId.Id,
                    TextEquivalent  = tag.Properties.TextEquivalent,
                    SectionType     = Tag.Type.Standalone
                };


                TagUnits.Add(objTag);

                objTag.Revision = IsRevisionMarker ? RevisionMarker : null;
                SegmentSections.Add(objTag);

                PlainText.Append(tag.Properties.TextEquivalent);
            }
            else if (IncludeTagText)
            {
                var objTag = new Tag
                {
                    AlignmentAnchor = "",
                    Anchor          = TagCounter.ToString(),
                    TagId           = tag.TagProperties.TagId.Id,
                    TextEquivalent  = tag.Properties.TagContent,
                    SectionType     = Tag.Type.Standalone
                };

                TagUnits.Add(objTag);

                objTag.Revision = IsRevisionMarker ? RevisionMarker : null;
                SegmentSections.Add(objTag);

                PlainText.Append(tag.TagProperties.TagContent);


                var placeHolderTag = new Sdl.LanguagePlatform.Core.Tag
                {
                    Type           = TagType.TextPlaceholder,
                    TagID          = tag.TagProperties.TagId.Id,
                    TextEquivalent = tag.Properties.TextEquivalent,
                    Anchor         = TagCounter
                };
                Segment.Add(placeHolderTag);
            }
            TagCounter++;
        }
Exemplo n.º 2
0
        public void VisitPlaceholderTag(IPlaceholderTag tag)
        {
            PlaceholderTags.Add((IPlaceholderTag)tag.Clone());


            if (tag.Properties.HasTextEquivalent && !IncludeTagText)
            {
                TagUnits.Add(new TagUnit(tag.TagProperties.TagId.Id, tag.Properties.DisplayText, tag.Properties.TextEquivalent, TagUnit.TagUnitState.IsEmpty, TagUnit.TagUnitType.IsPlaceholder));

                SegmentSections.Add(new SegmentSection(SegmentSection.ContentType.Placeholder, tag.TagProperties.TagId.Id, tag.Properties.TextEquivalent));

                PlainText.Append(tag.Properties.TextEquivalent);
            }

            if (!IncludeTagText)
            {
                return;
            }
            TagUnits.Add(new TagUnit(tag.TagProperties.TagId.Id, tag.Properties.DisplayText, tag.Properties.TagContent, TagUnit.TagUnitState.IsEmpty, TagUnit.TagUnitType.IsPlaceholder));

            SegmentSections.Add(new SegmentSection(SegmentSection.ContentType.Placeholder, tag.TagProperties.TagId.Id, tag.Properties.TagContent));

            PlainText.Append(tag.TagProperties.TagContent);
        }
 public void VisitPlaceholderTag(IPlaceholderTag tag)
 {
     _currentContainer.Add((IPlaceholderTag)tag.Clone());
 }
Exemplo n.º 4
0
 public void VisitPlaceholderTag(IPlaceholderTag tag)
 {
     _currentContainer.Add((IPlaceholderTag)tag.Clone());
 }