LiteralPart Class
Represents a literal text part.
public class LiteralPart : PartBase<string>, IPart
- Implements:
- IPart
Constructors
LiteralPart()
Initializes an instance of the class.
public LiteralPart()
Properties
IsDelimiter
Gets whether the part is a delimiter literal, paired with another optional part.
public virtual bool IsDelimiter { get; }
Property Value
- bool:
trueif the part is a delimiter literal; otherwise,False.
IsEditable
Gets whether the part is editable.
public override bool IsEditable { get; }
Property Value
- bool:
trueif the part is editable; otherwise,false.
IsLiteral
Gets whether the part is a literal.
public override bool IsLiteral { get; }
Property Value
- bool:
trueif the part is a literal; otherwise,false.
Text
Gets or sets the literal text.
Methods
TryParseText(IList<IPart>, string, int, CultureInfo, out int)
Tries to parse the text starting offset and returns the offset through which parsing was completed.
public override bool TryParseText(IList<IPart> parts, string text, int startOffset, CultureInfo culture, out int offset)
| Parameter | Type | Description |
|---|---|---|
| parts | IList<IPart> | The part collection in which this part is a member. |
| text | string | The text to examine. |
| startOffset | int | The start offset. |
| culture | CultureInfo | The CultureInfo to use. |
| offset | int | Returns the offset through which parsing was completed. |
Returns
- bool:
trueif parsing was successful; otherwise,false.