23 references to FormatClause
Microsoft.CodeAnalysis.CSharp (12)
Binder\Binder_InterpolatedString.cs (6)
121
if (interpolation.
FormatClause
!= null)
123
var text = interpolation.
FormatClause
.FormatStringToken.ValueText;
128
diagnostics.Add(ErrorCode.ERR_EmptyFormatSpecifier, interpolation.
FormatClause
.Location);
133
diagnostics.Add(ErrorCode.ERR_TrailingWhitespaceInFormatSpecifier, interpolation.
FormatClause
.Location);
137
format = new BoundLiteral(interpolation.
FormatClause
, ConstantValue.Create(text), stringType, hasErrors);
143
!(interpolation is {
FormatClause
: null, AlignmentClause: null }) ||
Syntax.xml.Main.Generated.cs (1)
1819
=> node.Update(VisitToken(node.OpenBraceToken), (ExpressionSyntax?)Visit(node.Expression) ?? throw new ArgumentNullException("expression"), (InterpolationAlignmentClauseSyntax?)Visit(node.AlignmentClause), (InterpolationFormatClauseSyntax?)Visit(node.
FormatClause
), VisitToken(node.CloseBraceToken));
Syntax.xml.Syntax.Generated.cs (5)
6052
if (openBraceToken != this.OpenBraceToken || expression != this.Expression || alignmentClause != this.AlignmentClause || formatClause != this.
FormatClause
|| closeBraceToken != this.CloseBraceToken)
6062
public InterpolationSyntax WithOpenBraceToken(SyntaxToken openBraceToken) => Update(openBraceToken, this.Expression, this.AlignmentClause, this.
FormatClause
, this.CloseBraceToken);
6063
public InterpolationSyntax WithExpression(ExpressionSyntax expression) => Update(this.OpenBraceToken, expression, this.AlignmentClause, this.
FormatClause
, this.CloseBraceToken);
6064
public InterpolationSyntax WithAlignmentClause(InterpolationAlignmentClauseSyntax? alignmentClause) => Update(this.OpenBraceToken, this.Expression, alignmentClause, this.
FormatClause
, this.CloseBraceToken);
6066
public InterpolationSyntax WithCloseBraceToken(SyntaxToken closeBraceToken) => Update(this.OpenBraceToken, this.Expression, this.AlignmentClause, this.
FormatClause
, closeBraceToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
503
if (interpolation.
FormatClause
is null)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
StringCopyPaste\StringCopyPasteContent.cs (1)
45
/// The actual string value for <see cref="InterpolationSyntax.
FormatClause
"/> for <see
StringCopyPaste\StringCopyPasteData.cs (2)
163
if (interpolation.
FormatClause
!= null &&
164
!TryGetNormalizedStringForSpan(virtualCharService, interpolation.
FormatClause
.FormatStringToken, selectionSpan, out formatClause))
Microsoft.CodeAnalysis.CSharp.Features (3)
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (3)
85
if (interpolation.
FormatClause
!= null)
87
var characters = TryConvertToVirtualChars(interpolation.
FormatClause
.FormatStringToken);
447
.WithFormatClause(RewriteFormatClause(interpolation.
FormatClause
))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Generated\Syntax.Test.xml.Generated.cs (2)
12337
Assert.Null(node.
FormatClause
);
12339
var newNode = node.WithOpenBraceToken(node.OpenBraceToken).WithExpression(node.Expression).WithAlignmentClause(node.AlignmentClause).WithFormatClause(node.
FormatClause
).WithCloseBraceToken(node.CloseBraceToken);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
503
if (interpolation.
FormatClause
is null)
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
503
if (interpolation.
FormatClause
is null)