57 references to DefaultValue
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (12)
AutomaticCompletion\AutomaticBraceCompletionTests.cs (12)
813
{ CSharpFormattingOptions2.NewLineBeforeOpenBrace, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) }
888
{ CSharpFormattingOptions2.NewLineBeforeOpenBrace, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) }
967
{ CSharpFormattingOptions2.NewLineBeforeOpenBrace, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) }
1031
{ CSharpFormattingOptions2.NewLineBeforeOpenBrace, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) }
1095
{ CSharpFormattingOptions2.NewLineBeforeOpenBrace, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) }
1437
{ CSharpFormattingOptions2.NewLineBeforeOpenBrace, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, bracesOnNewLine) }
1484
{ CSharpFormattingOptions2.NewLineBeforeOpenBrace, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, bracesOnNewLine) }
1531
{ CSharpFormattingOptions2.NewLineBeforeOpenBrace, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.Accessors, bracesOnNewLine) }
1578
{ CSharpFormattingOptions2.NewLineBeforeOpenBrace, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.AnonymousMethods, bracesOnNewLine) }
1625
{ CSharpFormattingOptions2.NewLineBeforeOpenBrace, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.AnonymousTypes, bracesOnNewLine) }
1673
{ CSharpFormattingOptions2.NewLineBeforeOpenBrace, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ControlBlocks, bracesOnNewLine) }
1727
{ CSharpFormattingOptions2.NewLineBeforeOpenBrace, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ControlBlocks, bracesOnNewLine) }
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (4)
Diagnostics\Configuration\ConfigureSeverity\VarForBuiltInTypesSeverityConfigurationTests.cs (2)
36
Assert.False(CSharpCodeStyleOptions.VarForBuiltInTypes.
DefaultValue
.Value);
37
Assert.Equal(NotificationOption2.Silent, CSharpCodeStyleOptions.VarForBuiltInTypes.
DefaultValue
.Notification);
ExtractMethod\ExtractLocalFunctionTests.cs (1)
154
""", CodeActionIndex, new TestParameters(options: Option(CSharpCodeStyleOptions.PreferStaticLocalFunction, CSharpCodeStyleOptions.PreferStaticLocalFunction.
DefaultValue
)));
src\Analyzers\CSharp\Tests\ConvertNamespace\ConvertToBlockScopedNamespaceAnalyzerTests.cs (1)
256
{ CSharpFormattingOptions2.NewLineBeforeOpenBrace, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
& ~NewLineBeforeOpenBracePlacement.Types },
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Formatting\CSharpFormattingOptions.cs (2)
22
defaultValue: CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
.HasFlag(flag),
32
defaultValue: CSharpFormattingOptions2.SpaceBetweenParentheses.
DefaultValue
.HasFlag(flag),
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (23)
Formatting\FormattingTests.cs (21)
1113
{ NewLineBeforeOpenBrace, NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) },
1196
{ NewLineBeforeOpenBrace, NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.LambdaExpressionBody, false) },
2362
{ NewLineBeforeOpenBrace, NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ControlBlocks, false) }
6891
{ SpaceBetweenParentheses, SpaceBetweenParentheses.
DefaultValue
.WithFlagValue( SpacePlacementWithinParentheses.ControlFlowStatements, true) },
8104
{ NewLineBeforeOpenBrace, NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ControlBlocks, false) }
8138
{ NewLineBeforeOpenBrace , NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ControlBlocks, false) }
9333
{ NewLineBeforeOpenBrace, NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ControlBlocks, false) }
9493
{ NewLineBeforeOpenBrace, NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.Properties, false) },
9535
{ NewLineBeforeOpenBrace, NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.Accessors, false) },
9577
{ NewLineBeforeOpenBrace, NewLineBeforeOpenBrace.
DefaultValue
10724
{ NewLineBeforeOpenBrace, NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) },
10790
{ NewLineBeforeOpenBrace, NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) },
10906
{ NewLineBeforeOpenBrace, NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) },
10946
{ NewLineBeforeOpenBrace, NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) },
10988
{ NewLineBeforeOpenBrace, NewLineBeforeOpenBrace.
DefaultValue
.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, option) },
12111
{ CSharpFormattingOptions2.SpaceBetweenParentheses, CSharpFormattingOptions2.SpaceBetweenParentheses.
DefaultValue
.WithFlagValue(SpacePlacementWithinParentheses.Expressions, true) }
12136
{ CSharpFormattingOptions2.SpaceBetweenParentheses, CSharpFormattingOptions2.SpaceBetweenParentheses.
DefaultValue
.WithFlagValue(SpacePlacementWithinParentheses.Expressions, false) }
12161
{ CSharpFormattingOptions2.SpaceBetweenParentheses, CSharpFormattingOptions2.SpaceBetweenParentheses.
DefaultValue
.WithFlagValue(SpacePlacementWithinParentheses.TypeCasts, true) }
12186
{ CSharpFormattingOptions2.SpaceBetweenParentheses, CSharpFormattingOptions2.SpaceBetweenParentheses.
DefaultValue
.WithFlagValue(SpacePlacementWithinParentheses.TypeCasts, false) }
12219
{ CSharpFormattingOptions2.SpaceBetweenParentheses, CSharpFormattingOptions2.SpaceBetweenParentheses.
DefaultValue
.WithFlagValue(SpacePlacementWithinParentheses.ControlFlowStatements, true) }
12252
{ CSharpFormattingOptions2.SpaceBetweenParentheses, CSharpFormattingOptions2.SpaceBetweenParentheses.
DefaultValue
.WithFlagValue(SpacePlacementWithinParentheses.ControlFlowStatements, false) }
Formatting\FormattingTests_Patterns.cs (2)
150
{ CSharpFormattingOptions2.SpaceBetweenParentheses, CSharpFormattingOptions2.SpaceBetweenParentheses.
DefaultValue
.WithFlagValue(SpacePlacementWithinParentheses.Expressions, spaceWithinExpressionParentheses) },
291
{ CSharpFormattingOptions2.SpaceBetweenParentheses, CSharpFormattingOptions2.SpaceBetweenParentheses.
DefaultValue
.WithFlagValue(SpacePlacementWithinParentheses.Expressions, spaceWithinExpressionParentheses) },
Microsoft.CodeAnalysis.Features (1)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
361
if (userExclusions == CodeStyleOptions2.RemoveUnnecessarySuppressionExclusions.
DefaultValue
)
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\IOptionReader.cs (2)
29
=> options.TryGetOption<T>(new OptionKey2(option), out var value) ? value : option.
DefaultValue
;
41
=> GetOptionValue(options, option, option.
DefaultValue
.Value);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
OptionsCollection.cs (1)
51
=> Add(option, value, option.
DefaultValue
.Notification);
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
Options\DocumentOptionSetTests.cs (2)
112
var newInternalValue = option.
DefaultValue
.WithFlagValue(flag, newValue);
168
var newInternalValue = option.
DefaultValue
.WithFlagValue(flag, newValue);
WorkspaceServiceTests\GlobalOptionServiceTests.cs (2)
290
var newValueCodeStyleOption2 = new CodeStyleOption2<bool>(!option2.
DefaultValue
.Value, option2.
DefaultValue
.Notification);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
Options\CSharpVisualStudioOptionStorageReadFallbacks.cs (2)
34
=> TryReadFlags(s_storages, (int)CSharpFormattingOptions2.SpaceBetweenParentheses.
DefaultValue
, readValue, out var intValue) ? (SpacePlacementWithinParentheses)intValue : default(Optional<object?>);
60
=> TryReadFlags(s_storages, (int)CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
, readValue, out var intValue) ? (NewLineBeforeOpenBracePlacement)intValue : default(Optional<object?>);
Roslyn.VisualStudio.Next.UnitTests (6)
Options\VisualStudioSettingsOptionPersisterTests.cs (2)
126
Assert.Equal(value, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
& ~NewLineBeforeOpenBracePlacement.AnonymousTypes);
139
Assert.Equal((optionKey, CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
& ~NewLineBeforeOpenBracePlacement.Methods), refreshedOptions.Single());
Options\VisualStudioStorageReadFallbackTests.cs (4)
34
CSharpFormattingOptions2.SpaceBetweenParentheses.
DefaultValue
& ~SpacePlacementWithinParentheses.Expressions);
39
CSharpFormattingOptions2.SpaceBetweenParentheses.
DefaultValue
| SpacePlacementWithinParentheses.Expressions);
58
CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
& ~NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers);
63
CSharpFormattingOptions2.NewLineBeforeOpenBrace.
DefaultValue
| NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers);