17 references to CodeStyleHelpers
Microsoft.CodeAnalysis.Workspaces (17)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (8)
184if (CodeStyleHelpers.TryGetCodeStyleValueAndOptionalNotification(str, defaultValue.Notification, out var value, out var notification)) 195return $"{value}{CodeStyleHelpers.GetEditorConfigStringNotificationPart(option, defaultValue)}"; 213if (CodeStyleHelpers.TryGetCodeStyleValueAndOptionalNotification(str, defaultValue.Notification, out var value, out var notificationOpt)) 224return $"{s_accessibilityModifiersRequiredMap.GetKeyOrDefault(option.Value)}{CodeStyleHelpers.GetEditorConfigStringNotificationPart(option, defaultValue)}"; 259if (CodeStyleHelpers.TryGetCodeStyleValueAndOptionalNotification(str, defaultValue.Notification, out var value, out var notification)) 271return $"{value}{CodeStyleHelpers.GetEditorConfigStringNotificationPart(option, defaultValue)}"; 311if (CodeStyleHelpers.TryGetCodeStyleValueAndOptionalNotification(str, defaultValue.Notification, out var value, out var notification)) 325return $"{value}{CodeStyleHelpers.GetEditorConfigStringNotificationPart(option, defaultValue)}";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CollectionExpressionPreference.cs (2)
37return $"{prefix}{CodeStyleHelpers.GetEditorConfigStringNotificationPart(value, defaultValue)}"; 43if (CodeStyleHelpers.TryGetCodeStyleValueAndOptionalNotification(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\OperatorPlacementWhenWrappingPreference.cs (1)
24if (CodeStyleHelpers.TryGetCodeStyleValue(optionString, out var value))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (2)
49CodeStyleHelpers.GetUnusedValuePreferenceSerializer); 55CodeStyleHelpers.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>>(), 92serializeValue: 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>>(), 96serializeValue: value => value.Value.ToLowerInvariant() + CodeStyleHelpers.GetEditorConfigStringNotificationPart(value, defaultValue));