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()
Assembly: Sdl.LanguagePlatform.Core.dll
Constructors
Declaration
Declaration
public Segment(CultureInfo culture)
Parameters
Type |
Name |
Description |
System.Globalization.CultureInfo |
culture |
|
Properties
Declaration
public CultureInfo Culture { get; set; }
Property Value
Type |
Description |
System.Globalization.CultureInfo |
|
Declaration
public string CultureName { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
public List<SegmentElement> Elements { get; set; }
Property Value
Declaration
public bool HasPairedTags { get; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
public bool HasPlaceables { get; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
public bool HasTags { get; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
public bool IsEmpty { get; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
public SegmentElement LastElement { get; set; }
Property Value
Declaration
public List<Token> Tokens { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.List<Token> |
|
Methods
Declaration
public void Add(SegmentElement element)
Parameters
Declaration
public void Add(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Declaration
public void AddRange(IEnumerable<SegmentElement> elements)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<SegmentElement> |
elements |
|
Declaration
public void AnchorDanglingTags()
Declaration
Declaration
public bool DeleteEmptyTagPairs(bool onlyInPeripheralPositions)
Parameters
Type |
Name |
Description |
System.Boolean |
onlyInPeripheralPositions |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool DeleteTags(Segment.DeleteTagsAction mode)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Declaration
public Segment Duplicate()
Returns
Declaration
public bool Equals(Segment other)
Parameters
Type |
Name |
Description |
Segment |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool FillUnmatchedStartAndEndTags()
Returns
Type |
Description |
System.Boolean |
|
Declaration
public Tag FindTag(TagType type, int anchor)
Parameters
Type |
Name |
Description |
TagType |
type |
|
System.Int32 |
anchor |
|
Returns
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
Declaration
public int GetMaxTagAnchor()
Returns
Type |
Description |
System.Int32 |
|
Declaration
public void GetMinMaxTagAnchor(out int min, out int max)
Parameters
Type |
Name |
Description |
System.Int32 |
min |
|
System.Int32 |
max |
|
Declaration
Returns
Type |
Description |
System.Int32 |
|
Declaration
public Dictionary<int, string> GetTagIdGroups()
Returns
Type |
Description |
System.Collections.Generic.Dictionary<System.Int32, System.String> |
|
Declaration
public Dictionary<int, int> GetTagPairings()
Returns
Type |
Description |
System.Collections.Generic.Dictionary<System.Int32, System.Int32> |
|
Declaration
public int GetTokenIndex(SegmentPosition p)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Declaration
public int GetWeakHashCode()
Returns
Type |
Description |
System.Int32 |
|
Declaration
public bool HasPeripheralWhitespace()
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool HasTokenBundles()
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool HasUnmatchedStartOrEndTags()
Returns
Type |
Description |
System.Boolean |
|
Declaration
Returns
Type |
Description |
System.Boolean |
|
MergeAdjacentTextRuns()
Declaration
public void MergeAdjacentTextRuns()
Declaration
public bool RemoveTokenBundles()
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool RemoveUnmatchedStartAndEndTags()
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool RemoveUnmatchedStartAndEndTags(bool peripheralPositionsOnly)
Parameters
Type |
Name |
Description |
System.Boolean |
peripheralPositionsOnly |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool RenumberTagAnchors(int nextTagAnchor, ref int maxAlignmentAnchor)
Parameters
Type |
Name |
Description |
System.Int32 |
nextTagAnchor |
|
System.Int32 |
maxAlignmentAnchor |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool RenumberTagAnchors(ref int maxAlignmentAnchor)
Parameters
Type |
Name |
Description |
System.Int32 |
maxAlignmentAnchor |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
Returns
Type |
Description |
System.String |
|
Declaration
public string ToPlain(SegmentRange range)
Parameters
Returns
Type |
Description |
System.String |
|
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 |
|
Declaration
public string ToPlain(int fromToken, int intoToken)
Parameters
Type |
Name |
Description |
System.Int32 |
fromToken |
|
System.Int32 |
intoToken |
|
Returns
Type |
Description |
System.String |
|
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Declaration
Declaration
Returns
Type |
Description |
System.String |
|
Declaration
public string TrimStart()
Returns
Type |
Description |
System.String |
|
Declaration
public bool UpdateFromTokenIndices(ICollection<int> tokenIndices)
Parameters
Type |
Name |
Description |
System.Collections.Generic.ICollection<System.Int32> |
tokenIndices |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public ErrorCode Validate()
Returns
Declaration
public ErrorCode Validate(Segment.ValidationMode mode)
Parameters
Returns
Declaration
public bool VerifyTokenSpans()
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool WeakEquals(Segment other)
Parameters
Type |
Name |
Description |
Segment |
other |
|
Returns
Type |
Description |
System.Boolean |
|