15 references to CollectionExpressionPreference
Microsoft.CodeAnalysis.Workspaces (15)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (3)
94
internal static readonly PerLanguageOption2<CodeStyleOption2<
CollectionExpressionPreference
>> PreferCollectionExpression = CreatePerLanguageOption(
97
defaultValue: new CodeStyleOption2<
CollectionExpressionPreference
>(
CollectionExpressionPreference
.WhenTypesLooselyMatch, NotificationOption2.Suggestion),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CollectionExpressionPreference.cs (12)
27
CodeStyleOption2<
CollectionExpressionPreference
> value,
28
CodeStyleOption2<
CollectionExpressionPreference
> defaultValue)
32
CollectionExpressionPreference
.Never => never,
33
CollectionExpressionPreference
.WhenTypesExactlyMatch => when_types_exactly_match,
40
public static Optional<CodeStyleOption2<
CollectionExpressionPreference
>> Parse(
41
string optionString, CodeStyleOption2<
CollectionExpressionPreference
> defaultValue)
48
case "false" or never: return new CodeStyleOption2<
CollectionExpressionPreference
>(
CollectionExpressionPreference
.Never, notification);
49
case "true" or when_types_exactly_match: return new CodeStyleOption2<
CollectionExpressionPreference
>(
CollectionExpressionPreference
.WhenTypesExactlyMatch, notification);
50
case when_types_loosely_match: return new CodeStyleOption2<
CollectionExpressionPreference
>(
CollectionExpressionPreference
.WhenTypesLooselyMatch, notification);