68 references to WithoutTrivia
Microsoft.Analyzers.Extra (3)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (3)
502argList.Add(a.Syntax.WithoutTrivia()); 509argList.Add(e.Syntax.WithoutTrivia()); 514argList.Add(arg.Syntax.WithoutTrivia());
Microsoft.CodeAnalysis.CodeStyle.Fixes (9)
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
72generator.WithModifiers(fieldDeclaration.WithoutTrivia(), modifiers).WithTriviaFrom(fieldDeclaration));
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
239return generator.InvocationExpression(taskFromResult, expression.WithoutTrivia()).WithTriviaFrom(expression);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
417right: node.WithoutTrivia())
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (1)
52TryAddExplicitCast(expressionToCoalesce, whenTrueStatement).WithoutTrivia(),
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (4)
98? (TExpressionSyntax)generator.Negate(generatorInternal, condition, semanticModel, cancellationToken).WithoutTrivia() 99: (TExpressionSyntax)condition.WithoutTrivia(); 108condition.WithoutTrivia(), 168sourceSyntax = sourceSyntax.WithoutTrivia();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
489newLiteralExpression = generator.LogicalNotExpression(expression.WithoutTrivia());
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (10)
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (1)
101var inheritdocTagName = XmlName("inheritdoc").WithoutTrivia();
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
305newType = newType.WithoutTrivia().WithAdditionalAnnotations(Formatter.Annotation);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (2)
212? SpreadElement(expression.WithoutTrivia()) 213: ExpressionElement(expression.WithoutTrivia())]).WithTriviaFrom(expressionToReplace);
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
105GetPatternType().WithoutTrivia().WithTrailingTrivia(ElasticMarker),
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpIsAndCastCheckCodeFixProvider.cs (1)
63((TypeSyntax)isExpression.Right).WithoutTrivia(),
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
155a => a.WithTarget(AttributeTargetSpecifier(MethodKeyword)).WithoutTrivia().WithAdditionalAnnotations(Formatter.Annotation)));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs (3)
58var withoutTrivia = expression.WithoutTrivia(); 72var withoutTrivia = pattern.WithoutTrivia(); 92targetType.GenerateTypeSyntax(), parenthesized.WithoutTrivia()).WithTriviaFrom(parenthesized);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (1)
441var newTypeNode = typeNode.WithoutTrivia();
Microsoft.CodeAnalysis.CSharp.Features (17)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
141expressionToInline = expressionToInline.WithoutTrivia().Parenthesize().WithAdditionalAnnotations(Simplifier.Annotation, ExpressionAnnotation);
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (3)
145newNode = QualifiedName(qualifiedNamespaceName, nameRef.WithoutTrivia()); 162newNode = MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, memberAccessNamespaceName, nameRef.WithoutTrivia()); 215newNode = AliasQualifiedName(aliasNode, nameNode.WithoutTrivia());
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (2)
119return Block(IfStatement(((WhereClauseSyntax)node).Condition.WithAdditionalAnnotations(Simplifier.Annotation).WithoutTrivia(), statement)); 140expression1 = fromClause.Expression.WithoutTrivia();
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (1)
139g.CastExpression(interfaceType, current.WithoutTrivia())).WithTriviaFrom(current));
IntroduceUsingStatement\CSharpIntroduceUsingStatementCodeRefactoringProvider.cs (1)
61declaration: declarationStatement.Declaration.WithoutTrivia(),
IntroduceVariable\CSharpIntroduceVariableService_IntroduceField.cs (1)
53EqualsValueClause(expression.WithoutTrivia()))])).WithAdditionalAnnotations(Formatter.Annotation);
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
53EqualsValueClause(expression.WithoutTrivia()))]));
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (1)
101var inheritdocTagName = XmlName("inheritdoc").WithoutTrivia();
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
305newType = newType.WithoutTrivia().WithAdditionalAnnotations(Formatter.Annotation);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (2)
212? SpreadElement(expression.WithoutTrivia()) 213: ExpressionElement(expression.WithoutTrivia())]).WithTriviaFrom(expressionToReplace);
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
105GetPatternType().WithoutTrivia().WithTrailingTrivia(ElasticMarker),
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpIsAndCastCheckCodeFixProvider.cs (1)
63((TypeSyntax)isExpression.Right).WithoutTrivia(),
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
155a => a.WithTarget(AttributeTargetSpecifier(MethodKeyword)).WithoutTrivia().WithAdditionalAnnotations(Formatter.Annotation)));
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs (3)
58var withoutTrivia = expression.WithoutTrivia(); 72var withoutTrivia = pattern.WithoutTrivia(); 92targetType.GenerateTypeSyntax(), parenthesized.WithoutTrivia()).WithTriviaFrom(parenthesized);
Microsoft.CodeAnalysis.Features (15)
CodeRefactorings\AddAwait\AbstractAddAwaitCodeRefactoringProvider.cs (1)
115var withoutTrivia = expression.WithoutTrivia();
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
100return foreachCollectionExpression.WithoutTrivia().WithAdditionalAnnotations(Formatter.Annotation);
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
205content.Add(generator.Interpolation(converted.WithoutTrivia()));
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (2)
391var returnStatement = generator.ReturnStatement(_expression.WithoutTrivia()); 426arguments = arguments.Insert(insertionIndex, generator.Argument(_expression.WithoutTrivia()));
ReplaceConditionalWithStatements\AbstractReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
291condition.WithoutTrivia(),
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (1)
259_identifierName.WithoutTrivia(),
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
72generator.WithModifiers(fieldDeclaration.WithoutTrivia(), modifiers).WithTriviaFrom(fieldDeclaration));
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
239return generator.InvocationExpression(taskFromResult, expression.WithoutTrivia()).WithTriviaFrom(expression);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
417right: node.WithoutTrivia())
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (1)
52TryAddExplicitCast(expressionToCoalesce, whenTrueStatement).WithoutTrivia(),
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (3)
99: (TExpressionSyntax)condition.WithoutTrivia(); 108condition.WithoutTrivia(), 168sourceSyntax = sourceSyntax.WithoutTrivia();
UseNamedArguments\AbstractUseNamedArgumentsCodeRefactoringProvider.cs (1)
157? WithName((TSimpleArgumentSyntax)argument.WithoutTrivia(), parameters[i].Name).WithTriviaFrom(argument)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Analyzers\VisualBasic\CodeFixes\UseConditionalExpression\VisualBasicUseConditionalExpressionForAssignmentCodeFixProvider.vb (1)
42Return variable.WithoutTrivia().WithInitializer(SyntaxFactory.EqualsValue(value)).
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
35Dim result = SyntaxFactory.ParenthesizedExpression(expression.WithoutTrivia()) _
Microsoft.CodeAnalysis.VisualBasic.Features (5)
CodeRefactorings\SyncNamespace\VisualBasicChangeNamespaceService.vb (4)
36[new] = SyntaxFactory.QualifiedName(SyntaxFactory.GlobalName(), nameRef.WithoutTrivia()) 39[new] = SyntaxFactory.QualifiedName(qualifiedNamespaceName, nameRef.WithoutTrivia()) 47[new] = SyntaxFactory.SimpleMemberAccessExpression(SyntaxFactory.GlobalName(), nameRef.WithoutTrivia()) 50[new] = SyntaxFactory.SimpleMemberAccessExpression(memberAccessNamespaceName, nameRef.WithoutTrivia())
src\Analyzers\VisualBasic\CodeFixes\UseConditionalExpression\VisualBasicUseConditionalExpressionForAssignmentCodeFixProvider.vb (1)
42Return variable.WithoutTrivia().WithInitializer(SyntaxFactory.EqualsValue(value)).
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
35Dim result = SyntaxFactory.ParenthesizedExpression(expression.WithoutTrivia()) _
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
489newLiteralExpression = generator.LogicalNotExpression(expression.WithoutTrivia());
Microsoft.ML.InternalCodeAnalyzer (1)
ContractsCheckNameofFixProvider.cs (1)
179var newNameofExp = nameofExp.ReplaceNode(nameofExp.ArgumentList.Arguments[0].Expression, exp.WithoutTrivia());