61 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)
34
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)
68
OpenBraceToken.WithoutTrivia().WithAppendedTrailingTrivia(
Space
),
71
initialPattern.WithTrailingTrivia(
Space
))],
76
(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)
432
.WithBaseList(BaseList([baseTypeSyntax]).WithLeadingTrivia(
Space
).WithTrailingTrivia(triviaAfterName));
Microsoft.CodeAnalysis.CSharp.Features (21)
DecompiledSource\CSharpDecompiledSourceService.cs (1)
77
.WithTrailingTrivia(new[] { SyntaxFactory.
Space
, SyntaxFactory.PreprocessingMessage(assemblyInfo) });
InitializeParameter\CSharpAddParameterCheckCodeRefactoringProvider.cs (1)
73
closeParenToken = closeParenToken.WithTrailingTrivia(
Space
);
IntroduceUsingStatement\CSharpIntroduceUsingStatementCodeRefactoringProvider.cs (1)
108
.WithUsingKeyword(Token(declarationStatement.GetLeadingTrivia(), SyntaxKind.UsingKeyword, [
Space
]));
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
480
[newStatement.WithoutLeadingTrivia().WithTrailingTrivia(
Space
), nextStatement]);
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)
34
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)
68
OpenBraceToken.WithoutTrivia().WithAppendedTrailingTrivia(
Space
),
71
initialPattern.WithTrailingTrivia(
Space
))],
76
(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)
432
.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)
224
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
);
3504
var newModifiers = method.Modifiers.Add(SyntaxFactory.Token(default(SyntaxTriviaList), SyntaxKind.UnsafeKeyword, SyntaxFactory.TriviaList(SyntaxFactory.
Space
)));
3894
var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.
Space
)).ToString();
3903
var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.
Space
)).ToString();
3912
var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.
Space
)).ToString();
3921
var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.
Space
)).ToString();
3930
var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.
Space
)).ToString();
3939
var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.
Space
)).ToString();
4002
var newAsync = SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.
Space
);
4040
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)
138
.WithUsingKeyword(UsingKeyword.WithTrailingTrivia(SyntaxFactory.
Space
));