21 overrides of TryGetValue
dotnet-format (1)
Utilities\EditorConfigOptions.cs (1)
18public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
GenerateDocumentationAndConfigFiles (2)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
24public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
35public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
24public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
Microsoft.CodeAnalysis.Analyzers (2)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
24public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
35public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
24public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
35public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
Microsoft.CodeAnalysis.CodeStyle (2)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
24public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
35public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
24public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
35public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
Microsoft.CodeAnalysis.Workspaces (3)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
24public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
35public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
Workspace\Solution\ProjectState.cs (1)
519public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
Microsoft.Gen.BuildMetadata.Unit.Tests (1)
GeneratorTests.cs (1)
152public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
GeneratorTests.cs (1)
195public override bool TryGetValue(string key, out string value)
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
GeneratorTests.cs (1)
245public override bool TryGetValue(string key, out string value)
Microsoft.Gen.MetricsReports.Unit.Tests (1)
GeneratorTests.cs (1)
185public override bool TryGetValue(string key, out string value)
Roslyn.Diagnostics.Analyzers (2)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
24public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
35public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
198 references to TryGetValue
dotnet-format (12)
Analyzers\AnalyzerOptionExtensions.cs (6)
75if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out var value) && 83if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 100|| (diagnosticCategory != null && analyzerConfigOptions.TryGetValue(GetCategoryBasedDotnetAnalyzerDiagnosticSeverityKey(diagnosticCategory), out _)) 101|| analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out _); 151if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 160if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) &&
Formatters\CharsetFormatter.cs (1)
72analyzerConfigOptions.TryGetValue("charset", out var charsetOption) &&
Formatters\EndOfLineFormatter.cs (1)
67analyzerConfigOptions.TryGetValue("end_of_line", out var endOfLineOption))
Formatters\FinalNewlineFormatter.cs (1)
27if (!analyzerConfigOptions.TryGetValue("insert_final_newline", out var insertFinalNewlineValue) ||
Formatters\OrganizeImportsFormatter.cs (2)
35if (!analyzerConfigOptions.TryGetValue("dotnet_sort_system_directives_first", out _) && 36!analyzerConfigOptions.TryGetValue("dotnet_separate_import_directive_groups", out _))
Utilities\GeneratedCodeUtilities.cs (1)
97if (options.TryGetValue("generated_code", out var optionValue) &&
GenerateDocumentationAndConfigFiles (16)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
166if (options.TryGetValue("generated_code", out string? optionValue) &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
80return _analyzerConfigOptions.TryGetValue(key, out valueString);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (2)
36=> _options.TryGetValue(key, out value) || _fallback?.TryGetValue(key, out value) == true;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (3)
36if (analyzerConfigOptions.TryGetValue(option.Definition.ConfigName, out var stringValue)) 60return analyzerConfigOptions.TryGetValue(EnableCodeStyleSeverityKey, out var value) 70return analyzerConfigOptions.TryGetValue(AnalysisLevelKey, out var value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (8)
101if (analyzerConfigOptions.TryGetValue(diagnosticKey, out var value) && 121if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 129if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 167if (analyzerConfigOptions.TryGetValue(diagnosticKey, out value) && 188if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 196if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 233if (analyzerOptions.TryGetValue(categoryBasedKey, out var value) && 241if (analyzerOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
ILLink.RoslynAnalyzer (1)
AnalyzerOptionsExtensions.cs (1)
16return options.AnalyzerConfigOptionsProvider.GlobalOptions.TryGetValue(
Microsoft.CodeAnalysis (3)
DiagnosticAnalyzer\AnalyzerOptionsExtensions.cs (2)
70if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out var value) && 82if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) &&
SourceGeneration\GeneratedCodeUtilities.cs (1)
166if (options.TryGetValue("generated_code", out string? optionValue) &&
Microsoft.CodeAnalysis.Analyzers (18)
MetaAnalyzers\CompilerExtensionStrictApiAnalyzer.cs (1)
67return !options.AnalyzerConfigOptionsProvider.GlobalOptions.TryGetValue(AssemblyReferenceValidationConfigurationKey, out var value)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
166if (options.TryGetValue("generated_code", out string? optionValue) &&
src\roslyn\src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (1)
271options.TryGetValue(ExcludeGeneratedCodeOptionName, out var optionValue) &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
80return _analyzerConfigOptions.TryGetValue(key, out valueString);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (2)
36=> _options.TryGetValue(key, out value) || _fallback?.TryGetValue(key, out value) == true;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (3)
36if (analyzerConfigOptions.TryGetValue(option.Definition.ConfigName, out var stringValue)) 60return analyzerConfigOptions.TryGetValue(EnableCodeStyleSeverityKey, out var value) 70return analyzerConfigOptions.TryGetValue(AnalysisLevelKey, out var value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (8)
101if (analyzerConfigOptions.TryGetValue(diagnosticKey, out var value) && 121if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 129if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 167if (analyzerConfigOptions.TryGetValue(diagnosticKey, out value) && 188if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 196if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 233if (analyzerOptions.TryGetValue(categoryBasedKey, out var value) && 241if (analyzerOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
Microsoft.CodeAnalysis.AnalyzerUtilities (16)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
166if (options.TryGetValue("generated_code", out string? optionValue) &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
80return _analyzerConfigOptions.TryGetValue(key, out valueString);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (2)
36=> _options.TryGetValue(key, out value) || _fallback?.TryGetValue(key, out value) == true;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (3)
36if (analyzerConfigOptions.TryGetValue(option.Definition.ConfigName, out var stringValue)) 60return analyzerConfigOptions.TryGetValue(EnableCodeStyleSeverityKey, out var value) 70return analyzerConfigOptions.TryGetValue(AnalysisLevelKey, out var value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (8)
101if (analyzerConfigOptions.TryGetValue(diagnosticKey, out var value) && 121if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 129if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 167if (analyzerConfigOptions.TryGetValue(diagnosticKey, out value) && 188if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 196if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 233if (analyzerOptions.TryGetValue(categoryBasedKey, out var value) && 241if (analyzerOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
Microsoft.CodeAnalysis.CodeStyle (21)
src\roslyn\src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (4)
202var hasAllBulkSeverityConfiguration = treeOptions.TryGetValue(allDiagnosticsBulkSeverityKey, out var editorConfigBulkSeverity) 203|| globalOptions.TryGetValue(allDiagnosticsBulkSeverityKey, out editorConfigBulkSeverity); 226if (treeOptions.TryGetValue(categoryConfigurationKey, out var editorConfigSeverity) 227|| globalOptions.TryGetValue(categoryConfigurationKey, out editorConfigSeverity))
src\roslyn\src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (2)
61context.Options.AnalyzerConfigOptionsProvider.GlobalOptions.TryGetValue(MatchFolderAndNamespaceConstants.RootNamespaceOption, out var rootNamespace); 64if (!context.Options.AnalyzerConfigOptionsProvider.GlobalOptions.TryGetValue(MatchFolderAndNamespaceConstants.ProjectDirOption, out var projectDir)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
166if (options.TryGetValue("generated_code", out string? optionValue) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (2)
36=> _options.TryGetValue(key, out value) || _fallback?.TryGetValue(key, out value) == true;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (3)
36if (analyzerConfigOptions.TryGetValue(option.Definition.ConfigName, out var stringValue)) 60return analyzerConfigOptions.TryGetValue(EnableCodeStyleSeverityKey, out var value) 70return analyzerConfigOptions.TryGetValue(AnalysisLevelKey, out var value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (8)
101if (analyzerConfigOptions.TryGetValue(diagnosticKey, out var value) && 121if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 129if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 167if (analyzerConfigOptions.TryGetValue(diagnosticKey, out value) && 188if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 196if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 233if (analyzerOptions.TryGetValue(categoryBasedKey, out var value) && 241if (analyzerOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\Usage\CSharpMissingShebangInFileBasedProgram.cs (1)
83.TryGetValue("generated_code", out var generatedValue) &&
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Options\OmniSharpSolutionAnalyzerConfigOptionsUpdater.cs (1)
33if (csharpFallbackOptions.TryGetValue(oldKey, out var oldValue))
Microsoft.CodeAnalysis.Features (6)
src\roslyn\src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (4)
202var hasAllBulkSeverityConfiguration = treeOptions.TryGetValue(allDiagnosticsBulkSeverityKey, out var editorConfigBulkSeverity) 203|| globalOptions.TryGetValue(allDiagnosticsBulkSeverityKey, out editorConfigBulkSeverity); 226if (treeOptions.TryGetValue(categoryConfigurationKey, out var editorConfigSeverity) 227|| globalOptions.TryGetValue(categoryConfigurationKey, out editorConfigSeverity))
src\roslyn\src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (2)
61context.Options.AnalyzerConfigOptionsProvider.GlobalOptions.TryGetValue(MatchFolderAndNamespaceConstants.RootNamespaceOption, out var rootNamespace); 64if (!context.Options.AnalyzerConfigOptionsProvider.GlobalOptions.TryGetValue(MatchFolderAndNamespaceConstants.ProjectDirOption, out var projectDir)
Microsoft.CodeAnalysis.Razor.Compiler (9)
SourceGenerators\RazorSourceGenerator.RazorProviders.cs (9)
28globalOptions.TryGetValue("build_property.RazorConfiguration", out var configurationName); 29globalOptions.TryGetValue("build_property.RootNamespace", out var rootNamespace); 30globalOptions.TryGetValue("build_property.SupportLocalizedComponentNames", out var supportLocalizedComponentNames); 31globalOptions.TryGetValue("build_property.GenerateRazorMetadataSourceChecksumAttributes", out var generateMetadataSourceChecksumAttributes); 67if (!globalOptions.TryGetValue("build_property.RazorLangVersion", out var razorLanguageVersionString) || 83if (!globalOptions.TryGetValue("build_property.RazorWarningLevel", out var razorWarningLevelString)) 114var hasTargetPath = options.TryGetValue("build_metadata.AdditionalFiles.TargetPath", out var encodedRelativePath); 119else if (globalOptions.GlobalOptions.TryGetValue("build_property.MSBuildProjectDirectory", out var projectPath) && 146options.TryGetValue("build_metadata.AdditionalFiles.CssScope", out var cssScope);
Microsoft.CodeAnalysis.ResxSourceGenerator (29)
AbstractResxGenerator.cs (13)
77if (!optionsProvider.GlobalOptions.TryGetValue("build_property.RootNamespace", out var rootNamespace)) 84if (options.TryGetValue("build_metadata.AdditionalFiles.Link", out var link) && link.Length > 0) 95else if (options.TryGetValue("build_metadata.AdditionalFiles.RelativeDir", out var relativeDir) && !relativeDir.StartsWith("..", StringComparison.Ordinal) && !Path.IsPathRooted(relativeDir)) 124if (!options.TryGetValue("build_metadata.AdditionalFiles.ManifestResourceName", out var resourceName) || resourceName.Length == 0) 129if (!options.TryGetValue("build_metadata.AdditionalFiles.ClassName", out var resourceClassName) || resourceClassName.Length == 0) 134if (!options.TryGetValue("build_metadata.AdditionalFiles.OmitGetResourceString", out var omitGetResourceStringText) 140if (!options.TryGetValue("build_metadata.AdditionalFiles.AsConstants", out var asConstantsText) 146if (!options.TryGetValue("build_metadata.AdditionalFiles.IncludeDefaultValues", out var includeDefaultValuesText) 152if (!options.TryGetValue("build_metadata.AdditionalFiles.EmitFormatMethods", out var emitFormatMethodsText) 158if (!options.TryGetValue("build_metadata.AdditionalFiles.Public", out var publicText) 165if (options.TryGetValue("build_metadata.AdditionalFiles.NoWarn", out var noWarnText)) 260if (!options.TryGetValue("build_metadata.AdditionalFiles.GenerateSource", out var generateSourceText) 272if (!options.TryGetValue("build_metadata.AdditionalFiles.WithCulture", out var withCultureText)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
166if (options.TryGetValue("generated_code", out string? optionValue) &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
80return _analyzerConfigOptions.TryGetValue(key, out valueString);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (2)
36=> _options.TryGetValue(key, out value) || _fallback?.TryGetValue(key, out value) == true;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (3)
36if (analyzerConfigOptions.TryGetValue(option.Definition.ConfigName, out var stringValue)) 60return analyzerConfigOptions.TryGetValue(EnableCodeStyleSeverityKey, out var value) 70return analyzerConfigOptions.TryGetValue(AnalysisLevelKey, out var value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (8)
101if (analyzerConfigOptions.TryGetValue(diagnosticKey, out var value) && 121if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 129if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 167if (analyzerConfigOptions.TryGetValue(diagnosticKey, out value) && 188if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 196if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 233if (analyzerOptions.TryGetValue(categoryBasedKey, out var value) && 241if (analyzerOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
Microsoft.CodeAnalysis.Workspaces (17)
Options\DocumentOptionSet.cs (1)
80if (!_configOptions.TryGetValue(internallyDefinedOption.Definition.ConfigName, out var stringValue))
Serialization\SerializerService.cs (1)
184if (options.TryGetValue(key, out var value))
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
166if (options.TryGetValue("generated_code", out string? optionValue) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (2)
36=> _options.TryGetValue(key, out value) || _fallback?.TryGetValue(key, out value) == true;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (3)
36if (analyzerConfigOptions.TryGetValue(option.Definition.ConfigName, out var stringValue)) 60return analyzerConfigOptions.TryGetValue(EnableCodeStyleSeverityKey, out var value) 70return analyzerConfigOptions.TryGetValue(AnalysisLevelKey, out var value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (8)
101if (analyzerConfigOptions.TryGetValue(diagnosticKey, out var value) && 121if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 129if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 167if (analyzerConfigOptions.TryGetValue(diagnosticKey, out value) && 188if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 196if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 233if (analyzerOptions.TryGetValue(categoryBasedKey, out var value) && 241if (analyzerOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
Microsoft.Gen.BuildMetadata (3)
AnalyzerConfigOptionsExtensions.cs (1)
37return options.TryGetValue(key, out var value) ? value : null;
src\Generators\Shared\GeneratorUtilities.cs (2)
142_ = context.AnalyzerConfigOptions.GlobalOptions.TryGetValue(msBuildProperty, out var generateFiles); 148=> options.TryGetValue(name, out value) && !string.IsNullOrWhiteSpace(value);
Microsoft.Gen.ComplianceReports (2)
src\Generators\Shared\GeneratorUtilities.cs (2)
142_ = context.AnalyzerConfigOptions.GlobalOptions.TryGetValue(msBuildProperty, out var generateFiles); 148=> options.TryGetValue(name, out value) && !string.IsNullOrWhiteSpace(value);
Microsoft.Gen.ContextualOptions (2)
src\Generators\Shared\GeneratorUtilities.cs (2)
142_ = context.AnalyzerConfigOptions.GlobalOptions.TryGetValue(msBuildProperty, out var generateFiles); 148=> options.TryGetValue(name, out value) && !string.IsNullOrWhiteSpace(value);
Microsoft.Gen.Logging (2)
src\Generators\Shared\GeneratorUtilities.cs (2)
142_ = context.AnalyzerConfigOptions.GlobalOptions.TryGetValue(msBuildProperty, out var generateFiles); 148=> options.TryGetValue(name, out value) && !string.IsNullOrWhiteSpace(value);
Microsoft.Gen.MetadataExtractor (4)
MetadataReportsGenerator.cs (1)
131_ = context.AnalyzerConfigOptions.GlobalOptions.TryGetValue(RootNamespace, out var rootNamespace);
src\Generators\Microsoft.Gen.MetricsReports\MetricsReportsGenerator.cs (1)
75_ = options.TryGetValue(RootNamespace, out var rootNamespace);
src\Generators\Shared\GeneratorUtilities.cs (2)
142_ = context.AnalyzerConfigOptions.GlobalOptions.TryGetValue(msBuildProperty, out var generateFiles); 148=> options.TryGetValue(name, out value) && !string.IsNullOrWhiteSpace(value);
Microsoft.Gen.Metrics (2)
src\Generators\Shared\GeneratorUtilities.cs (2)
142_ = context.AnalyzerConfigOptions.GlobalOptions.TryGetValue(msBuildProperty, out var generateFiles); 148=> options.TryGetValue(name, out value) && !string.IsNullOrWhiteSpace(value);
Microsoft.Gen.MetricsReports (3)
MetricsReportsGenerator.cs (1)
75_ = options.TryGetValue(RootNamespace, out var rootNamespace);
src\Generators\Shared\GeneratorUtilities.cs (2)
142_ = context.AnalyzerConfigOptions.GlobalOptions.TryGetValue(msBuildProperty, out var generateFiles); 148=> options.TryGetValue(name, out value) && !string.IsNullOrWhiteSpace(value);
Microsoft.Interop.ComInterfaceGenerator (2)
Analyzers\ComHostingDoesNotSupportGeneratedComInterfaceAnalyzer.cs (1)
25if (!context.Options.AnalyzerConfigOptionsProvider.GlobalOptions.TryGetValue("build_property.EnableComHosting", out string? enableComHosting)
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (1)
133bool enableGeneratedComInterfaceComImportInterop = context.Options.AnalyzerConfigOptionsProvider.GlobalOptions.TryGetValue("build_property.EnableGeneratedComInterfaceComImportInterop", out string enableSourceGeneratedBuiltInInteropOption)
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\ConvertToLibraryImportFixer.cs (1)
651if (options.TryGetValue("dotnet_style_prefer_collection_expression", out string? preferCollectionExpressionsRule))
LibraryImportGeneratorOptions.cs (1)
22return options.TryGetValue(key, out string? value)
Microsoft.Maui.Controls.SourceGen (5)
CodeBehindGenerator.cs (5)
108 if (!fileOptions.TryGetValue("build_metadata.additionalfiles.GenKind", out string? kind) || kind is null) 113 fileOptions.TryGetValue("build_metadata.additionalfiles.TargetPath", out var targetPath); 114 fileOptions.TryGetValue("build_metadata.additionalfiles.ManifestResourceName", out var manifestResourceName); 115 fileOptions.TryGetValue("build_metadata.additionalfiles.RelativePath", out var relativePath); 116 fileOptions.TryGetValue("build_property.targetframework", out var targetFramework);
PlatformDocAnalyzer (3)
PlatformDocAnalyzer.cs (3)
83if (!options.TryGetValue("build_property.TargetFramework", out string? tfm) || 90if (!options.TryGetValue("build_property.UseCompilerGeneratedDocXmlFile", out string? useCompilerDoc) || 113if (!fileOptions.TryGetValue("build_metadata.AdditionalFiles.PlatformDocCanonical", out string? value) ||
Roslyn.Diagnostics.Analyzers (16)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
166if (options.TryGetValue("generated_code", out string? optionValue) &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
80return _analyzerConfigOptions.TryGetValue(key, out valueString);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (2)
36=> _options.TryGetValue(key, out value) || _fallback?.TryGetValue(key, out value) == true;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (3)
36if (analyzerConfigOptions.TryGetValue(option.Definition.ConfigName, out var stringValue)) 60return analyzerConfigOptions.TryGetValue(EnableCodeStyleSeverityKey, out var value) 70return analyzerConfigOptions.TryGetValue(AnalysisLevelKey, out var value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (8)
101if (analyzerConfigOptions.TryGetValue(diagnosticKey, out var value) && 121if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 129if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 167if (analyzerConfigOptions.TryGetValue(diagnosticKey, out value) && 188if (analyzerConfigOptions.TryGetValue(categoryBasedKey, out value) && 196if (analyzerConfigOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) && 233if (analyzerOptions.TryGetValue(categoryBasedKey, out var value) && 241if (analyzerOptions.TryGetValue(DotnetAnalyzerDiagnosticSeverityKey, out value) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
System.Private.CoreLib.Generators (1)
ProductVersionInfoGenerator.cs (1)
16options.GlobalOptions.TryGetValue("build_property.InformationalVersion", out string? ver) ? ver : null);
System.Windows.Forms.Analyzers (1)
System\Windows\Forms\Analyzers\AnalyzerConfigOptionsProviderExtensions.cs (1)
19return analyzerConfigOptions.GlobalOptions.TryGetValue($"build_property.{name}", out value);