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
valuestringThe text content of the literal part.
Properties
Length
Gets the text length of this literal part.
public int Length { get; }
Property Value
Text
Gets the text content of this literal part.
public string Text { get; }