23 references to FormatClause
Microsoft.CodeAnalysis.CSharp (12)
Binder\Binder_InterpolatedString.cs (6)
121if (interpolation.FormatClause != null) 123var text = interpolation.FormatClause.FormatStringToken.ValueText; 128diagnostics.Add(ErrorCode.ERR_EmptyFormatSpecifier, interpolation.FormatClause.Location); 133diagnostics.Add(ErrorCode.ERR_TrailingWhitespaceInFormatSpecifier, interpolation.FormatClause.Location); 137format = 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)
6052if (openBraceToken != this.OpenBraceToken || expression != this.Expression || alignmentClause != this.AlignmentClause || formatClause != this.FormatClause || closeBraceToken != this.CloseBraceToken) 6062public InterpolationSyntax WithOpenBraceToken(SyntaxToken openBraceToken) => Update(openBraceToken, this.Expression, this.AlignmentClause, this.FormatClause, this.CloseBraceToken); 6063public InterpolationSyntax WithExpression(ExpressionSyntax expression) => Update(this.OpenBraceToken, expression, this.AlignmentClause, this.FormatClause, this.CloseBraceToken); 6064public InterpolationSyntax WithAlignmentClause(InterpolationAlignmentClauseSyntax? alignmentClause) => Update(this.OpenBraceToken, this.Expression, alignmentClause, this.FormatClause, this.CloseBraceToken); 6066public 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)
503if (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)
163if (interpolation.FormatClause != null && 164!TryGetNormalizedStringForSpan(virtualCharService, interpolation.FormatClause.FormatStringToken, selectionSpan, out formatClause))
Microsoft.CodeAnalysis.CSharp.Features (3)
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (3)
85if (interpolation.FormatClause != null) 87var characters = TryConvertToVirtualChars(interpolation.FormatClause.FormatStringToken); 447.WithFormatClause(RewriteFormatClause(interpolation.FormatClause))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Generated\Syntax.Test.xml.Generated.cs (2)
12337Assert.Null(node.FormatClause); 12339var 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)
503if (interpolation.FormatClause is null)
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
503if (interpolation.FormatClause is null)