428 references to Formatter
dotnet-format (5)
Formatters\OrganizeImportsFormatter.cs (2)
13
/// OrganizeImportsFormatter that uses the <see cref="
Formatter
"/> to format document import directives.
41
var organizedDocument = await
Formatter
.OrganizeImportsAsync(document, cancellationToken);
Formatters\WhitespaceFormatter.cs (3)
13
/// CodeFormatter that uses the <see cref="
Formatter
"/> to format document whitespace.
46
var formattedDocument = await
Formatter
.FormatAsync(document, optionSet, cancellationToken).ConfigureAwait(false);
57
var formattingTextChanges =
Formatter
.GetFormattedTextChanges(root!, document.Project.Solution.Workspace, optionSet, cancellationToken);
GenerateDocumentationAndConfigFiles (11)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (1)
21
var document1 = await syntaxFormatting.FormatAsync(document,
Formatter
.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
44
=> node.WithAdditionalAnnotations(
Formatter
.Annotation, CodeGenerator.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (4)
46
.WithAdditionalAnnotations(
Formatter
.Annotation);
73
.WithAdditionalAnnotations(
Formatter
.Annotation));
96
.WithAdditionalAnnotations(
Formatter
.Annotation));
117
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (1)
106
.WithAdditionalAnnotations(Simplifier.Annotation,
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (4)
130
declarationStatement = declarationStatement.WithAdditionalAnnotations(
Formatter
.Annotation);
144
newNextStatement.WithAdditionalAnnotations(
Formatter
.Annotation).WithLeadingTrivia(
154
(current, generator) => current.WithAdditionalAnnotations(
Formatter
.Annotation).WithPrependedLeadingTrivia(
174
declarationStatement.WithAdditionalAnnotations(
Formatter
.Annotation));
Microsoft.CodeAnalysis.Analyzers (11)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (1)
21
var document1 = await syntaxFormatting.FormatAsync(document,
Formatter
.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
44
=> node.WithAdditionalAnnotations(
Formatter
.Annotation, CodeGenerator.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (4)
46
.WithAdditionalAnnotations(
Formatter
.Annotation);
73
.WithAdditionalAnnotations(
Formatter
.Annotation));
96
.WithAdditionalAnnotations(
Formatter
.Annotation));
117
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (1)
106
.WithAdditionalAnnotations(Simplifier.Annotation,
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (4)
130
declarationStatement = declarationStatement.WithAdditionalAnnotations(
Formatter
.Annotation);
144
newNextStatement.WithAdditionalAnnotations(
Formatter
.Annotation).WithLeadingTrivia(
154
(current, generator) => current.WithAdditionalAnnotations(
Formatter
.Annotation).WithPrependedLeadingTrivia(
174
declarationStatement.WithAdditionalAnnotations(
Formatter
.Annotation));
Microsoft.CodeAnalysis.CodeStyle.Fixes (26)
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
133
.WithAdditionalAnnotations(
Formatter
.Annotation, s_annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
120
var newRoot = root.ReplaceNode(docCommentNode, newDocComment.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (1)
60
localStatement = localStatement.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
91
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
102
.WithAdditionalAnnotations(
Formatter
.Annotation, annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (1)
191
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
32
switchNode, switchExpression).WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
39
switchNode, switchOperation).WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
418
.WithAdditionalAnnotations(Simplifier.Annotation,
Formatter
.Annotation);
433
.WithAdditionalAnnotations(Simplifier.Annotation,
Formatter
.Annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (1)
66
(current, _) => current.WithLeadingTrivia(finalTrivia).WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
86
return coalesceExpression.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (2)
208
.WithAdditionalAnnotations(
Formatter
.Annotation);
232
replacementNodes.Add(nullAssignmentOpt.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\Core\CodeFixes\UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs (1)
86
var newStatement = GetNewStatement(statement, objectCreation, formattingOptions, matches).WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (1)
21
var document1 = await syntaxFormatting.FormatAsync(document,
Formatter
.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
44
=> node.WithAdditionalAnnotations(
Formatter
.Annotation, CodeGenerator.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (4)
46
.WithAdditionalAnnotations(
Formatter
.Annotation);
73
.WithAdditionalAnnotations(
Formatter
.Annotation));
96
.WithAdditionalAnnotations(
Formatter
.Annotation));
117
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (1)
106
.WithAdditionalAnnotations(Simplifier.Annotation,
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (4)
130
declarationStatement = declarationStatement.WithAdditionalAnnotations(
Formatter
.Annotation);
144
newNextStatement.WithAdditionalAnnotations(
Formatter
.Annotation).WithLeadingTrivia(
154
(current, generator) => current.WithAdditionalAnnotations(
Formatter
.Annotation).WithPrependedLeadingTrivia(
174
declarationStatement.WithAdditionalAnnotations(
Formatter
.Annotation));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (51)
src\roslyn\src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAboveReturnCodeFixProvider.cs (2)
63
(c, _) => c.WithAdditionalAnnotations(
Formatter
.Annotation));
83
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
92
editor.ReplaceNode(switchStatement, switchExpressionStatement.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
269
node.Expression.Cast(expressionConvertedType).WithAdditionalAnnotations(
Formatter
.Annotation),
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
438
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (3)
171
.WithAdditionalAnnotations(
Formatter
.Annotation));
204
(t, g) => t.WithTrailingTrivia(ElasticSpace).WithoutAnnotations(
Formatter
.Annotation));
291
newType = newType.WithoutTrivia().WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (2)
102
newStatement = newStatement.WithAdditionalAnnotations(
Formatter
.Annotation);
138
newStatement = newStatement.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
78
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
129
var newReturnType = returnTypeSyntax.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (2)
198
.Select(d => d.WithAdditionalAnnotations(
Formatter
.Annotation, s_warningAnnotation));
232
.Select(directive => directive.WithAdditionalAnnotations(
Formatter
.Annotation, s_warningAnnotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
65
? node.WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryCast\CSharpRemoveUnnecessaryCastCodeFixProvider.cs (1)
71
return castExpression.Uncast().WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationCodeFixProvider.cs (3)
57
.WithAdditionalAnnotations(
Formatter
.Annotation);
66
.WithAdditionalAnnotations(
Formatter
.Annotation));
75
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionCodeFixProvider.cs (1)
70
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
165
return proposedReplacementNode.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\SimplifyPropertyAccessor\CSharpSimplifyPropertyAccessorCodeFixProvider.cs (1)
68
editor.ReplaceNode(accessor, fixedAccessor.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\SimplifyPropertyPattern\CSharpSimplifyPropertyPatternCodeFixProvider.cs (1)
83
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
32
return newCreation.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (1)
74
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\CSharpUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
51
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\CSharpUseConditionalExpressionForReturnCodeFixProvider.cs (1)
38
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseExpressionBody\UseExpressionBodyCodeFixProvider.cs (2)
70
editor.ReplaceNode(accessorList, (current, _) => current.WithAdditionalAnnotations(
Formatter
.Annotation));
85
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (1)
23
=> UpdateWorker(semanticModel, lambdaExpression, cancellationToken).WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (1)
88
var argument = Argument(rangeExpression).WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
161
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseNullPropagation\CSharpUseNullPropagationCodeFixProvider.cs (1)
39
=> block.WithStatements([newInnerStatement, .. block.Statements.Skip(1).Select(s => s.WithAdditionalAnnotations(
Formatter
.Annotation))]);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
83
var patternSyntax = AsPatternSyntax(pattern).WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
119
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpIsAndCastCheckCodeFixProvider.cs (1)
92
return newIf.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (3)
160
a => a.WithTarget(AttributeTargetSpecifier(MethodKeyword)).WithoutTrivia().WithAdditionalAnnotations(
Formatter
.Annotation)));
173
.WithAdditionalAnnotations(
Formatter
.Annotation));
480
UpdateDeclaration(declaration, assignmentExpression, expressionStatement).WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (1)
123
newDocComment = newDocComment.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
126
result[i] = result[i].WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
32
? result.WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\OperatorGenerator.cs (1)
53
return declaration.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
103
return SyntaxFactory.Token(leadingTrivia, kind, trailingTrivia).WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (2)
234
.WithAdditionalAnnotations(
Formatter
.Annotation);
255
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxFactsService.cs (2)
99
.WithAdditionalAnnotations(
Formatter
.Annotation);
109
braces.closeBrace.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (2)
221
(currentBlock, _) => currentBlock.WithAdditionalAnnotations(
Formatter
.Annotation));
279
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (1)
85
tokenWithLeadingWhitespace = token.WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithAdditionalAnnotations(
Formatter
.Annotation);
Microsoft.CodeAnalysis.CSharp.Features (98)
AddImport\CSharpAddImportFeatureService.cs (2)
445
.WithAdditionalAnnotations(
Formatter
.Annotation),
499
.WithAdditionalAnnotations(
Formatter
.Annotation);
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (1)
259
var result =
Formatter
.GetFormattingResult(
ChangeSignature\CSharpChangeSignatureService.cs (1)
906
=> [..
Formatter
.GetDefaultFormattingRules(document), new ChangeSignatureFormattingRule()];
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (1)
65
var titleComment = Comment(string.Format(" // {0}", title)).WithAdditionalAnnotations(
Formatter
.Annotation);
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (3)
375
newLocalDeclaration.WithAdditionalAnnotations(
Formatter
.Annotation));
407
.WithAdditionalAnnotations(
Formatter
.Annotation);
444
expressionToInline = expressionToInline.WithAdditionalAnnotations(
Formatter
.Annotation);
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (2)
158
return replacement.ConvertToSingleLine().WithAdditionalAnnotations(
Formatter
.Annotation);
209
return rewrittenPattern.ConvertToSingleLine().WithAdditionalAnnotations(
Formatter
.Annotation, Simplifier.Annotation);
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
109
.WithAdditionalAnnotations(
Formatter
.Annotation);
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (2)
65
.WithAdditionalAnnotations(
Formatter
.Annotation);
138
.WithAdditionalAnnotations(
Formatter
.Annotation);
ConvertLinq\ConvertForEachToLinqQuery\AbstractToMethodConverter.cs (2)
97
CreateDefaultStatement(queryOrLinqInvocationExpression, _modifyingExpression).WithAdditionalAnnotations(
Formatter
.Annotation));
184
SyntaxFactory.IdentifierName(MethodName))).WithAdditionalAnnotations(
Formatter
.Annotation);
ConvertLinq\ConvertForEachToLinqQuery\DefaultConverter.cs (1)
36
convertToQuery).WithAdditionalAnnotations(
Formatter
.Annotation));
ConvertLinq\ConvertForEachToLinqQuery\YieldReturnConverter.cs (1)
38
SyntaxFactory.ReturnStatement(queryOrLinqInvocationExpression).WithAdditionalAnnotations(
Formatter
.Annotation));
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (2)
700
forEachStatement.Statement).WithAdditionalAnnotations(
Formatter
.Annotation), queryExpressionProcessingInfo);
722
expression => forEachStatement.Statement.WithAdditionalAnnotations(
Formatter
.Annotation),
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (2)
402
var formattedRoot =
Formatter
.Format(currentRoot, SyntaxAnnotation.ElasticAnnotation, solution.Services, formattingOptions, cancellationToken);
492
[.. methodTargetingAttributes.Select(a => a.WithTarget(null).WithoutTrivia().WithAdditionalAnnotations(
Formatter
.Annotation))],
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (1)
131
var statement = globalStatement.Statement.WithAdditionalAnnotations(
Formatter
.Annotation);
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (3)
175
updated.GetFirstToken().WithAdditionalAnnotations(
Formatter
.Annotation));
188
.WithAdditionalAnnotations(
Formatter
.Annotation));
273
globalStatements.Add(GlobalStatement(statement).WithAdditionalAnnotations(
Formatter
.Annotation));
ConvertToExtension\ConvertToExtensionCodeRefactoringProvider.cs (1)
316
return converted.WithAdditionalAnnotations(
Formatter
.Annotation);
Copilot\CSharpCopilotCodeFixProvider.cs (1)
129
.WithAdditionalAnnotations(
Formatter
.Annotation, WarningAnnotation);
Copilot\CSharpImplementNotImplementedExceptionFixProvider.cs (2)
122
.WithAdditionalAnnotations(
Formatter
.Annotation, WarningAnnotation, Simplifier.Annotation);
156
.WithAdditionalAnnotations(
Formatter
.Annotation, WarningAnnotation, Simplifier.Annotation);
DecompiledSource\CSharpDecompiledSourceService.cs (2)
60
var formattedDoc = await
Formatter
.FormatAsync(
64
[CSharpDecompiledSourceFormattingRule.Instance, ..
Formatter
.GetDefaultFormattingRules(document)],
EncapsulateField\CSharpEncapsulateFieldService.cs (1)
77
.WithAdditionalAnnotations(
Formatter
.Annotation)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (2)
109
Formatter
.Annotation.AddAnnotationToSymbol(methodSymbol));
132
return container.CopyAnnotationsTo(callSiteGenerator.Generate()).WithAdditionalAnnotations(
Formatter
.Annotation);
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (1)
219
declarationStatement = declarationStatement.WithAdditionalAnnotations(
Formatter
.Annotation);
GenerateType\CSharpGenerateTypeService.cs (1)
750
var addedCompilationRoot = compilationRoot.AddUsingDirectives([usingDirective], addImportOptions.PlaceSystemNamespaceFirst,
Formatter
.Annotation);
IntroduceVariable\CSharpIntroduceVariableService_IntroduceField.cs (1)
60
EqualsValueClause(expression.WithoutTrivia()))])).WithAdditionalAnnotations(
Formatter
.Annotation);
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (5)
131
.WithAdditionalAnnotations(
Formatter
.Annotation);
259
.WithAdditionalAnnotations(
Formatter
.Annotation);
296
declarationStatement = declarationStatement.WithAdditionalAnnotations(
Formatter
.Annotation);
366
declarationStatement = declarationStatement.WithAdditionalAnnotations(
Formatter
.Annotation);
397
Block(root.GetCurrentNode(statement)).WithAdditionalAnnotations(
Formatter
.Annotation));
IntroduceVariable\CSharpIntroduceVariableService_IntroduceQueryLocal.cs (1)
37
expression).WithAdditionalAnnotations(
Formatter
.Annotation);
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (1)
185
: updatedIf.WithAdditionalAnnotations(
Formatter
.Annotation);
MetadataAsSource\CSharpMetadataAsSourceService.cs (1)
59
=> [s_memberSeparationRule, ..
Formatter
.GetDefaultFormattingRules(document)];
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (5)
155
return property.WithAdditionalAnnotations(
Formatter
.Annotation);
189
.WithAdditionalAnnotations(
Formatter
.Annotation);
202
.WithAdditionalAnnotations(
Formatter
.Annotation);
228
return accessor.WithBody(getMethodDeclaration.Body.WithAdditionalAnnotations(
Formatter
.Annotation));
277
return accessor.WithBody(body.WithAdditionalAnnotations(
Formatter
.Annotation));
ReplacePropertyWithMethods\CSharpReplacePropertyWithMethodsService.cs (4)
144
.WithAdditionalAnnotations(
Formatter
.Annotation)
220
.WithAdditionalAnnotations(
Formatter
.Annotation);
275
.WithAdditionalAnnotations(
Formatter
.Annotation);
286
.WithAdditionalAnnotations(
Formatter
.Annotation);
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
355
return expr.WithAdditionalAnnotations(
Formatter
.Annotation);
SimplifyTypeNames\SimplifyTypeNamesCodeFixProvider.cs (1)
50
Simplifier.Annotation,
Formatter
.Annotation, DoNotAllowVarAnnotation.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAboveReturnCodeFixProvider.cs (2)
63
(c, _) => c.WithAdditionalAnnotations(
Formatter
.Annotation));
83
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
92
editor.ReplaceNode(switchStatement, switchExpressionStatement.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
269
node.Expression.Cast(expressionConvertedType).WithAdditionalAnnotations(
Formatter
.Annotation),
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
438
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (3)
171
.WithAdditionalAnnotations(
Formatter
.Annotation));
204
(t, g) => t.WithTrailingTrivia(ElasticSpace).WithoutAnnotations(
Formatter
.Annotation));
291
newType = newType.WithoutTrivia().WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (2)
102
newStatement = newStatement.WithAdditionalAnnotations(
Formatter
.Annotation);
138
newStatement = newStatement.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
78
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
129
var newReturnType = returnTypeSyntax.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (2)
198
.Select(d => d.WithAdditionalAnnotations(
Formatter
.Annotation, s_warningAnnotation));
232
.Select(directive => directive.WithAdditionalAnnotations(
Formatter
.Annotation, s_warningAnnotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
65
? node.WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryCast\CSharpRemoveUnnecessaryCastCodeFixProvider.cs (1)
71
return castExpression.Uncast().WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationCodeFixProvider.cs (3)
57
.WithAdditionalAnnotations(
Formatter
.Annotation);
66
.WithAdditionalAnnotations(
Formatter
.Annotation));
75
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionCodeFixProvider.cs (1)
70
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
165
return proposedReplacementNode.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\SimplifyPropertyAccessor\CSharpSimplifyPropertyAccessorCodeFixProvider.cs (1)
68
editor.ReplaceNode(accessor, fixedAccessor.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\SimplifyPropertyPattern\CSharpSimplifyPropertyPatternCodeFixProvider.cs (1)
83
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
32
return newCreation.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (1)
74
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\CSharpUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
51
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\CSharpUseConditionalExpressionForReturnCodeFixProvider.cs (1)
38
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseExpressionBody\UseExpressionBodyCodeFixProvider.cs (2)
70
editor.ReplaceNode(accessorList, (current, _) => current.WithAdditionalAnnotations(
Formatter
.Annotation));
85
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (1)
23
=> UpdateWorker(semanticModel, lambdaExpression, cancellationToken).WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (1)
88
var argument = Argument(rangeExpression).WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
161
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseNullPropagation\CSharpUseNullPropagationCodeFixProvider.cs (1)
39
=> block.WithStatements([newInnerStatement, .. block.Statements.Skip(1).Select(s => s.WithAdditionalAnnotations(
Formatter
.Annotation))]);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
83
var patternSyntax = AsPatternSyntax(pattern).WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
119
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpIsAndCastCheckCodeFixProvider.cs (1)
92
return newIf.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (3)
160
a => a.WithTarget(AttributeTargetSpecifier(MethodKeyword)).WithoutTrivia().WithAdditionalAnnotations(
Formatter
.Annotation)));
173
.WithAdditionalAnnotations(
Formatter
.Annotation));
480
UpdateDeclaration(declaration, assignmentExpression, expressionStatement).WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (1)
123
newDocComment = newDocComment.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
126
result[i] = result[i].WithAdditionalAnnotations(
Formatter
.Annotation);
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (1)
182
.WithAdditionalAnnotations(
Formatter
.Annotation);
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (14)
Microsoft.CodeQuality.Analyzers\QualityGuidelines\CSharpDoNotInitializeUnnecessarily.Fixer.cs (1)
53
.WithAdditionalAnnotations(
Formatter
.Annotation);
Microsoft.NetCore.Analyzers\Performance\CSharpDoNotGuardCall.Fixer.cs (2)
54
.WithAdditionalAnnotations(
Formatter
.Annotation).WithTriviaFrom(conditionalOperationNode);
61
.WithAdditionalAnnotations(
Formatter
.Annotation)
Microsoft.NetCore.Analyzers\Performance\CSharpPreferHashDataOverComputeHash.Fixer.cs (2)
184
.WithAdditionalAnnotations(
Formatter
.Annotation);
193
.WithAdditionalAnnotations(
Formatter
.Annotation);
Microsoft.NetCore.Analyzers\Runtime\CSharpAvoidRedundantRegexIsMatchBeforeMatch.Fixer.cs (1)
499
.WithAdditionalAnnotations(
Formatter
.Annotation);
Microsoft.NetCore.Analyzers\Runtime\CSharpSpecifyCultureForToLowerAndToUpper.Fixer.cs (4)
34
var newArg = generator.Argument(CreateCurrentCultureMemberAccess(generator, model)).WithAdditionalAnnotations(
Formatter
.Annotation);
35
var newInvocation = invocation.AddArgumentListArguments((ArgumentSyntax)newArg).WithAdditionalAnnotations(
Formatter
.Annotation);
51
var newMemberAccess = memberAccess.WithName((SimpleNameSyntax)generator.IdentifierName(replacementMethodName)).WithAdditionalAnnotations(
Formatter
.Annotation);
59
var newMemberBinding = memberBinding.WithName((SimpleNameSyntax)generator.IdentifierName(replacementMethodName)).WithAdditionalAnnotations(
Formatter
.Annotation);
Microsoft.NetCore.Analyzers\Runtime\CSharpUseOrdinalStringComparison.Fixer.cs (3)
36
MemberAccessExpressionSyntax newMemberAccess = memberAccess.WithName((SimpleNameSyntax)newIdentifier).WithAdditionalAnnotations(
Formatter
.Annotation);
59
.WithAdditionalAnnotations(
Formatter
.Annotation);
60
InvocationExpressionSyntax newInvoke = invokeParent.AddArgumentListArguments((ArgumentSyntax)newArg).WithAdditionalAnnotations(
Formatter
.Annotation);
Microsoft.NetCore.Analyzers\Usage\CSharpMissingShebangInFileBasedProgram.Fixer.cs (1)
36
.WithAdditionalAnnotations(
Formatter
.Annotation);
Microsoft.CodeAnalysis.CSharp.Workspaces (15)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
3280
block = block.WithOpenBraceToken(block.OpenBraceToken.WithAdditionalAnnotations(
Formatter
.Annotation));
Simplification\CSharpSimplificationService.cs (1)
165
tokenWithLeadingWhitespace = token.WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithAdditionalAnnotations(
Formatter
.Annotation);
Simplification\CSharpSimplificationService.Expander.cs (1)
1118
.WithAdditionalAnnotations(Simplifier.Annotation,
Formatter
.Annotation);
Simplification\Reducers\CSharpNameReducer.cs (1)
59
node = node.CopyAnnotationsTo(replacementNode).WithAdditionalAnnotations(
Formatter
.Annotation);
Simplification\Reducers\CSharpNameReducer.Rewriter.cs (1)
223
return result.Parenthesize().WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
32
? result.WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\OperatorGenerator.cs (1)
53
return declaration.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
103
return SyntaxFactory.Token(leadingTrivia, kind, trailingTrivia).WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (2)
234
.WithAdditionalAnnotations(
Formatter
.Annotation);
255
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxFactsService.cs (2)
99
.WithAdditionalAnnotations(
Formatter
.Annotation);
109
braces.closeBrace.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (2)
221
(currentBlock, _) => currentBlock.WithAdditionalAnnotations(
Formatter
.Annotation));
279
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (1)
85
tokenWithLeadingWhitespace = token.WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithAdditionalAnnotations(
Formatter
.Annotation);
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Formatting\OmniSharpFormatter.cs (1)
18
=>
Formatter
.FormatAsync(document, spans, options.UnderlyingObject, rules: default, cancellationToken);
Microsoft.CodeAnalysis.Features (82)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs (2)
73
.WithAdditionalAnnotations(
Formatter
.Annotation);
124
return newConstructor.WithAdditionalAnnotations(
Formatter
.Annotation);
ChangeSignature\AbstractChangeSignatureService.cs (4)
406
var formattedRoot =
Formatter
.Format(
428
var formattedDoc = await
Formatter
.FormatAsync(reducedDoc, SyntaxAnnotation.ElasticAnnotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
526
newArguments.Add(argument.WithName(param.Name).WithAdditionalAnnotations(
Formatter
.Annotation));
549
newArguments.Add(paramsArrayArgument.WithName(param.Name).WithAdditionalAnnotations(
Formatter
.Annotation));
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaWarningCodeAction.cs (1)
85
=>
Formatter
.Format(node, _document.Project.Solution.Services, _options, cancellationToken);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
221
=>
Formatter
.Format(node, _document.Project.Solution.Services, _options, cancellationToken);
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
156
var textChanges =
Formatter
.GetFormattedTextChanges(
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (6)
417
import = import.WithAdditionalAnnotations(
Formatter
.Annotation);
621
root = root.WithAdditionalAnnotations(
Formatter
.Annotation);
625
root =
Formatter
.Format(root,
Formatter
.Annotation, services, documentOptions.FormattingOptions, cancellationToken);
701
var formattedDocument = await
Formatter
.FormatAsync(
702
documentWithAdditionalImports,
Formatter
.Annotation, documentOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (2)
224
document = await
Formatter
.FormatAsync(document,
Formatter
.Annotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\ImportCompletionProviderHelpers.cs (3)
37
var importNode = syntaxGenerator.NamespaceImportDeclaration(namespaceName).WithAdditionalAnnotations(
Formatter
.Annotation);
47
var formattedDocumentWithImport = await
Formatter
.FormatAsync(documentWithImport,
Formatter
.Annotation, formattingOptions, cancellationToken).ConfigureAwait(false);
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
238
.WithAdditionalAnnotations(
Formatter
.Annotation);
ConvertAnonymousType\AbstractConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (1)
133
return ConvertToTuple(anonCreation).WithAdditionalAnnotations(
Formatter
.Annotation);
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
146
return fullProperty.WithAdditionalAnnotations(
Formatter
.Annotation);
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (2)
100
return foreachCollectionExpression.WithoutTrivia().WithAdditionalAnnotations(
Formatter
.Annotation);
146
return (TStatementSyntax)localDecl.WithAdditionalAnnotations(
Formatter
.Annotation);
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (1)
49
.WithAdditionalAnnotations(
Formatter
.Annotation, Simplifier.Annotation);
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (1)
417
syntaxFacts.ConvertToSingleLine(expressions[index], useElasticTrivia: true).WithAdditionalAnnotations(
Formatter
.Annotation));
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
713
.WithAdditionalAnnotations(
Formatter
.Annotation);
EncapsulateField\AbstractEncapsulateFieldService.cs (5)
202
document = await
Formatter
.FormatAsync(document.WithSyntaxRoot(rewrittenFieldDeclaration),
Formatter
.Annotation, formattingOptions, cancellationToken).ConfigureAwait(false);
224
documentWithProperty = await
Formatter
.FormatAsync(documentWithProperty,
Formatter
.Annotation, formattingOptions, cancellationToken).ConfigureAwait(false);
360
Formatter
.Annotation.AddAnnotationToSymbol(propertySymbol));
ExtractInterface\AbstractExtractInterfaceService.cs (3)
292
var formattedDocument = await
Formatter
.FormatAsync(
294
Formatter
.Annotation,
345
var unformattedTypeDeclaration = syntaxGenerator.AddInterfaceType(typeDeclaration, typeReference).WithAdditionalAnnotations(
Formatter
.Annotation);
ExtractMethod\MethodExtractor.cs (3)
158
Formatter
.Format(simplifiedRoot,
Formatter
.Annotation, services, this.Options.CodeCleanupOptions.FormattingOptions, formattingRules, cancellationToken));
201
=> [GetCustomFormattingRule(document), ..
Formatter
.GetDefaultFormattingRules(document)];
Formatting\FormattingRuleUtilities.cs (1)
26
return rules.AddRange(
Formatter
.GetDefaultFormattingRules(document.LanguageServices));
GenerateEqualsAndGetHashCodeFromMembers\AbstractGenerateEqualsAndGetHashCodeService.cs (2)
30
var formattedDocument = await
Formatter
.FormatAsync(
33
[formatBinaryRule, ..
Formatter
.GetDefaultFormattingRules(document)],
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (1)
473
syntaxGenerator.AddParentheses(inlineMethodContext.InlineExpression.WithAdditionalAnnotations(
Formatter
.Annotation))));
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (1)
525
updatedExpression.WithAdditionalAnnotations(
Formatter
.Annotation), parameterName, insertionIndex, named);
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (3)
181
newParent.WithAdditionalAnnotations(
Formatter
.Annotation)));
261
newParent.WithAdditionalAnnotations(
Formatter
.Annotation)));
270
usingStatement.WithAdditionalAnnotations(
Formatter
.Annotation)));
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (5)
619
return root.ReplaceNode(currentParent, updatedParent.WithAdditionalAnnotations(
Formatter
.Annotation));
643
return root.ReplaceNode(currentParent, updatedParent.WithAdditionalAnnotations(
Formatter
.Annotation));
669
return root.ReplaceNode(currentParent, updatedParent.WithAdditionalAnnotations(
Formatter
.Annotation));
702
return root.ReplaceNode(currentParent, updatedParent.WithAdditionalAnnotations(
Formatter
.Annotation));
727
return root.ReplaceNode(currentParent, updatedParent.WithAdditionalAnnotations(
Formatter
.Annotation));
MetadataAsSource\AbstractMetadataAsSourceService.cs (1)
56
var formattedDoc = await
Formatter
.FormatAsync(
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
278
var formattedDocument = await
Formatter
.FormatAsync(document, SyntaxAnnotation.ElasticAnnotation, formattingOptions, cancellationToken).ConfigureAwait(false);
PullMemberUp\MembersPuller.cs (1)
387
destinationDocument = await
Formatter
.FormatAsync(destinationDocument, s_removableImportAnnotation, options.CleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (1)
75
token.Parent.ReplaceToken(token, default(SyntaxToken)).WithAdditionalAnnotations(
Formatter
.Annotation)));
Shared\Utilities\ExtractTypeHelpers.cs (2)
110
var formattedDocument = await
Formatter
.FormatAsync(simplified, newCleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
128
return
Formatter
.Format(syntaxGenerator.SyntaxGeneratorInternal.TypeParameterList(typeParameterNames), document.Project.Solution.Services, formattingOptions, cancellationToken).ToString();
Snippets\SnippetProviders\AbstractSnippetProvider.cs (3)
157
document = await
Formatter
.FormatAsync(document, FindSnippetAnnotation, syntaxFormattingOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
160
document = await
Formatter
.FormatAsync(document, SyntaxAnnotation.ElasticAnnotation, syntaxFormattingOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
222
reformatSnippetNode.WithAdditionalAnnotations(FindSnippetAnnotation, Simplifier.Annotation,
Formatter
.Annotation));
SplitOrMergeIfStatements\Consecutive\AbstractMergeConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
91
newCondition = newCondition.WithAdditionalAnnotations(
Formatter
.Annotation);
SplitOrMergeIfStatements\Consecutive\AbstractSplitIntoConsecutiveIfStatementsCodeRefactoringProvider.cs (2)
66
leftCondition = leftCondition.WithAdditionalAnnotations(
Formatter
.Annotation);
67
rightCondition = rightCondition.WithAdditionalAnnotations(
Formatter
.Annotation);
SplitOrMergeIfStatements\Nested\AbstractMergeNestedIfStatementsCodeRefactoringProvider.cs (1)
85
return root.ReplaceNode(outerIfOrElseIf, newIfOrElseIf.WithAdditionalAnnotations(
Formatter
.Annotation));
SplitOrMergeIfStatements\Nested\AbstractSplitIntoNestedIfStatementsCodeRefactoringProvider.cs (1)
57
root.ReplaceNode(ifOrElseIf, outerIfOrElseIf.WithAdditionalAnnotations(
Formatter
.Annotation)));
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
133
.WithAdditionalAnnotations(
Formatter
.Annotation, s_annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
120
var newRoot = root.ReplaceNode(docCommentNode, newDocComment.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (1)
60
localStatement = localStatement.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
91
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
102
.WithAdditionalAnnotations(
Formatter
.Annotation, annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (1)
191
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
32
switchNode, switchExpression).WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
39
switchNode, switchOperation).WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
418
.WithAdditionalAnnotations(Simplifier.Annotation,
Formatter
.Annotation);
433
.WithAdditionalAnnotations(Simplifier.Annotation,
Formatter
.Annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (1)
66
(current, _) => current.WithLeadingTrivia(finalTrivia).WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
86
return coalesceExpression.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (2)
208
.WithAdditionalAnnotations(
Formatter
.Annotation);
232
replacementNodes.Add(nullAssignmentOpt.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Analyzers\Core\CodeFixes\UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs (1)
86
var newStatement = GetNewStatement(statement, objectCreation, formattingOptions, matches).WithAdditionalAnnotations(
Formatter
.Annotation);
Wrapping\AbstractCodeActionComputer.cs (1)
167
var formattedDocument = await
Formatter
.FormatAsync(
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (12)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\ConvertToAsync\VisualBasicConvertToAsyncFunctionCodeFixProvider.vb (2)
104
.WithAdditionalAnnotations(
Formatter
.Annotation)
109
.WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicChangeToYieldCodeFixProvider.vb (1)
46
Dim yieldStatement = SyntaxFactory.YieldStatement(returnStatement.Expression).WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (2)
117
Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(
Formatter
.Annotation)
136
Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (1)
106
Dim newCastExpression = Uncast(castExpression).WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\RemoveUnusedParametersAndValues\VisualBasicRemoveUnusedValuesCodeFixProvider.vb (1)
71
Return proposedReplacementNode.WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
69
Dim result = newStatement.WithLeadingTrivia(totalTrivia).WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeBlockSyntaxExtensions.vb (3)
94
Return SyntaxFactory.EndClassStatement().WithAdditionalAnnotations(
Formatter
.Annotation)
96
Return SyntaxFactory.EndInterfaceStatement().WithAdditionalAnnotations(
Formatter
.Annotation)
98
Return SyntaxFactory.EndStructureStatement().WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicRemoveUnnecessaryImportsService.vb (1)
44
newRoot = newRoot.WithAdditionalAnnotations(
Formatter
.Annotation)
Microsoft.CodeAnalysis.VisualBasic.Features (39)
AddImport\VisualBasicAddImportFeatureService.vb (1)
303
newRoot = newRoot.WithAdditionalAnnotations(CaseCorrector.Annotation,
Formatter
.Annotation)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
737
Dim coreRules =
Formatter
.GetDefaultFormattingRules(document)
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (3)
195
Dim updatedDocument = Await document.ReplaceNodeAsync(node, updatedProperty.WithAdditionalAnnotations(
Formatter
.Annotation), cancellationToken).ConfigureAwait(False)
222
Dim updatedDocument = Await document.ReplaceNodeAsync(endStatement.Parent, updatedParent.WithAdditionalAnnotations(
Formatter
.Annotation), cancellationToken).ConfigureAwait(False)
257
updatedDocument = Await updatedDocument.ReplaceNodeAsync(tree, tree.WithAdditionalAnnotations(
Formatter
.Annotation), cancellationToken).ConfigureAwait(False)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (2)
206
.WithAdditionalAnnotations(
Formatter
.Annotation)
225
.WithAdditionalAnnotations(
Formatter
.Annotation)
CodeFixes\OverloadBase\OverloadBaseCodeFixProvider.AddKeywordAction.vb (1)
77
Return newNode.WithAdditionalAnnotations(
Formatter
.Annotation)
CodeFixes\Suppression\VisualBasicSuppressionCodeFixProvider.vb (2)
66
Dim titleComment = SyntaxFactory.CommentTrivia(String.Format(" ' {0}", title)).WithAdditionalAnnotations(
Formatter
.Annotation)
140
attributeStatement = CType(
Formatter
.Format(attributeStatement, services, options, cancellationToken), AttributesStatementSyntax)
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.ReferenceRewriter.vb (1)
61
.WithAdditionalAnnotations(
Formatter
.Annotation, Simplifier.Annotation)
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (4)
195
updatedDocument = Await updatedDocument.ReplaceNodeAsync(scope, newScope.WithAdditionalAnnotations(
Formatter
.Annotation), cancellationToken).ConfigureAwait(False)
281
.WithAdditionalAnnotations(
Formatter
.Annotation)
312
.WithAdditionalAnnotations(
Formatter
.Annotation)
324
.WithAdditionalAnnotations(
Formatter
.Annotation)
EncapsulateField\VisualBasicEncapsulateFieldService.vb (2)
50
root = root.ReplaceNode(fieldIdentifier, fieldIdentifier.WithIdentifier(newIdentifier).WithAdditionalAnnotations(annotation,
Formatter
.Annotation))
62
.WithAdditionalAnnotations(
Formatter
.Annotation)
ExtractInterface\VisualBasicExtractInterfaceService.vb (2)
75
Return implementsClause.AddInterfaceMembers(qualifiedName).WithAdditionalAnnotations(
Formatter
.Annotation)
77
Return SyntaxFactory.ImplementsClause(qualifiedName).WithAdditionalAnnotations(
Formatter
.Annotation)
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (2)
92
Formatter
.Annotation.AddAnnotationToSymbol(methodSymbol))
115
Return container.CopyAnnotationsTo(callSiteGenerator.Generate()).WithAdditionalAnnotations(
Formatter
.Annotation)
GenerateType\VisualBasicGenerateTypeService.vb (1)
663
Dim addedCompilationRoot = compilationRoot.AddImportsStatement(newImport, addImportOptions.PlaceSystemNamespaceFirst,
Formatter
.Annotation, Simplifier.Annotation)
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceField.vb (1)
215
.WithAdditionalAnnotations(
Formatter
.Annotation)
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceLocal.vb (4)
95
SyntaxFactory.EndFunctionStatement()).WithAdditionalAnnotations(
Formatter
.Annotation)
128
declarationStatement = declarationStatement.WithAdditionalAnnotations(
Formatter
.Annotation, localAnnotation)
150
Dim finalInnerMostBlock = oldInnerMostCommonBlock.ReplaceStatements(statements,
Formatter
.Annotation)
176
Dim newRoot = tree.ConvertSingleLineToMultiLineExecutableBlock(oldBlock, statements,
Formatter
.Annotation)
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceQueryLocal.vb (1)
30
expression)).WithAdditionalAnnotations(
Formatter
.Annotation)
MetadataAsSource\VisualBasicMetadataAsSourceService.vb (1)
67
Dim coreRules =
Formatter
.GetDefaultFormattingRules(document)
ReplaceMethodWithProperty\VisualBasicReplaceMethodWithPropertyService.vb (1)
129
Return newPropertyDeclaration.WithAdditionalAnnotations(
Formatter
.Annotation)
ReplacePropertyWithMethods\VisualBasicReplacePropertyWithMethods.vb (1)
109
Return statement.WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\ConvertToAsync\VisualBasicConvertToAsyncFunctionCodeFixProvider.vb (2)
104
.WithAdditionalAnnotations(
Formatter
.Annotation)
109
.WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicChangeToYieldCodeFixProvider.vb (1)
46
Dim yieldStatement = SyntaxFactory.YieldStatement(returnStatement.Expression).WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (2)
117
Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(
Formatter
.Annotation)
136
Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (1)
106
Dim newCastExpression = Uncast(castExpression).WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\RemoveUnusedParametersAndValues\VisualBasicRemoveUnusedValuesCodeFixProvider.vb (1)
71
Return proposedReplacementNode.WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
69
Dim result = newStatement.WithLeadingTrivia(totalTrivia).WithAdditionalAnnotations(
Formatter
.Annotation)
Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers (14)
Microsoft.NetCore.Analyzers\InteropServices\BasicSpecifyMarshalingForPInvokeStringArguments.Fixer.vb (1)
39
WithAdditionalAnnotations(
Formatter
.Annotation)
Microsoft.NetCore.Analyzers\Performance\BasicDoNotGuardCall.Fixer.vb (3)
51
.WithAdditionalAnnotations(
Formatter
.Annotation).WithTriviaFrom(conditionalOperationNode)
63
.WithAdditionalAnnotations(
Formatter
.Annotation).WithTriviaFrom(conditionalOperationNode)
65
newConditionNode = newConditionNode.WithAdditionalAnnotations(
Formatter
.Annotation).WithTriviaFrom(conditionalOperationNode)
Microsoft.NetCore.Analyzers\Performance\BasicPreferHashDataOverComputeHash.Fixer.vb (1)
81
newParent = newParent.RemoveNode(newParent.GetCurrentNode(usingBlock), SyntaxRemoveOptions.KeepNoTrivia).WithAdditionalAnnotations(
Formatter
.Annotation)
Microsoft.NetCore.Analyzers\Runtime\BasicForwardCancellationTokenToInvocations.Fixer.vb (1)
85
Return arrayCreationExpression.WithAdditionalAnnotations(
Formatter
.Annotation, Simplifier.Annotation)
Microsoft.NetCore.Analyzers\Runtime\BasicSpecifyCultureForToLowerAndToUpper.Fixer.vb (5)
41
Dim newArg = generator.Argument(CreateCurrentCultureMemberAccess(generator, model)).WithAdditionalAnnotations(
Formatter
.Annotation)
42
Dim newInvocation = invocation.AddArgumentListArguments(DirectCast(newArg, ArgumentSyntax)).WithAdditionalAnnotations(
Formatter
.Annotation)
53
Dim newArg = generator.Argument(CreateCurrentCultureMemberAccess(generator, model)).WithAdditionalAnnotations(
Formatter
.Annotation)
54
Dim invocation = generator.InvocationExpression(memberAccess.WithoutTrailingTrivia(), newArg).WithAdditionalAnnotations(
Formatter
.Annotation)
63
Dim newMemberAccess = memberAccess.WithName(DirectCast(generator.IdentifierName(replacementMethodName), SimpleNameSyntax)).WithAdditionalAnnotations(
Formatter
.Annotation)
Microsoft.NetCore.Analyzers\Runtime\BasicUseOrdinalStringComparison.Fixer.vb (3)
31
Dim newMemberAccess = memberAccess.WithName(CType(newIdentifier, SimpleNameSyntax)).WithAdditionalAnnotations(
Formatter
.Annotation)
52
WithAdditionalAnnotations(
Formatter
.Annotation)
53
Dim newInvoke = invokeParent.AddArgumentListArguments(CType(newArg, ArgumentSyntax)).WithAdditionalAnnotations(
Formatter
.Annotation)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (6)
Simplification\Reducers\VisualBasicNameReducer.vb (1)
47
node = node.CopyAnnotationsTo(replacementNode).WithAdditionalAnnotations(
Formatter
.Annotation)
Simplification\Reducers\VisualBasicVariableDeclaratorReducer.vb (1)
44
replacementNode = node.CopyAnnotationsTo(replacementNode).WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeBlockSyntaxExtensions.vb (3)
94
Return SyntaxFactory.EndClassStatement().WithAdditionalAnnotations(
Formatter
.Annotation)
96
Return SyntaxFactory.EndInterfaceStatement().WithAdditionalAnnotations(
Formatter
.Annotation)
98
Return SyntaxFactory.EndStructureStatement().WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicRemoveUnnecessaryImportsService.vb (1)
44
newRoot = newRoot.WithAdditionalAnnotations(
Formatter
.Annotation)
Microsoft.CodeAnalysis.Workspaces (15)
CodeActions\CodeAction.cs (1)
460
/// Formatting nodes annotated with <see cref="
Formatter
.Annotation"/>
Formatting\AbstractFormattingService.cs (1)
20
return
Formatter
.FormatAsync(document, spans, syntaxFormattingOptions, rules: default, cancellationToken);
Rename\ConflictEngine\RenamedSpansTracker.cs (2)
167
document = await
Formatter
.FormatAsync(document,
Formatter
.Annotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (1)
21
var document1 = await syntaxFormatting.FormatAsync(document,
Formatter
.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
44
=> node.WithAdditionalAnnotations(
Formatter
.Annotation, CodeGenerator.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (4)
46
.WithAdditionalAnnotations(
Formatter
.Annotation);
73
.WithAdditionalAnnotations(
Formatter
.Annotation));
96
.WithAdditionalAnnotations(
Formatter
.Annotation));
117
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (1)
106
.WithAdditionalAnnotations(Simplifier.Annotation,
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (4)
130
declarationStatement = declarationStatement.WithAdditionalAnnotations(
Formatter
.Annotation);
144
newNextStatement.WithAdditionalAnnotations(
Formatter
.Annotation).WithLeadingTrivia(
154
(current, generator) => current.WithAdditionalAnnotations(
Formatter
.Annotation).WithPrependedLeadingTrivia(
174
declarationStatement.WithAdditionalAnnotations(
Formatter
.Annotation));
Microsoft.ML.CodeGenerator (1)
Utils.cs (1)
189
trainProgramCSFileContent =
Formatter
.Format(syntaxNode, new AdhocWorkspace()).ToFullString();
Roslyn.Diagnostics.Analyzers (12)
AbstractApplyTraitToClass`1.cs (1)
117
newTypeDeclaration = syntaxGenerator.AddAttributes(newTypeDeclaration, attribute.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (1)
21
var document1 = await syntaxFormatting.FormatAsync(document,
Formatter
.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
44
=> node.WithAdditionalAnnotations(
Formatter
.Annotation, CodeGenerator.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (4)
46
.WithAdditionalAnnotations(
Formatter
.Annotation);
73
.WithAdditionalAnnotations(
Formatter
.Annotation));
96
.WithAdditionalAnnotations(
Formatter
.Annotation));
117
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (1)
106
.WithAdditionalAnnotations(Simplifier.Annotation,
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (4)
130
declarationStatement = declarationStatement.WithAdditionalAnnotations(
Formatter
.Annotation);
144
newNextStatement.WithAdditionalAnnotations(
Formatter
.Annotation).WithLeadingTrivia(
154
(current, generator) => current.WithAdditionalAnnotations(
Formatter
.Annotation).WithPrependedLeadingTrivia(
174
declarationStatement.WithAdditionalAnnotations(
Formatter
.Annotation));
Roslyn.Diagnostics.CSharp.Analyzers (10)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
32
? result.WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\OperatorGenerator.cs (1)
53
return declaration.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
103
return SyntaxFactory.Token(leadingTrivia, kind, trailingTrivia).WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (2)
234
.WithAdditionalAnnotations(
Formatter
.Annotation);
255
.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxFactsService.cs (2)
99
.WithAdditionalAnnotations(
Formatter
.Annotation);
109
braces.closeBrace.WithAdditionalAnnotations(
Formatter
.Annotation));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (2)
221
(currentBlock, _) => currentBlock.WithAdditionalAnnotations(
Formatter
.Annotation));
279
.WithAdditionalAnnotations(
Formatter
.Annotation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (1)
85
tokenWithLeadingWhitespace = token.WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithAdditionalAnnotations(
Formatter
.Annotation);
Roslyn.Diagnostics.VisualBasic.Analyzers (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeBlockSyntaxExtensions.vb (3)
94
Return SyntaxFactory.EndClassStatement().WithAdditionalAnnotations(
Formatter
.Annotation)
96
Return SyntaxFactory.EndInterfaceStatement().WithAdditionalAnnotations(
Formatter
.Annotation)
98
Return SyntaxFactory.EndStructureStatement().WithAdditionalAnnotations(
Formatter
.Annotation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicRemoveUnnecessaryImportsService.vb (1)
44
newRoot = newRoot.WithAdditionalAnnotations(
Formatter
.Annotation)
System.Windows.Forms.Analyzers.CodeFixes.CSharp (1)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (1)
144
.WithAdditionalAnnotations(
Formatter
.Annotation);