113 references to CSharpFormattingOptions2
Microsoft.CodeAnalysis.CSharp.Workspaces (113)
Formatting\CSharpFormattingOptions.cs (75)
12
/// <inheritdoc cref="
CSharpFormattingOptions2
"/>
22
defaultValue:
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue.HasFlag(flag),
24
storageMapping: new NewLineForBracesInternalStorageMapping(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, flag),
32
defaultValue:
CSharpFormattingOptions2
.SpaceBetweenParentheses.DefaultValue.HasFlag(flag),
34
storageMapping: new SpacePlacementInternalStorageMapping(
CSharpFormattingOptions2
.SpaceBetweenParentheses, flag),
71
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName"/>
72
public static Option<bool> SpacingAfterMethodDeclarationName { get; } =
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName.ToPublicOption();
74
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceWithinMethodDeclarationParenthesis"/>
75
public static Option<bool> SpaceWithinMethodDeclarationParenthesis { get; } =
CSharpFormattingOptions2
.SpaceWithinMethodDeclarationParenthesis.ToPublicOption();
77
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodDeclarationParentheses"/>
78
public static Option<bool> SpaceBetweenEmptyMethodDeclarationParentheses { get; } =
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodDeclarationParentheses.ToPublicOption();
80
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceAfterMethodCallName"/>
81
public static Option<bool> SpaceAfterMethodCallName { get; } =
CSharpFormattingOptions2
.SpaceAfterMethodCallName.ToPublicOption();
83
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceWithinMethodCallParentheses"/>
84
public static Option<bool> SpaceWithinMethodCallParentheses { get; } =
CSharpFormattingOptions2
.SpaceWithinMethodCallParentheses.ToPublicOption();
86
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodCallParentheses"/>
87
public static Option<bool> SpaceBetweenEmptyMethodCallParentheses { get; } =
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodCallParentheses.ToPublicOption();
89
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceAfterControlFlowStatementKeyword"/>
90
public static Option<bool> SpaceAfterControlFlowStatementKeyword { get; } =
CSharpFormattingOptions2
.SpaceAfterControlFlowStatementKeyword.ToPublicOption();
96
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceAfterCast"/>
97
public static Option<bool> SpaceAfterCast { get; } =
CSharpFormattingOptions2
.SpaceAfterCast.ToPublicOption();
99
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration"/>
100
public static Option<bool> SpacesIgnoreAroundVariableDeclaration { get; } =
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration.ToPublicOption();
102
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBeforeOpenSquareBracket"/>
103
public static Option<bool> SpaceBeforeOpenSquareBracket { get; } =
CSharpFormattingOptions2
.SpaceBeforeOpenSquareBracket.ToPublicOption();
105
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBetweenEmptySquareBrackets"/>
106
public static Option<bool> SpaceBetweenEmptySquareBrackets { get; } =
CSharpFormattingOptions2
.SpaceBetweenEmptySquareBrackets.ToPublicOption();
108
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceWithinSquareBrackets"/>
109
public static Option<bool> SpaceWithinSquareBrackets { get; } =
CSharpFormattingOptions2
.SpaceWithinSquareBrackets.ToPublicOption();
111
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceAfterColonInBaseTypeDeclaration"/>
112
public static Option<bool> SpaceAfterColonInBaseTypeDeclaration { get; } =
CSharpFormattingOptions2
.SpaceAfterColonInBaseTypeDeclaration.ToPublicOption();
114
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceAfterComma"/>
115
public static Option<bool> SpaceAfterComma { get; } =
CSharpFormattingOptions2
.SpaceAfterComma.ToPublicOption();
117
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceAfterDot"/>
118
public static Option<bool> SpaceAfterDot { get; } =
CSharpFormattingOptions2
.SpaceAfterDot.ToPublicOption();
120
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceAfterSemicolonsInForStatement"/>
121
public static Option<bool> SpaceAfterSemicolonsInForStatement { get; } =
CSharpFormattingOptions2
.SpaceAfterSemicolonsInForStatement.ToPublicOption();
123
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBeforeColonInBaseTypeDeclaration"/>
124
public static Option<bool> SpaceBeforeColonInBaseTypeDeclaration { get; } =
CSharpFormattingOptions2
.SpaceBeforeColonInBaseTypeDeclaration.ToPublicOption();
126
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBeforeComma"/>
127
public static Option<bool> SpaceBeforeComma { get; } =
CSharpFormattingOptions2
.SpaceBeforeComma.ToPublicOption();
129
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBeforeDot"/>
130
public static Option<bool> SpaceBeforeDot { get; } =
CSharpFormattingOptions2
.SpaceBeforeDot.ToPublicOption();
132
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBeforeSemicolonsInForStatement"/>
133
public static Option<bool> SpaceBeforeSemicolonsInForStatement { get; } =
CSharpFormattingOptions2
.SpaceBeforeSemicolonsInForStatement.ToPublicOption();
135
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpacingAroundBinaryOperator"/>
136
public static Option<BinaryOperatorSpacingOptions> SpacingAroundBinaryOperator { get; } =
CSharpFormattingOptions2
.SpacingAroundBinaryOperator.ToPublicOption();
138
/// <inheritdoc cref="
CSharpFormattingOptions2
.IndentBraces"/>
139
public static Option<bool> IndentBraces { get; } =
CSharpFormattingOptions2
.IndentBraces.ToPublicOption();
141
/// <inheritdoc cref="
CSharpFormattingOptions2
.IndentBlock"/>
142
public static Option<bool> IndentBlock { get; } =
CSharpFormattingOptions2
.IndentBlock.ToPublicOption();
144
/// <inheritdoc cref="
CSharpFormattingOptions2
.IndentSwitchSection"/>
145
public static Option<bool> IndentSwitchSection { get; } =
CSharpFormattingOptions2
.IndentSwitchSection.ToPublicOption();
147
/// <inheritdoc cref="
CSharpFormattingOptions2
.IndentSwitchCaseSection"/>
148
public static Option<bool> IndentSwitchCaseSection { get; } =
CSharpFormattingOptions2
.IndentSwitchCaseSection.ToPublicOption();
150
/// <inheritdoc cref="
CSharpFormattingOptions2
.IndentSwitchCaseSectionWhenBlock"/>
151
public static Option<bool> IndentSwitchCaseSectionWhenBlock { get; } =
CSharpFormattingOptions2
.IndentSwitchCaseSectionWhenBlock.ToPublicOption();
153
/// <inheritdoc cref="
CSharpFormattingOptions2
.LabelPositioning"/>
154
public static Option<LabelPositionOptions> LabelPositioning { get; } =
CSharpFormattingOptions2
.LabelPositioning.ToPublicOption();
156
/// <inheritdoc cref="
CSharpFormattingOptions2
.WrappingPreserveSingleLine"/>
157
public static Option<bool> WrappingPreserveSingleLine { get; } =
CSharpFormattingOptions2
.WrappingPreserveSingleLine.ToPublicOption();
159
/// <inheritdoc cref="
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine"/>
160
public static Option<bool> WrappingKeepStatementsOnSingleLine { get; } =
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine.ToPublicOption();
172
/// <inheritdoc cref="
CSharpFormattingOptions2
.NewLineForElse"/>
173
public static Option<bool> NewLineForElse { get; } =
CSharpFormattingOptions2
.NewLineForElse.ToPublicOption();
175
/// <inheritdoc cref="
CSharpFormattingOptions2
.NewLineForCatch"/>
176
public static Option<bool> NewLineForCatch { get; } =
CSharpFormattingOptions2
.NewLineForCatch.ToPublicOption();
178
/// <inheritdoc cref="
CSharpFormattingOptions2
.NewLineForFinally"/>
179
public static Option<bool> NewLineForFinally { get; } =
CSharpFormattingOptions2
.NewLineForFinally.ToPublicOption();
181
/// <inheritdoc cref="
CSharpFormattingOptions2
.NewLineForMembersInObjectInit"/>
182
public static Option<bool> NewLineForMembersInObjectInit { get; } =
CSharpFormattingOptions2
.NewLineForMembersInObjectInit.ToPublicOption();
184
/// <inheritdoc cref="
CSharpFormattingOptions2
.NewLineForMembersInAnonymousTypes"/>
185
public static Option<bool> NewLineForMembersInAnonymousTypes { get; } =
CSharpFormattingOptions2
.NewLineForMembersInAnonymousTypes.ToPublicOption();
187
/// <inheritdoc cref="
CSharpFormattingOptions2
.NewLineForClausesInQuery"/>
188
public static Option<bool> NewLineForClausesInQuery { get; } =
CSharpFormattingOptions2
.NewLineForClausesInQuery.ToPublicOption();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpSyntaxFormattingOptions.cs (38)
74
(options.GetOption(
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration) ? SpacePlacement.IgnoreAroundVariableDeclaration : 0) |
75
(options.GetOption(
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName) ? SpacePlacement.AfterMethodDeclarationName : 0) |
76
(options.GetOption(
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodDeclarationParentheses) ? SpacePlacement.BetweenEmptyMethodDeclarationParentheses : 0) |
77
(options.GetOption(
CSharpFormattingOptions2
.SpaceWithinMethodDeclarationParenthesis) ? SpacePlacement.WithinMethodDeclarationParenthesis : 0) |
78
(options.GetOption(
CSharpFormattingOptions2
.SpaceAfterMethodCallName) ? SpacePlacement.AfterMethodCallName : 0) |
79
(options.GetOption(
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodCallParentheses) ? SpacePlacement.BetweenEmptyMethodCallParentheses : 0) |
80
(options.GetOption(
CSharpFormattingOptions2
.SpaceWithinMethodCallParentheses) ? SpacePlacement.WithinMethodCallParentheses : 0) |
81
(options.GetOption(
CSharpFormattingOptions2
.SpaceAfterControlFlowStatementKeyword) ? SpacePlacement.AfterControlFlowStatementKeyword : 0) |
82
options.GetOption(
CSharpFormattingOptions2
.SpaceBetweenParentheses).ToSpacePlacement() |
83
(options.GetOption(
CSharpFormattingOptions2
.SpaceBeforeSemicolonsInForStatement) ? SpacePlacement.BeforeSemicolonsInForStatement : 0) |
84
(options.GetOption(
CSharpFormattingOptions2
.SpaceAfterSemicolonsInForStatement) ? SpacePlacement.AfterSemicolonsInForStatement : 0) |
85
(options.GetOption(
CSharpFormattingOptions2
.SpaceAfterCast) ? SpacePlacement.AfterCast : 0) |
86
(options.GetOption(
CSharpFormattingOptions2
.SpaceBeforeOpenSquareBracket) ? SpacePlacement.BeforeOpenSquareBracket : 0) |
87
(options.GetOption(
CSharpFormattingOptions2
.SpaceBetweenEmptySquareBrackets) ? SpacePlacement.BetweenEmptySquareBrackets : 0) |
88
(options.GetOption(
CSharpFormattingOptions2
.SpaceWithinSquareBrackets) ? SpacePlacement.WithinSquareBrackets : 0) |
89
(options.GetOption(
CSharpFormattingOptions2
.SpaceAfterColonInBaseTypeDeclaration) ? SpacePlacement.AfterColonInBaseTypeDeclaration : 0) |
90
(options.GetOption(
CSharpFormattingOptions2
.SpaceBeforeColonInBaseTypeDeclaration) ? SpacePlacement.BeforeColonInBaseTypeDeclaration : 0) |
91
(options.GetOption(
CSharpFormattingOptions2
.SpaceAfterComma) ? SpacePlacement.AfterComma : 0) |
92
(options.GetOption(
CSharpFormattingOptions2
.SpaceBeforeComma) ? SpacePlacement.BeforeComma : 0) |
93
(options.GetOption(
CSharpFormattingOptions2
.SpaceAfterDot) ? SpacePlacement.AfterDot : 0) |
94
(options.GetOption(
CSharpFormattingOptions2
.SpaceBeforeDot) ? SpacePlacement.BeforeDot : 0);
95
SpacingAroundBinaryOperator = options.GetOption(
CSharpFormattingOptions2
.SpacingAroundBinaryOperator);
97
(options.GetOption(
CSharpFormattingOptions2
.NewLineForMembersInObjectInit) ? NewLinePlacement.BeforeMembersInObjectInitializers : 0) |
98
(options.GetOption(
CSharpFormattingOptions2
.NewLineForMembersInAnonymousTypes) ? NewLinePlacement.BeforeMembersInAnonymousTypes : 0) |
99
(options.GetOption(
CSharpFormattingOptions2
.NewLineForElse) ? NewLinePlacement.BeforeElse : 0) |
100
(options.GetOption(
CSharpFormattingOptions2
.NewLineForCatch) ? NewLinePlacement.BeforeCatch : 0) |
101
(options.GetOption(
CSharpFormattingOptions2
.NewLineForFinally) ? NewLinePlacement.BeforeFinally : 0) |
102
options.GetOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace).ToNewLinePlacement() |
103
(options.GetOption(
CSharpFormattingOptions2
.NewLineForClausesInQuery) ? NewLinePlacement.BetweenQueryExpressionClauses : 0);
104
LabelPositioning = options.GetOption(
CSharpFormattingOptions2
.LabelPositioning);
106
(options.GetOption(
CSharpFormattingOptions2
.IndentBraces) ? IndentationPlacement.Braces : 0) |
107
(options.GetOption(
CSharpFormattingOptions2
.IndentBlock) ? IndentationPlacement.BlockContents : 0) |
108
(options.GetOption(
CSharpFormattingOptions2
.IndentSwitchCaseSection) ? IndentationPlacement.SwitchCaseContents : 0) |
109
(options.GetOption(
CSharpFormattingOptions2
.IndentSwitchCaseSectionWhenBlock) ? IndentationPlacement.SwitchCaseContentsWhenBlock : 0) |
110
(options.GetOption(
CSharpFormattingOptions2
.IndentSwitchSection) ? IndentationPlacement.SwitchSection : 0);
111
WrappingKeepStatementsOnSingleLine = options.GetOption(
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine);
112
WrappingPreserveSingleLine = options.GetOption(
CSharpFormattingOptions2
.WrappingPreserveSingleLine);
115
CollectionExpressionWrappingLength = options.GetOption(
CSharpFormattingOptions2
.CollectionExpressionWrappingLength);