17 references to CodeStyleHelpers
Microsoft.CodeAnalysis.Workspaces (17)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (8)
183
if (
CodeStyleHelpers
.TryGetCodeStyleValueAndOptionalNotification(str, defaultValue.Notification, out var value, out var notification))
194
return $"{value}{
CodeStyleHelpers
.GetEditorConfigStringNotificationPart(option, defaultValue)}";
212
if (
CodeStyleHelpers
.TryGetCodeStyleValueAndOptionalNotification(str, defaultValue.Notification, out var value, out var notificationOpt))
223
return $"{s_accessibilityModifiersRequiredMap.GetKeyOrDefault(option.Value)}{
CodeStyleHelpers
.GetEditorConfigStringNotificationPart(option, defaultValue)}";
258
if (
CodeStyleHelpers
.TryGetCodeStyleValueAndOptionalNotification(str, defaultValue.Notification, out var value, out var notification))
270
return $"{value}{
CodeStyleHelpers
.GetEditorConfigStringNotificationPart(option, defaultValue)}";
310
if (
CodeStyleHelpers
.TryGetCodeStyleValueAndOptionalNotification(str, defaultValue.Notification, out var value, out var notification))
324
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)
92
=> new(parseValue: str =>
CodeStyleHelpers
.TryParseBoolEditorConfigCodeStyleOption(str, defaultValue, out var result) ? result : new Optional<CodeStyleOption2<bool>>(),
93
serializeValue: value => (value.Value ? "true" : "false") +
CodeStyleHelpers
.GetEditorConfigStringNotificationPart(value, defaultValue));
96
=> new(parseValue: str =>
CodeStyleHelpers
.TryParseStringEditorConfigCodeStyleOption(str, defaultValue, out var result) ? result : new Optional<CodeStyleOption2<string>>(),
97
serializeValue: value => value.Value.ToLowerInvariant() +
CodeStyleHelpers
.GetEditorConfigStringNotificationPart(value, defaultValue));