Struct AppendNewLineInterpolatedStringHandler
- Namespace
- Dapper.SimpleSqlBuilder
- Assembly
- Dapper.SimpleSqlBuilder.dll
A handler used by the language compiler to append interpolated strings into Builder instances.
public ref struct AppendNewLineInterpolatedStringHandler
Constructors
AppendNewLineInterpolatedStringHandler(int, int, Builder, out bool)
Initializes a new instance of the AppendNewLineInterpolatedStringHandler struct.
public AppendNewLineInterpolatedStringHandler(int literalLength, int formattedCount, Builder builder, out bool isHandlerEnabled)
Parameters
literalLength
int-
The number of constant characters outside of interpolation expressions in the interpolated string.
formattedCount
int-
The number of interpolation expressions in the interpolated string.
builder
Builder-
The builder associated with the handler.
isHandlerEnabled
bool-
The value that indicates whether the handler is enabled or disabled.
Exceptions
- ArgumentException
-
Thrown when
builder
is null or doesn't implement IBuilderFormatter.
AppendNewLineInterpolatedStringHandler(int, int, bool, Builder, out bool)
Initializes a new instance of the AppendNewLineInterpolatedStringHandler struct.
public AppendNewLineInterpolatedStringHandler(int literalLength, int formattedCount, bool condition, Builder builder, out bool isHandlerEnabled)
Parameters
literalLength
int-
The number of constant characters outside of interpolation expressions in the interpolated string.
formattedCount
int-
The number of interpolation expressions in the interpolated string.
condition
bool-
The value to determine whether the handler should be enabled or disabled.
builder
Builder-
The builder associated with the handler.
isHandlerEnabled
bool-
The value that indicates whether the handler is enabled or disabled.
Exceptions
- ArgumentException
-
Thrown when
builder
is null or doesn't implement IBuilderFormatter.
Methods
AppendFormatted<T>(T)
Appends a value to the builder.
public void AppendFormatted<T>(T value)
Parameters
value
T-
The value to append.
Type Parameters
T
-
The type of the value.
AppendFormatted<T>(T, string?)
Appends a value to the builder.
public void AppendFormatted<T>(T value, string? format)
Parameters
value
T-
The value to append.
format
string?-
The format string for the value.
Type Parameters
T
-
The type of the value.
AppendLiteral(string)
Appends a string to the builder.
public void AppendLiteral(string value)
Parameters
value
string-
The string to append.