19 references to CollectionExpressionPreference
Microsoft.CodeAnalysis.CodeStyle (19)
src\Analyzers\Core\Analyzers\AnalyzerOptionsProvider.cs (1)
43public CodeStyleOption2<CollectionExpressionPreference> PreferCollectionExpression => GetOption(CodeStyleOptions2.PreferCollectionExpression);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (3)
140&& preferExpressionOption.Value == Shared.CodeStyle.CollectionExpressionPreference.Never 220if (preferExpressionOption.Value == CollectionExpressionPreference.Never) 234var allowSemanticsChange = preferExpressionOption.Value == CollectionExpressionPreference.WhenTypesLooselyMatch;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (3)
94internal static readonly PerLanguageOption2<CodeStyleOption2<CollectionExpressionPreference>> PreferCollectionExpression = CreatePerLanguageOption( 97defaultValue: new CodeStyleOption2<CollectionExpressionPreference>(CollectionExpressionPreference.WhenTypesLooselyMatch, NotificationOption2.Suggestion),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CollectionExpressionPreference.cs (12)
27CodeStyleOption2<CollectionExpressionPreference> value, 28CodeStyleOption2<CollectionExpressionPreference> defaultValue) 32CollectionExpressionPreference.Never => never, 33CollectionExpressionPreference.WhenTypesExactlyMatch => when_types_exactly_match, 40public static Optional<CodeStyleOption2<CollectionExpressionPreference>> Parse( 41string optionString, CodeStyleOption2<CollectionExpressionPreference> defaultValue) 48case "false" or never: return new CodeStyleOption2<CollectionExpressionPreference>(CollectionExpressionPreference.Never, notification); 49case "true" or when_types_exactly_match: return new CodeStyleOption2<CollectionExpressionPreference>(CollectionExpressionPreference.WhenTypesExactlyMatch, notification); 50case when_types_loosely_match: return new CodeStyleOption2<CollectionExpressionPreference>(CollectionExpressionPreference.WhenTypesLooselyMatch, notification);