12 references to ForEachExplicitCastInSourcePreference
Microsoft.CodeAnalysis.CodeStyle (12)
AbstractForEachCastDiagnosticAnalyzer.cs (3)
67
Contract.ThrowIfFalse(option.Value is
ForEachExplicitCastInSourcePreference
.Always or
ForEachExplicitCastInSourcePreference
.WhenStronglyTyped);
115
if (option.Value ==
ForEachExplicitCastInSourcePreference
.WhenStronglyTyped &&
AnalyzerOptionsProvider.cs (1)
93
public CodeStyleOption2<
ForEachExplicitCastInSourcePreference
> ForEachExplicitCastInSource => GetOption(CodeStyleOptions2.ForEachExplicitCastInSource, FallbackCodeStyleOptions.ForEachExplicitCastInSource);
CodeStyleOptions2.cs (5)
285
private static readonly BidirectionalMap<string,
ForEachExplicitCastInSourcePreference
> s_forEachExplicitCastInSourcePreferencePreferenceMap =
288
KeyValuePairUtil.Create("always",
ForEachExplicitCastInSourcePreference
.Always),
289
KeyValuePairUtil.Create("when_strongly_typed",
ForEachExplicitCastInSourcePreference
.WhenStronglyTyped),
292
internal static readonly Option2<CodeStyleOption2<
ForEachExplicitCastInSourcePreference
>> ForEachExplicitCastInSource = CreateOption(
302
return new CodeStyleOption2<
ForEachExplicitCastInSourcePreference
>(
IdeCodeStyleOptions.cs (3)
25
private static readonly CodeStyleOption2<
ForEachExplicitCastInSourcePreference
> s_forEachExplicitCastInSourceNonLegacyPreference =
26
new(
ForEachExplicitCastInSourcePreference
.WhenStronglyTyped, NotificationOption2.Suggestion);
55
[DataMember] public CodeStyleOption2<
ForEachExplicitCastInSourcePreference
> ForEachExplicitCastInSource { get; init; } = s_forEachExplicitCastInSourceNonLegacyPreference;