60 references to Space
Microsoft.CodeAnalysis.CSharp (1)
Syntax\SyntaxNormalizer.cs (1)
1138
return _useElasticTrivia ? SyntaxFactory.ElasticSpace : SyntaxFactory.
Space
;
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (2)
38
token = token.WithLeadingTrivia(SyntaxFactory.
Space
);
50
token = token.WithTrailingTrivia(SyntaxFactory.
Space
);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (12)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
385
.WithAppendedTrailingTrivia(newLinePlacement.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes) ? EndOfLine(lineEnding) :
Space
);
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
331
yield return
Space
;
src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
33
private static readonly SyntaxToken s_asyncKeywordWithSpace = AsyncKeyword.WithoutTrivia().WithTrailingTrivia(
Space
);
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (2)
78
.WithTrailingTrivia(SyntaxFactory.
Space
);
97
replacementMap[colonToken] = colonToken.WithLeadingTrivia(thisBaseKeyword.LeadingTrivia).WithTrailingTrivia(SyntaxFactory.
Space
);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (2)
355
? TriviaList(
Space
)
454
DotDotToken.WithLeadingTrivia(expression.GetLeadingTrivia()).WithTrailingTrivia(
Space
),
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndMemberAccessCodeFixProvider.cs (3)
66
OpenBraceToken.WithoutTrivia().WithAppendedTrailingTrivia(
Space
),
69
CreatePattern(binaryExpression, isPatternExpression).WithTrailingTrivia(
Space
))],
74
(TypeSyntax)asExpression.Right.WithAppendedTrailingTrivia(
Space
),
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpIsAndCastCheckCodeFixProvider.cs (1)
69
.SelectMany(t => ImmutableArray.Create(SyntaxFactory.
Space
, t, SyntaxFactory.ElasticCarriageReturnLineFeed))
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
389
.WithBaseList(BaseList([baseTypeSyntax]).WithLeadingTrivia(
Space
).WithTrailingTrivia(triviaAfterName));
Microsoft.CodeAnalysis.CSharp.Features (20)
DecompiledSource\CSharpDecompiledSourceService.cs (1)
77
.WithTrailingTrivia(new[] { SyntaxFactory.
Space
, SyntaxFactory.PreprocessingMessage(assemblyInfo) });
InitializeParameter\CSharpAddParameterCheckCodeRefactoringProvider.cs (1)
81
closeParenToken = closeParenToken.WithTrailingTrivia(
Space
);
IntroduceUsingStatement\CSharpIntroduceUsingStatementCodeRefactoringProvider.cs (1)
82
.WithUsingKeyword(Token(declarationStatement.GetLeadingTrivia(), SyntaxKind.UsingKeyword, [
Space
]));
MetadataAsSource\CSharpMetadataAsSourceService.cs (1)
43
.WithTrailingTrivia(new[] {
Space
, PreprocessingMessage(assemblyInfo) });
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
385
.WithAppendedTrailingTrivia(newLinePlacement.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes) ? EndOfLine(lineEnding) :
Space
);
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
331
yield return
Space
;
src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
33
private static readonly SyntaxToken s_asyncKeywordWithSpace = AsyncKeyword.WithoutTrivia().WithTrailingTrivia(
Space
);
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (2)
78
.WithTrailingTrivia(SyntaxFactory.
Space
);
97
replacementMap[colonToken] = colonToken.WithLeadingTrivia(thisBaseKeyword.LeadingTrivia).WithTrailingTrivia(SyntaxFactory.
Space
);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (2)
355
? TriviaList(
Space
)
454
DotDotToken.WithLeadingTrivia(expression.GetLeadingTrivia()).WithTrailingTrivia(
Space
),
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndMemberAccessCodeFixProvider.cs (3)
66
OpenBraceToken.WithoutTrivia().WithAppendedTrailingTrivia(
Space
),
69
CreatePattern(binaryExpression, isPatternExpression).WithTrailingTrivia(
Space
))],
74
(TypeSyntax)asExpression.Right.WithAppendedTrailingTrivia(
Space
),
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpIsAndCastCheckCodeFixProvider.cs (1)
69
.SelectMany(t => ImmutableArray.Create(SyntaxFactory.
Space
, t, SyntaxFactory.ElasticCarriageReturnLineFeed))
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
389
.WithBaseList(BaseList([baseTypeSyntax]).WithLeadingTrivia(
Space
).WithTrailingTrivia(triviaAfterName));
UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (3)
135
.WithInitializer(EqualsValueClause(EqualsToken.WithLeadingTrivia(
Space
).WithTrailingTrivia(
Space
), fieldInitializer))
184
=> attributeList.WithTarget(AttributeTargetSpecifier(Identifier(SyntaxFacts.GetText(SyntaxKind.FieldKeyword)), ColonToken.WithTrailingTrivia(
Space
)));
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
199
SyntaxFactory.DeclarationPattern((TypeSyntax)isExpression.Right.WithTrailingTrivia(SyntaxFactory.
Space
),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (12)
Syntax\SeparatedSyntaxListTests.cs (2)
313
collectionExpression ? SyntaxFactory.TriviaList(SyntaxFactory.
Space
) : [SyntaxFactory.
Space
],
Syntax\SyntaxNodeTests.cs (10)
2468
var id2 = id.ReplaceTrivia(id.GetAllTrivia(), (tr, tr2) => SyntaxFactory.
Space
);
3466
var newModifiers = method.Modifiers.Add(SyntaxFactory.Token(default(SyntaxTriviaList), SyntaxKind.UnsafeKeyword, SyntaxFactory.TriviaList(SyntaxFactory.
Space
)));
3856
var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.
Space
)).ToString();
3865
var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.
Space
)).ToString();
3874
var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.
Space
)).ToString();
3883
var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.
Space
)).ToString();
3892
var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.
Space
)).ToString();
3901
var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.
Space
)).ToString();
3964
var newAsync = SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.
Space
);
4002
var replacedKeyword = SyntaxFactory.Token(SyntaxKind.StackAllocKeyword).WithTrailingTrivia(SyntaxFactory.
Space
);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (2)
38
token = token.WithLeadingTrivia(SyntaxFactory.
Space
);
50
token = token.WithTrailingTrivia(SyntaxFactory.
Space
);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (9)
CodeGeneration\SyntaxGeneratorTests.cs (9)
1209
Space
))),
1221
Space
))))
1230
Space
))))
1282
Space
)),
1290
Space
))])
1302
Space
)))
1313
Space
))))])
1319
Space
))))
1329
Space
))))
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService.cs (1)
1767
SyntaxFactory.Token([SyntaxFactory.ElasticMarker], SyntaxKind.ColonToken, [SyntaxFactory.
Space
]))
Snippets\CSharpSnippetExpansionLanguageHelper.cs (1)
145
.WithUsingKeyword(UsingKeyword.WithTrailingTrivia(SyntaxFactory.
Space
));