4 overrides of Properties
Microsoft.CodeAnalysis (4)
CommandLine\CommonCompiler.SuppressionDiagnostic.cs (1)
68public override ImmutableDictionary<string, string?> Properties => ImmutableDictionary<string, string?>.Empty;
Diagnostic\Diagnostic.DiagnosticWithProgrammaticSuppression.cs (1)
81public override ImmutableDictionary<string, string?> Properties
Diagnostic\Diagnostic_SimpleDiagnostic.cs (1)
140public override ImmutableDictionary<string, string?> Properties
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (1)
100public override ImmutableDictionary<string, string?> Properties => _properties;
124 references to Properties
Microsoft.CodeAnalysis (9)
CommandLine\SarifErrorLogger.cs (3)
93if (diagnostic.WarningLevel > 0 || diagnostic.Properties.Count > 0) 102if (diagnostic.Properties.Count > 0) 106foreach (var pair in diagnostic.Properties.OrderBy(x => x.Key, StringComparer.Ordinal))
Diagnostic\Diagnostic.cs (5)
61/// can convey more detailed information to the fixer. If null, <see cref="Properties"/> will return 108/// can convey more detailed information to the fixer. If null, <see cref="Properties"/> will return 136/// can convey more detailed information to the fixer. If null, <see cref="Properties"/> will return 190/// can convey more detailed information to the fixer. If null, <see cref="Properties"/> will return 240/// can convey more detailed information to the fixer. If null, <see cref="Properties"/> will return
Diagnostic\Diagnostic.DiagnosticWithProgrammaticSuppression.cs (1)
83get { return _originalUnsuppressedDiagnostic.Properties; }
Microsoft.CodeAnalysis.CodeStyle (6)
AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (4)
292if (diagnostic.Properties != null && 293diagnostic.Properties.TryGetValue(UnusedValuePreferenceKey, out var preferenceString)) 314return diagnostic.Properties.ContainsKey(IsUnusedLocalAssignmentKey); 320return diagnostic.Properties.ContainsKey(IsRemovableAssignmentKey);
DiagnosticHelper.cs (2)
33/// can convey more detailed information to the fixer. If null, <see cref="Diagnostic.Properties"/> will return 222/// can convey more detailed information to the fixer. If null, <see cref="Diagnostic.Properties"/> will return
Microsoft.CodeAnalysis.CodeStyle.Fixes (32)
AbstractAddAccessibilityModifiersCodeFixProvider.cs (1)
34var (title, key) = diagnostic.Properties.ContainsKey(AddAccessibilityModifiersConstants.ModifiersAdded)
AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (2)
46Debug.Assert(diagnostics.Select(diagnostic => diagnostic.Properties[MatchFolderAndNamespaceConstants.TargetNamespace]).Distinct().Count() == 1); 48var targetNamespace = diagnostics.First().Properties[MatchFolderAndNamespaceConstants.TargetNamespace];
AbstractForEachCastCodeFixProvider.cs (2)
32if (context.Diagnostics.First().Properties.ContainsKey(ForEachCastHelpers.IsFixable)) 41=> diagnostic.Properties.ContainsKey(ForEachCastHelpers.IsFixable);
AbstractPopulateSwitchCodeFixProvider.cs (3)
58var properties = diagnostic.Properties; 141var hasMissingCases = bool.Parse(diagnostic.Properties[PopulateSwitchStatementHelpers.MissingCases]!); 142var hasMissingDefaultCase = bool.Parse(diagnostic.Properties[PopulateSwitchStatementHelpers.MissingDefaultCase]!);
AbstractUseCompoundAssignmentCodeFixProvider.cs (2)
78if (diagnostic.Properties.ContainsKey(UseCompoundAssignmentUtilities.Increment)) 81if (diagnostic.Properties.ContainsKey(UseCompoundAssignmentUtilities.Decrement))
AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
48var (title, key) = context.Diagnostics.First().Properties.ContainsKey(UseConditionalExpressionHelpers.CanSimplifyName)
AbstractUseConditionalExpressionForReturnCodeFixProvider.cs (1)
38var (title, key) = context.Diagnostics.First().Properties.ContainsKey(UseConditionalExpressionHelpers.CanSimplifyName)
AbstractUseIsNullForReferenceEqualsCodeFixProvider.cs (4)
33=> diagnostic.Properties[UseIsNullConstants.Kind] == UseIsNullConstants.ReferenceEqualsKey; 40var negated = diagnostic.Properties.ContainsKey(UseIsNullConstants.Negated); 65var negate = diagnostic.Properties.ContainsKey(UseIsNullConstants.Negated); 66var isUnconstrainedGeneric = diagnostic.Properties.ContainsKey(UseIsNullConstants.UnconstrainedGeneric);
AbstractUseNullPropagationCodeFixProvider.cs (2)
109var whenPartIsNullable = diagnostic.Properties.ContainsKey(UseNullPropagationConstants.WhenPartIsNullable); 152var whenPartIsNullable = diagnostic.Properties.ContainsKey(UseNullPropagationConstants.WhenPartIsNullable);
AddRequiredParenthesesCodeFixProvider.cs (3)
32=> diagnostic.Properties.ContainsKey(AddRequiredParenthesesConstants.IncludeInFixAll) && 33diagnostic.Properties[AddRequiredParenthesesConstants.EquivalenceKey] == equivalenceKey; 42firstDiagnostic.Properties[AddRequiredParenthesesConstants.EquivalenceKey]!),
NamingStyleCodeFixProvider.cs (1)
52var serializedNamingStyle = diagnostic.Properties[nameof(NamingStyle)];
RemoveRedundantEqualityCodeFixProvider.cs (2)
62if (diagnostic.Properties[RedundantEqualityConstants.RedundantSide] == RedundantEqualityConstants.Right) 66else if (diagnostic.Properties[RedundantEqualityConstants.RedundantSide] == RedundantEqualityConstants.Left)
SimplifyConditionalCodeFixProvider.cs (5)
73if (diagnostic.Properties.ContainsKey(Negate)) 77if (diagnostic.Properties.ContainsKey(Or)) 79var right = diagnostic.Properties.ContainsKey(WhenTrue) ? whenTrue : whenFalse; 82else if (diagnostic.Properties.ContainsKey(And)) 84var right = diagnostic.Properties.ContainsKey(WhenTrue) ? whenTrue : whenFalse;
UpdateLegacySuppressionsCodeFixProvider.cs (2)
37if (diagnostic.Properties?.ContainsKey(AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.DocCommentIdKey) == true && 50var newDocCommentId = diagnostic.Properties[AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.DocCommentIdKey];
UseExplicitTupleNameCodeFixProvider.cs (1)
49var preferredName = diagnostic.Properties[nameof(UseExplicitTupleNameDiagnosticAnalyzer.ElementName)];
Microsoft.CodeAnalysis.CodeStyle.LegacyTestFramework.UnitTestUtilities (1)
AbstractCodeActionOrUserDiagnosticTest.cs (1)
503if (!diagnostic.Properties.TryGetValue(WellKnownDiagnosticTags.Unnecessary, out var additionalUnnecessaryLocationsString))
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
44=> diagnostic.Properties.ContainsKey(SafeKey);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (12)
ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
73var properties = diagnostic.Properties;
CSharpRemoveUnreachableCodeCodeFixProvider.cs (1)
54=> diagnostic.Properties.ContainsKey(CSharpRemoveUnreachableCodeDiagnosticAnalyzer.IsSubsequentSection);
CSharpUpgradeProjectCodeFixProvider.cs (1)
76if (diagnostic.Properties.TryGetValue(DiagnosticPropertyConstants.RequiredLanguageVersion, out var requiredVersion) &&
CSharpUseIsNullCheckForCastAndEqualityOperatorCodeFixProvider.cs (2)
39=> diagnostic.Properties[UseIsNullConstants.Kind] == UseIsNullConstants.CastAndEqualityKey; 46var negated = diagnostic.Properties.ContainsKey(UseIsNullConstants.Negated);
CSharpUseNameofInAttributeCodeFixProvider.cs (1)
51var name = diagnostic.Properties[CSharpUseNameofInAttributeDiagnosticAnalyzer.NameKey];
InvokeDelegateWithConditionalAccessCodeFixProvider.cs (3)
39=> !diagnostic.Properties.ContainsKey(WellKnownDiagnosticTags.Unnecessary); 63if (diagnostic.Properties[Constants.Kind] == Constants.VariableAndIfStatementForm) 69Debug.Assert(diagnostic.Properties[Constants.Kind] == Constants.SingleIfStatementForm);
UseExpressionBodyCodeFixProvider.cs (2)
39diagnostic.Properties.ContainsKey(UseExpressionBodyDiagnosticAnalyzer.FixesError); 85var useExpressionBody = diagnostic.Properties.ContainsKey(nameof(UseExpressionBody));
UseUtf8StringLiteralCodeFixProvider.cs (1)
103var operationLocationString = diagnostic.Properties[nameof(UseUtf8StringLiteralDiagnosticAnalyzer.ArrayCreationOperationLocation)];
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
RemoveUnnecessaryExpressionParenthesesTests.cs (1)
2894Assert.Equal("[1,2]", diagnostic.Properties[WellKnownDiagnosticTags.Unnecessary]);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
RemoveUnnecessaryExpressionParenthesesTests.cs (1)
2894Assert.Equal("[1,2]", diagnostic.Properties[WellKnownDiagnosticTags.Unnecessary]);
Microsoft.CodeAnalysis.CSharp.Features (13)
ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
73var properties = diagnostic.Properties;
CSharpRemoveUnreachableCodeCodeFixProvider.cs (1)
54=> diagnostic.Properties.ContainsKey(CSharpRemoveUnreachableCodeDiagnosticAnalyzer.IsSubsequentSection);
CSharpUpgradeProjectCodeFixProvider.cs (1)
76if (diagnostic.Properties.TryGetValue(DiagnosticPropertyConstants.RequiredLanguageVersion, out var requiredVersion) &&
CSharpUseIsNullCheckForCastAndEqualityOperatorCodeFixProvider.cs (2)
39=> diagnostic.Properties[UseIsNullConstants.Kind] == UseIsNullConstants.CastAndEqualityKey; 46var negated = diagnostic.Properties.ContainsKey(UseIsNullConstants.Negated);
CSharpUseNameofInAttributeCodeFixProvider.cs (1)
51var name = diagnostic.Properties[CSharpUseNameofInAttributeDiagnosticAnalyzer.NameKey];
CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
44=> diagnostic.Properties.ContainsKey(SafeKey);
InvokeDelegateWithConditionalAccessCodeFixProvider.cs (3)
39=> !diagnostic.Properties.ContainsKey(WellKnownDiagnosticTags.Unnecessary); 63if (diagnostic.Properties[Constants.Kind] == Constants.VariableAndIfStatementForm) 69Debug.Assert(diagnostic.Properties[Constants.Kind] == Constants.SingleIfStatementForm);
UseExpressionBodyCodeFixProvider.cs (2)
39diagnostic.Properties.ContainsKey(UseExpressionBodyDiagnosticAnalyzer.FixesError); 85var useExpressionBody = diagnostic.Properties.ContainsKey(nameof(UseExpressionBody));
UseUtf8StringLiteralCodeFixProvider.cs (1)
103var operationLocationString = diagnostic.Properties[nameof(UseUtf8StringLiteralDiagnosticAnalyzer.ArrayCreationOperationLocation)];
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (1)
CodeActions\AbstractCodeActionOrUserDiagnosticTest.cs (1)
503if (!diagnostic.Properties.TryGetValue(WellKnownDiagnosticTags.Unnecessary, out var additionalUnnecessaryLocationsString))
Microsoft.CodeAnalysis.Features (43)
AbstractAddAccessibilityModifiersCodeFixProvider.cs (1)
34var (title, key) = diagnostic.Properties.ContainsKey(AddAccessibilityModifiersConstants.ModifiersAdded)
AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (2)
46Debug.Assert(diagnostics.Select(diagnostic => diagnostic.Properties[MatchFolderAndNamespaceConstants.TargetNamespace]).Distinct().Count() == 1); 48var targetNamespace = diagnostics.First().Properties[MatchFolderAndNamespaceConstants.TargetNamespace];
AbstractForEachCastCodeFixProvider.cs (2)
32if (context.Diagnostics.First().Properties.ContainsKey(ForEachCastHelpers.IsFixable)) 41=> diagnostic.Properties.ContainsKey(ForEachCastHelpers.IsFixable);
AbstractPopulateSwitchCodeFixProvider.cs (3)
58var properties = diagnostic.Properties; 141var hasMissingCases = bool.Parse(diagnostic.Properties[PopulateSwitchStatementHelpers.MissingCases]!); 142var hasMissingDefaultCase = bool.Parse(diagnostic.Properties[PopulateSwitchStatementHelpers.MissingDefaultCase]!);
AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (4)
292if (diagnostic.Properties != null && 293diagnostic.Properties.TryGetValue(UnusedValuePreferenceKey, out var preferenceString)) 314return diagnostic.Properties.ContainsKey(IsUnusedLocalAssignmentKey); 320return diagnostic.Properties.ContainsKey(IsRemovableAssignmentKey);
AbstractUseCompoundAssignmentCodeFixProvider.cs (2)
78if (diagnostic.Properties.ContainsKey(UseCompoundAssignmentUtilities.Increment)) 81if (diagnostic.Properties.ContainsKey(UseCompoundAssignmentUtilities.Decrement))
AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
48var (title, key) = context.Diagnostics.First().Properties.ContainsKey(UseConditionalExpressionHelpers.CanSimplifyName)
AbstractUseConditionalExpressionForReturnCodeFixProvider.cs (1)
38var (title, key) = context.Diagnostics.First().Properties.ContainsKey(UseConditionalExpressionHelpers.CanSimplifyName)
AbstractUseIsNullForReferenceEqualsCodeFixProvider.cs (4)
33=> diagnostic.Properties[UseIsNullConstants.Kind] == UseIsNullConstants.ReferenceEqualsKey; 40var negated = diagnostic.Properties.ContainsKey(UseIsNullConstants.Negated); 65var negate = diagnostic.Properties.ContainsKey(UseIsNullConstants.Negated); 66var isUnconstrainedGeneric = diagnostic.Properties.ContainsKey(UseIsNullConstants.UnconstrainedGeneric);
AbstractUseNullPropagationCodeFixProvider.cs (2)
109var whenPartIsNullable = diagnostic.Properties.ContainsKey(UseNullPropagationConstants.WhenPartIsNullable); 152var whenPartIsNullable = diagnostic.Properties.ContainsKey(UseNullPropagationConstants.WhenPartIsNullable);
AddMissingReference\AbstractAddMissingReferenceCodeFixProvider.cs (1)
79var properties = diagnostic.Properties;
AddRequiredParenthesesCodeFixProvider.cs (3)
32=> diagnostic.Properties.ContainsKey(AddRequiredParenthesesConstants.IncludeInFixAll) && 33diagnostic.Properties[AddRequiredParenthesesConstants.EquivalenceKey] == equivalenceKey; 42firstDiagnostic.Properties[AddRequiredParenthesesConstants.EquivalenceKey]!),
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaBatchFixHelpers.cs (1)
86properties: diagnostic.Properties,
DiagnosticHelper.cs (2)
33/// can convey more detailed information to the fixer. If null, <see cref="Diagnostic.Properties"/> will return 222/// can convey more detailed information to the fixer. If null, <see cref="Diagnostic.Properties"/> will return
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDetectionCodeFixProvider.cs (1)
52var commentContents = diagnostic.Properties.ContainsKey(AbstractJsonDetectionAnalyzer.StrictKey)
NamingStyleCodeFixProvider.cs (1)
52var serializedNamingStyle = diagnostic.Properties[nameof(NamingStyle)];
PreferFrameworkType\PreferFrameworkTypeCodeFixProvider.cs (2)
34if (diagnostic.Properties.ContainsKey(PreferFrameworkTypeConstants.PreferFrameworkType)) 70=> diagnostic.Properties.ContainsKey(PreferFrameworkTypeConstants.PreferFrameworkType);
RemoveRedundantEqualityCodeFixProvider.cs (2)
62if (diagnostic.Properties[RedundantEqualityConstants.RedundantSide] == RedundantEqualityConstants.Right) 66else if (diagnostic.Properties[RedundantEqualityConstants.RedundantSide] == RedundantEqualityConstants.Left)
SimplifyConditionalCodeFixProvider.cs (5)
73if (diagnostic.Properties.ContainsKey(Negate)) 77if (diagnostic.Properties.ContainsKey(Or)) 79var right = diagnostic.Properties.ContainsKey(WhenTrue) ? whenTrue : whenFalse; 82else if (diagnostic.Properties.ContainsKey(And)) 84var right = diagnostic.Properties.ContainsKey(WhenTrue) ? whenTrue : whenFalse;
UpdateLegacySuppressionsCodeFixProvider.cs (2)
37if (diagnostic.Properties?.ContainsKey(AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.DocCommentIdKey) == true && 50var newDocCommentId = diagnostic.Properties[AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.DocCommentIdKey];
UseExplicitTupleNameCodeFixProvider.cs (1)
49var preferredName = diagnostic.Properties[nameof(UseExplicitTupleNameDiagnosticAnalyzer.ElementName)];
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (1)
RemoveUnnecessaryParenthesesTests.vb (1)
653Assert.Equal("[1,2]", diagnostic.Properties.Item(WellKnownDiagnosticTags.Unnecessary))
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (1)
RemoveUnnecessaryParenthesesTests.vb (1)
653Assert.Equal("[1,2]", diagnostic.Properties.Item(WellKnownDiagnosticTags.Unnecessary))
Microsoft.CodeAnalysis.Workspaces (2)
Diagnostics\DiagnosticData.cs (2)
262(additionalProperties == null) ? diagnostic.Properties : diagnostic.Properties.AddRange(additionalProperties),