14 references to WithValue
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
EditorConfigSettings\Data\CodeStyleSettingsTest.cs (2)
81
var defaultCodeStyle = CodeStyleOption2<bool>.Default.
WithValue
(defaultValue);
93
var defaultCodeStyle = CodeStyleOption2<T>.Default.
WithValue
(defaultValue);
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
94
ICodeStyleOption2 ICodeStyleOption2.WithValue(object value) =>
WithValue
((T)value);
Microsoft.CodeAnalysis.Workspaces.UnitTests (11)
Options\CodeStyleOptionTests.cs (11)
15
Assert.Same(CodeStyleOption2.FalseWithSilentEnforcement.
WithValue
(true), CodeStyleOption2.TrueWithSilentEnforcement);
16
Assert.Same(CodeStyleOption2.TrueWithSilentEnforcement.
WithValue
(false), CodeStyleOption2.FalseWithSilentEnforcement);
18
Assert.Same(CodeStyleOption2.FalseWithSuggestionEnforcement.
WithValue
(true), CodeStyleOption2.TrueWithSuggestionEnforcement);
19
Assert.Same(CodeStyleOption2.TrueWithSuggestionEnforcement.
WithValue
(false), CodeStyleOption2.FalseWithSuggestionEnforcement);
26
Assert.Same(style.
WithValue
(1), style);
33
Assert.Equal(style.
WithValue
(ExpressionBodyPreference.WhenOnSingleLine), style);
40
Assert.Equal(style.
WithValue
("abc"), style);
47
new CodeStyleOption2<bool>(true, NotificationOption2.Error).
WithValue
(false),
55
new CodeStyleOption2<int>(1, NotificationOption2.Error).
WithValue
(2),
63
new CodeStyleOption2<ExpressionBodyPreference>(ExpressionBodyPreference.Never, NotificationOption2.Error).
WithValue
(ExpressionBodyPreference.WhenPossible),
71
new CodeStyleOption2<string>("abc", NotificationOption2.Error).
WithValue
("xyz"),