Table of Contents

Class LiteralPart

Namespace
Utils.Expressions
Assembly
Utils.dll

Represents a literal (non-interpolated) part of a string.

public class LiteralPart : IInterpolatedStringPart
Inheritance
LiteralPart
Implements
Inherited Members
Extension Methods

Remarks

Instances are constructed and fully assembled by InterpolatedStringParser before being published. The Text property is immutable from the caller's perspective; mutation is only possible through the internal Append(string) method which is inaccessible outside this assembly (#26).

Constructors

LiteralPart(string)

Initializes a new instance of LiteralPart with the specified text.

public LiteralPart(string value)

Parameters

value string

The text content of the literal part.

Properties

Length

Gets the text length of this literal part.

public int Length { get; }

Property Value

int

Text

Gets the text content of this literal part.

public string Text { get; }

Property Value

string