Search Results for

    Show / Hide Table of Contents

    Class Segment

    Inheritance
    System.Object
    Segment
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.Core
    Assembly: Sdl.LanguagePlatform.Core.dll
    Syntax
    public class Segment

    Constructors

    Segment()

    Declaration
    public Segment()

    Segment(CultureInfo)

    Declaration
    public Segment(CultureInfo culture)
    Parameters
    Type Name Description
    System.Globalization.CultureInfo culture

    Properties

    Culture

    Declaration
    public CultureInfo Culture { get; set; }
    Property Value
    Type Description
    System.Globalization.CultureInfo

    CultureName

    Declaration
    public string CultureName { get; set; }
    Property Value
    Type Description
    System.String

    Elements

    Declaration
    public List<SegmentElement> Elements { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<SegmentElement>

    HasPairedTags

    Declaration
    public bool HasPairedTags { get; }
    Property Value
    Type Description
    System.Boolean

    HasPlaceables

    Declaration
    public bool HasPlaceables { get; }
    Property Value
    Type Description
    System.Boolean

    HasTags

    Declaration
    public bool HasTags { get; }
    Property Value
    Type Description
    System.Boolean

    IsEmpty

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    System.Boolean

    LastElement

    Declaration
    public SegmentElement LastElement { get; set; }
    Property Value
    Type Description
    SegmentElement

    Tokens

    Declaration
    public List<Token> Tokens { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<Token>

    Methods

    Add(SegmentElement)

    Declaration
    public void Add(SegmentElement element)
    Parameters
    Type Name Description
    SegmentElement element

    Add(String)

    Declaration
    public void Add(string text)
    Parameters
    Type Name Description
    System.String text

    AddRange(IEnumerable<SegmentElement>)

    Declaration
    public void AddRange(IEnumerable<SegmentElement> elements)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<SegmentElement> elements

    AnchorDanglingTags()

    Declaration
    public void AnchorDanglingTags()

    Clear()

    Declaration
    public void Clear()

    DeleteEmptyTagPairs(Boolean)

    Declaration
    public bool DeleteEmptyTagPairs(bool onlyInPeripheralPositions)
    Parameters
    Type Name Description
    System.Boolean onlyInPeripheralPositions
    Returns
    Type Description
    System.Boolean

    DeleteTags()

    Declaration
    public bool DeleteTags()
    Returns
    Type Description
    System.Boolean

    DeleteTags(Segment.DeleteTagsAction)

    Declaration
    public bool DeleteTags(Segment.DeleteTagsAction mode)
    Parameters
    Type Name Description
    Segment.DeleteTagsAction mode
    Returns
    Type Description
    System.Boolean

    Duplicate()

    Declaration
    public Segment Duplicate()
    Returns
    Type Description
    Segment

    Equals(Segment)

    Declaration
    public bool Equals(Segment other)
    Parameters
    Type Name Description
    Segment other
    Returns
    Type Description
    System.Boolean

    FillUnmatchedStartAndEndTags()

    Declaration
    public bool FillUnmatchedStartAndEndTags()
    Returns
    Type Description
    System.Boolean

    FindTag(TagType, Int32)

    Declaration
    public Tag FindTag(TagType type, int anchor)
    Parameters
    Type Name Description
    TagType type
    System.Int32 anchor
    Returns
    Type Description
    Tag

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()

    GetMaxTagAnchor()

    Declaration
    public int GetMaxTagAnchor()
    Returns
    Type Description
    System.Int32

    GetMinMaxTagAnchor(out Int32, out Int32)

    Declaration
    public void GetMinMaxTagAnchor(out int min, out int max)
    Parameters
    Type Name Description
    System.Int32 min
    System.Int32 max

    GetTagCount()

    Declaration
    public int GetTagCount()
    Returns
    Type Description
    System.Int32

    GetTagIdGroups()

    Declaration
    public Dictionary<int, string> GetTagIdGroups()
    Returns
    Type Description
    System.Collections.Generic.Dictionary<System.Int32, System.String>

    GetTagPairings()

    Declaration
    public Dictionary<int, int> GetTagPairings()
    Returns
    Type Description
    System.Collections.Generic.Dictionary<System.Int32, System.Int32>

    GetTokenIndex(SegmentPosition)

    Declaration
    public int GetTokenIndex(SegmentPosition p)
    Parameters
    Type Name Description
    SegmentPosition p
    Returns
    Type Description
    System.Int32

    GetWeakHashCode()

    Declaration
    public int GetWeakHashCode()
    Returns
    Type Description
    System.Int32

    HasPeripheralWhitespace()

    Declaration
    public bool HasPeripheralWhitespace()
    Returns
    Type Description
    System.Boolean

    HasTokenBundles()

    Declaration
    public bool HasTokenBundles()
    Returns
    Type Description
    System.Boolean

    HasUnmatchedStartOrEndTags()

    Declaration
    public bool HasUnmatchedStartOrEndTags()
    Returns
    Type Description
    System.Boolean

    IsValid()

    Declaration
    public bool IsValid()
    Returns
    Type Description
    System.Boolean

    MergeAdjacentTextRuns()

    Declaration
    public void MergeAdjacentTextRuns()

    RemoveTokenBundles()

    Declaration
    public bool RemoveTokenBundles()
    Returns
    Type Description
    System.Boolean

    RemoveUnmatchedStartAndEndTags()

    Declaration
    public bool RemoveUnmatchedStartAndEndTags()
    Returns
    Type Description
    System.Boolean

    RemoveUnmatchedStartAndEndTags(Boolean)

    Declaration
    public bool RemoveUnmatchedStartAndEndTags(bool peripheralPositionsOnly)
    Parameters
    Type Name Description
    System.Boolean peripheralPositionsOnly
    Returns
    Type Description
    System.Boolean

    RenumberTagAnchors(Int32, ref Int32)

    Declaration
    public bool RenumberTagAnchors(int nextTagAnchor, ref int maxAlignmentAnchor)
    Parameters
    Type Name Description
    System.Int32 nextTagAnchor
    System.Int32 maxAlignmentAnchor
    Returns
    Type Description
    System.Boolean

    RenumberTagAnchors(ref Int32)

    Declaration
    public bool RenumberTagAnchors(ref int maxAlignmentAnchor)
    Parameters
    Type Name Description
    System.Int32 maxAlignmentAnchor
    Returns
    Type Description
    System.Boolean

    ToPlain()

    Declaration
    public string ToPlain()
    Returns
    Type Description
    System.String

    ToPlain(SegmentRange)

    Declaration
    public string ToPlain(SegmentRange range)
    Parameters
    Type Name Description
    SegmentRange range
    Returns
    Type Description
    System.String

    ToPlain(Boolean, Boolean, out List<SegmentPosition>)

    Declaration
    public string ToPlain(bool tolower, bool tobase, out List<SegmentPosition> ranges)
    Parameters
    Type Name Description
    System.Boolean tolower
    System.Boolean tobase
    System.Collections.Generic.List<SegmentPosition> ranges
    Returns
    Type Description
    System.String

    ToPlain(Int32, Int32)

    Declaration
    public string ToPlain(int fromToken, int intoToken)
    Parameters
    Type Name Description
    System.Int32 fromToken
    System.Int32 intoToken
    Returns
    Type Description
    System.String

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    Trim()

    Declaration
    public void Trim()

    TrimEnd()

    Declaration
    public string TrimEnd()
    Returns
    Type Description
    System.String

    TrimStart()

    Declaration
    public string TrimStart()
    Returns
    Type Description
    System.String

    UpdateFromTokenIndices(ICollection<Int32>)

    Declaration
    public bool UpdateFromTokenIndices(ICollection<int> tokenIndices)
    Parameters
    Type Name Description
    System.Collections.Generic.ICollection<System.Int32> tokenIndices
    Returns
    Type Description
    System.Boolean

    Validate()

    Declaration
    public ErrorCode Validate()
    Returns
    Type Description
    ErrorCode

    Validate(Segment.ValidationMode)

    Declaration
    public ErrorCode Validate(Segment.ValidationMode mode)
    Parameters
    Type Name Description
    Segment.ValidationMode mode
    Returns
    Type Description
    ErrorCode

    VerifyTokenSpans()

    Declaration
    public bool VerifyTokenSpans()
    Returns
    Type Description
    System.Boolean

    WeakEquals(Segment)

    Declaration
    public bool WeakEquals(Segment other)
    Parameters
    Type Name Description
    Segment other
    Returns
    Type Description
    System.Boolean

    On this page

    • Constructors
      • Segment()
      • Segment(CultureInfo)
    • Properties
      • Culture
      • CultureName
      • Elements
      • HasPairedTags
      • HasPlaceables
      • HasTags
      • IsEmpty
      • LastElement
      • Tokens
    • Methods
      • Add(SegmentElement)
      • Add(String)
      • AddRange(IEnumerable<SegmentElement>)
      • AnchorDanglingTags()
      • Clear()
      • DeleteEmptyTagPairs(Boolean)
      • DeleteTags()
      • DeleteTags(Segment.DeleteTagsAction)
      • Duplicate()
      • Equals(Segment)
      • FillUnmatchedStartAndEndTags()
      • FindTag(TagType, Int32)
      • GetHashCode()
      • GetMaxTagAnchor()
      • GetMinMaxTagAnchor(out Int32, out Int32)
      • GetTagCount()
      • GetTagIdGroups()
      • GetTagPairings()
      • GetTokenIndex(SegmentPosition)
      • GetWeakHashCode()
      • HasPeripheralWhitespace()
      • HasTokenBundles()
      • HasUnmatchedStartOrEndTags()
      • IsValid()
      • MergeAdjacentTextRuns()
      • RemoveTokenBundles()
      • RemoveUnmatchedStartAndEndTags()
      • RemoveUnmatchedStartAndEndTags(Boolean)
      • RenumberTagAnchors(Int32, ref Int32)
      • RenumberTagAnchors(ref Int32)
      • ToPlain()
      • ToPlain(SegmentRange)
      • ToPlain(Boolean, Boolean, out List<SegmentPosition>)
      • ToPlain(Int32, Int32)
      • ToString()
      • Trim()
      • TrimEnd()
      • TrimStart()
      • UpdateFromTokenIndices(ICollection<Int32>)
      • Validate()
      • Validate(Segment.ValidationMode)
      • VerifyTokenSpans()
      • WeakEquals(Segment)
    Back to top Generated by DocFX