Class Text
Represents a piece of text within a segment.
Inherited Members
Namespace: Sdl.LanguagePlatform.Core
Assembly: Sdl.LanguagePlatform.Core.dll
Syntax
public class Text : SegmentElement
Constructors
Text()
Initializes a new instance with default values (used for XML serialization only).
Declaration
public Text()
Text(String)
Initializes a new instance of the Text class with the specified string.
Declaration
public Text(string text)
Parameters
Type | Name | Description |
---|---|---|
System. |
text | The string. |
Properties
Value
Gets or sets the string for this Text instance.
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
System. |
Methods
AcceptSegmentElementVisitor(ISegmentElementVisitor)
Visitor pattern implementation. Calls Visit
Declaration
public override void AcceptSegmentElementVisitor(ISegmentElementVisitor visitor)
Parameters
Type | Name | Description |
---|---|---|
ISegment |
visitor | The visitor instance |
Overrides
Duplicate()
See Duplicate()
Declaration
public override SegmentElement Duplicate()
Returns
Type | Description |
---|---|
Segment |
A new instance that is a deep copy of this instance. |
Overrides
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System. |
obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
System. |
true if the specified object is equal to the current object; otherwise, false. |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System. |
A hash code for this object |
Overrides
GetSimilarity(SegmentElement)
Determines whether this instance is similar to another SegmentElement object, which must also be a Text object.
This is equivalent to the Equals method.
Declaration
public override SegmentElement.Similarity GetSimilarity(SegmentElement other)
Parameters
Type | Name | Description |
---|---|---|
Segment |
other | The other object. |
Returns
Type | Description |
---|---|
Segment |
true if the two objects are equal, false otherwise or if other is not a Text object. |
Overrides
GetWeakHashCode()
Declaration
public override int GetWeakHashCode()
Returns
Type | Description |
---|---|
System. |
A hash code, equivalent to Get |
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System. |
A string representation of the object, for display purposes. |