76 references to CSharpFormattingOptions
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (47)
Options\OptionsTestHelpers.cs (47)
36
(
CSharpFormattingOptions
.IndentBlock, false),
37
(
CSharpFormattingOptions
.IndentBraces, true),
38
(
CSharpFormattingOptions
.IndentSwitchCaseSection, false),
39
(
CSharpFormattingOptions
.IndentSwitchCaseSectionWhenBlock, false),
40
(
CSharpFormattingOptions
.IndentSwitchSection, false),
41
(
CSharpFormattingOptions
.LabelPositioning, LabelPositionOptions.LeftMost),
42
(
CSharpFormattingOptions
.NewLineForCatch, false),
43
(
CSharpFormattingOptions
.NewLineForClausesInQuery, false),
44
(
CSharpFormattingOptions
.NewLineForElse, false),
45
(
CSharpFormattingOptions
.NewLineForFinally, false),
46
(
CSharpFormattingOptions
.NewLineForMembersInAnonymousTypes, false),
47
(
CSharpFormattingOptions
.NewLineForMembersInObjectInit, false),
48
(
CSharpFormattingOptions
.NewLinesForBracesInAccessors, false),
49
(
CSharpFormattingOptions
.NewLinesForBracesInAnonymousMethods, false),
50
(
CSharpFormattingOptions
.NewLinesForBracesInAnonymousTypes, false),
51
(
CSharpFormattingOptions
.NewLinesForBracesInControlBlocks, false),
52
(
CSharpFormattingOptions
.NewLinesForBracesInLambdaExpressionBody, false),
53
(
CSharpFormattingOptions
.NewLinesForBracesInMethods, false),
54
(
CSharpFormattingOptions
.NewLinesForBracesInObjectCollectionArrayInitializers, false),
55
(
CSharpFormattingOptions
.NewLinesForBracesInProperties, false),
56
(
CSharpFormattingOptions
.NewLinesForBracesInTypes, false),
57
(
CSharpFormattingOptions
.SpaceAfterCast, true),
58
(
CSharpFormattingOptions
.SpaceAfterColonInBaseTypeDeclaration, false),
59
(
CSharpFormattingOptions
.SpaceAfterComma, false),
60
(
CSharpFormattingOptions
.SpaceAfterControlFlowStatementKeyword, false),
61
(
CSharpFormattingOptions
.SpaceAfterDot, true),
62
(
CSharpFormattingOptions
.SpaceAfterMethodCallName, true),
63
(
CSharpFormattingOptions
.SpaceAfterSemicolonsInForStatement, false),
64
(
CSharpFormattingOptions
.SpaceBeforeColonInBaseTypeDeclaration, false),
65
(
CSharpFormattingOptions
.SpaceBeforeComma, true),
66
(
CSharpFormattingOptions
.SpaceBeforeDot, true),
67
(
CSharpFormattingOptions
.SpaceBeforeOpenSquareBracket, true),
68
(
CSharpFormattingOptions
.SpaceBeforeSemicolonsInForStatement, true),
69
(
CSharpFormattingOptions
.SpaceBetweenEmptyMethodCallParentheses, true),
70
(
CSharpFormattingOptions
.SpaceBetweenEmptyMethodDeclarationParentheses, true),
71
(
CSharpFormattingOptions
.SpaceBetweenEmptySquareBrackets, true),
72
(
CSharpFormattingOptions
.SpacesIgnoreAroundVariableDeclaration, true),
73
(
CSharpFormattingOptions
.SpaceWithinCastParentheses, true),
74
(
CSharpFormattingOptions
.SpaceWithinExpressionParentheses, true),
75
(
CSharpFormattingOptions
.SpaceWithinMethodCallParentheses, true),
76
(
CSharpFormattingOptions
.SpaceWithinMethodDeclarationParenthesis, true),
77
(
CSharpFormattingOptions
.SpaceWithinOtherParentheses, true),
78
(
CSharpFormattingOptions
.SpaceWithinSquareBrackets, true),
79
(
CSharpFormattingOptions
.SpacingAfterMethodDeclarationName, true),
80
(
CSharpFormattingOptions
.SpacingAroundBinaryOperator, BinaryOperatorSpacingOptions.Remove),
81
(
CSharpFormattingOptions
.WrappingKeepStatementsOnSingleLine, false),
82
(
CSharpFormattingOptions
.WrappingPreserveSingleLine, false));
Microsoft.CodeAnalysis.Workspaces.UnitTests (29)
Options\DocumentOptionSetTests.cs (26)
97
(
CSharpFormattingOptions
.NewLinesForBracesInTypes, NewLineBeforeOpenBracePlacement.Types),
98
(
CSharpFormattingOptions
.NewLinesForBracesInMethods, NewLineBeforeOpenBracePlacement.Methods),
99
(
CSharpFormattingOptions
.NewLinesForBracesInProperties, NewLineBeforeOpenBracePlacement.Properties),
100
(
CSharpFormattingOptions
.NewLinesForBracesInAccessors, NewLineBeforeOpenBracePlacement.Accessors),
101
(
CSharpFormattingOptions
.NewLinesForBracesInAnonymousMethods, NewLineBeforeOpenBracePlacement.AnonymousMethods),
102
(
CSharpFormattingOptions
.NewLinesForBracesInControlBlocks, NewLineBeforeOpenBracePlacement.ControlBlocks),
103
(
CSharpFormattingOptions
.NewLinesForBracesInAnonymousTypes, NewLineBeforeOpenBracePlacement.AnonymousTypes),
104
(
CSharpFormattingOptions
.NewLinesForBracesInObjectCollectionArrayInitializers, NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers),
105
(
CSharpFormattingOptions
.NewLinesForBracesInLambdaExpressionBody, NewLineBeforeOpenBracePlacement.LambdaExpressionBody),
123
.Add(new OptionKey(
CSharpFormattingOptions
.NewLinesForBracesInTypes), false)
124
.Add(new OptionKey(
CSharpFormattingOptions
.NewLinesForBracesInAccessors), true)
125
.Add(new OptionKey(
CSharpFormattingOptions
.NewLinesForBracesInAnonymousMethods), false));
134
Assert.True((bool?)set.GetOption(new OptionKey(
CSharpFormattingOptions
.NewLinesForBracesInTypes)));
135
Assert.True((bool?)set.GetOption(new OptionKey(
CSharpFormattingOptions
.NewLinesForBracesInMethods)));
136
Assert.False((bool?)set.GetOption(new OptionKey(
CSharpFormattingOptions
.NewLinesForBracesInAccessors)));
137
Assert.False((bool?)set.GetOption(new OptionKey(
CSharpFormattingOptions
.NewLinesForBracesInAnonymousMethods)));
138
Assert.False((bool?)set.GetOption(new OptionKey(
CSharpFormattingOptions
.NewLinesForBracesInProperties)));
140
var updatedSet = set.WithChangedOption(new OptionKey(
CSharpFormattingOptions
.NewLinesForBracesInProperties), true);
142
Assert.True((bool?)updatedSet.GetOption(new OptionKey(
CSharpFormattingOptions
.NewLinesForBracesInTypes)));
143
Assert.True((bool?)updatedSet.GetOption(new OptionKey(
CSharpFormattingOptions
.NewLinesForBracesInMethods)));
144
Assert.False((bool?)updatedSet.GetOption(new OptionKey(
CSharpFormattingOptions
.NewLinesForBracesInAccessors)));
145
Assert.False((bool?)updatedSet.GetOption(new OptionKey(
CSharpFormattingOptions
.NewLinesForBracesInAnonymousMethods)));
146
Assert.True((bool?)updatedSet.GetOption(new OptionKey(
CSharpFormattingOptions
.NewLinesForBracesInProperties)));
159
(
CSharpFormattingOptions
.SpaceWithinExpressionParentheses, SpacePlacementWithinParentheses.Expressions),
160
(
CSharpFormattingOptions
.SpaceWithinCastParentheses, SpacePlacementWithinParentheses.TypeCasts),
161
(
CSharpFormattingOptions
.SpaceWithinOtherParentheses, SpacePlacementWithinParentheses.ControlFlowStatements),
Options\OptionKeyTests.cs (3)
157
var option3 = new Option<bool>("CSharpFormattingOptions", "SpacingAfterMethodDeclarationName",
CSharpFormattingOptions
.SpacingAfterMethodDeclarationName.DefaultValue);
161
Assert.False(
CSharpFormattingOptions
.SpacingAfterMethodDeclarationName.Equals(option3));
162
Assert.False(option3.Equals(
CSharpFormattingOptions
.SpacingAfterMethodDeclarationName));