In This Article

LiteralPart Class

Represents a literal text part.

public class LiteralPart : PartBase<string>, IPart
Inheritance:
object PartBase<string> object
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:

true if the part is a delimiter literal; otherwise, False.

IsEditable

Gets whether the part is editable.

public override bool IsEditable { get; }

Property Value

bool:

true if the part is editable; otherwise, false.

IsLiteral

Gets whether the part is a literal.

public override bool IsLiteral { get; }

Property Value

bool:

true if the part is a literal; otherwise, false.

Text

Gets or sets the literal text.

public string Text { get; set; }

Property Value

string:

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:

true if parsing was successful; otherwise, false.

Inherited Members