17 references to CodeStyleHelpers
Microsoft.CodeAnalysis.Workspaces (17)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (8)
184
if (
CodeStyleHelpers
.TryGetCodeStyleValueAndOptionalNotification(str, defaultValue.Notification, out var value, out var notification))
195
return $"{value}{
CodeStyleHelpers
.GetEditorConfigStringNotificationPart(option, defaultValue)}";
213
if (
CodeStyleHelpers
.TryGetCodeStyleValueAndOptionalNotification(str, defaultValue.Notification, out var value, out var notificationOpt))
224
return $"{s_accessibilityModifiersRequiredMap.GetKeyOrDefault(option.Value)}{
CodeStyleHelpers
.GetEditorConfigStringNotificationPart(option, defaultValue)}";
259
if (
CodeStyleHelpers
.TryGetCodeStyleValueAndOptionalNotification(str, defaultValue.Notification, out var value, out var notification))
271
return $"{value}{
CodeStyleHelpers
.GetEditorConfigStringNotificationPart(option, defaultValue)}";
311
if (
CodeStyleHelpers
.TryGetCodeStyleValueAndOptionalNotification(str, defaultValue.Notification, out var value, out var notification))
325
return $"{value}{
CodeStyleHelpers
.GetEditorConfigStringNotificationPart(option, defaultValue)}";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CollectionExpressionPreference.cs (2)
37
return $"{prefix}{
CodeStyleHelpers
.GetEditorConfigStringNotificationPart(value, defaultValue)}";
43
if (
CodeStyleHelpers
.TryGetCodeStyleValueAndOptionalNotification(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\OperatorPlacementWhenWrappingPreference.cs (1)
24
if (
CodeStyleHelpers
.TryGetCodeStyleValue(optionString, out var value))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (2)
49
CodeStyleHelpers
.GetUnusedValuePreferenceSerializer);
55
CodeStyleHelpers
.GetUnusedValuePreferenceSerializer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (4)
91
=> new(parseValue: str =>
CodeStyleHelpers
.TryParseBoolEditorConfigCodeStyleOption(str, defaultValue, out var result) ? result : new Optional<CodeStyleOption2<bool>>(),
92
serializeValue: value => (value.Value ? "true" : "false") +
CodeStyleHelpers
.GetEditorConfigStringNotificationPart(value, defaultValue));
95
=> new(parseValue: str =>
CodeStyleHelpers
.TryParseStringEditorConfigCodeStyleOption(str, defaultValue, out var result) ? result : new Optional<CodeStyleOption2<string>>(),
96
serializeValue: value => value.Value.ToLowerInvariant() +
CodeStyleHelpers
.GetEditorConfigStringNotificationPart(value, defaultValue));