22 references to SpacePlacementWithinParentheses
Microsoft.CodeAnalysis.CSharp.CodeStyle (22)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (6)
24
private static readonly BidirectionalMap<string,
SpacePlacementWithinParentheses
> s_spacingWithinParenthesisOptionsEditorConfigMap =
27
KeyValuePairUtil.Create("expressions",
SpacePlacementWithinParentheses
.Expressions),
28
KeyValuePairUtil.Create("type_casts",
SpacePlacementWithinParentheses
.TypeCasts),
29
KeyValuePairUtil.Create("control_flow_statements",
SpacePlacementWithinParentheses
.ControlFlowStatements),
108
public static Option2<
SpacePlacementWithinParentheses
> SpaceBetweenParentheses { get; } = CreateOption(
112
new EditorConfigValueSerializer<
SpacePlacementWithinParentheses
>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.Parsers.cs (5)
69
internal static
SpacePlacementWithinParentheses
ParseSpacingWithinParenthesesList(string list)
70
=> (
SpacePlacementWithinParentheses
)ParseEditorConfigFlags(list, static s => s_spacingWithinParenthesisOptionsEditorConfigMap.TryGetValue(s, out var v) ? (int)v : 0);
72
internal static string ToEditorConfigValue(
SpacePlacementWithinParentheses
value)
73
=> (value ==
SpacePlacementWithinParentheses
.None) ? "false" :
74
ToEditorConfigFlagList((int)value, static v => s_spacingWithinParenthesisOptionsEditorConfigMap[(
SpacePlacementWithinParentheses
)v]);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\SpacingWithinParentheses.cs (11)
21
public static
SpacePlacementWithinParentheses
ToSpacingWithinParentheses(this SpacePlacement placement)
22
=> (placement.HasFlag(SpacePlacement.WithinExpressionParentheses) ?
SpacePlacementWithinParentheses
.Expressions : 0) |
23
(placement.HasFlag(SpacePlacement.WithinCastParentheses) ?
SpacePlacementWithinParentheses
.TypeCasts : 0) |
24
(placement.HasFlag(SpacePlacement.WithinOtherParentheses) ?
SpacePlacementWithinParentheses
.ControlFlowStatements : 0);
26
public static SpacePlacement ToSpacePlacement(this
SpacePlacementWithinParentheses
placement)
27
=> (placement.HasFlag(
SpacePlacementWithinParentheses
.Expressions) ? SpacePlacement.WithinExpressionParentheses : 0) |
28
(placement.HasFlag(
SpacePlacementWithinParentheses
.TypeCasts) ? SpacePlacement.WithinCastParentheses : 0) |
29
(placement.HasFlag(
SpacePlacementWithinParentheses
.ControlFlowStatements) ? SpacePlacement.WithinOtherParentheses : 0);
31
public static
SpacePlacementWithinParentheses
WithFlagValue(this
SpacePlacementWithinParentheses
flags,
SpacePlacementWithinParentheses
flag, bool value)