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