3 implementations of GetSection
NuGet.Configuration (3)
Settings\ImmutableSettings.cs (1)
46public SettingSection? GetSection(string sectionName)
Settings\NullSettings.cs (1)
17public SettingSection? GetSection(string sectionName) => null;
Settings\Settings.cs (1)
46public SettingSection? GetSection(string sectionName)
42 references to GetSection
aspire (9)
DotNet\DotNetAppHostNuGetConfigMerger.cs (1)
169var inheritedMappings = inheritedSettings.GetSection(ConfigurationConstants.PackageSourceMapping)?.Items
NuGet\NuGetClient.cs (8)
819foreach (var source in settings.GetSection(ConfigurationConstants.PackageSources)?.Items.OfType<SourceItem>() ?? []) 856.GetSection(ConfigurationConstants.CredentialsSectionName)? 861.GetSection(ConfigurationConstants.ClientCertificates)? 1023var sourceSection = settings.GetSection(ConfigurationConstants.PackageSources); 1039settings.GetSection(ConfigurationConstants.DisabledPackageSources)?.Items.Any(static item => item is ClearItem) != true) 1056=> settings.GetSection(ConfigurationConstants.DisabledPackageSources)?.Items 1096.GetSection(ConfigurationConstants.Config)? 1111.GetSection(ConfigurationConstants.TrustedSigners)?
Aspire.Cli.Tests (4)
NuGet\BundleNuGetServiceTests.cs (3)
86ambientSettings.GetSection("packageSources")!.Items.OfType<global::NuGet.Configuration.SourceItem>().Single(source => source.Key == "private").AdditionalAttributes, 87previewSettings.GetSection("packageSources")!.Items.OfType<global::NuGet.Configuration.SourceItem>().Single(source => source.Key == "private").AdditionalAttributes); 88Assert.Equal("unchanged", previewSettings.GetSection("custom")!.Items.OfType<global::NuGet.Configuration.AddItem>().Single().Value);
NuGet\NuGetPackageOperationConfigurationTests.cs (1)
156var signer = Assert.Single(settings.GetSection("trustedSigners")!.Items.OfType<TrustedSignerItem>());
NuGet.CommandLine.XPlat (1)
Commands\ConfigCommands\ConfigRunners.cs (1)
182SettingSection sectionElement = settings.GetSection(ConfigurationConstants.Config);
NuGet.Configuration (26)
ClientCertificate\ClientCertificateProvider.cs (1)
58SettingSection? clientCertificatesSection = _settings.GetSection(ConfigurationConstants.ClientCertificates);
PackageSource\MinPublishAgeExceptionsProvider.cs (1)
102var sectionItems = _settings.GetSection(ConfigurationConstants.MinPublishAgeExceptions)?
PackageSource\PackageSourceProvider.cs (15)
116var packageSourcesSection = settings.GetSection(sectionName); 131var disabledSourcesSection = settings.GetSection(ConfigurationConstants.DisabledPackageSources); 351var credentialsSection = settings.GetSection(ConfigurationConstants.CredentialsSectionName); 472var packageSourcesSection = Settings.GetSection(ConfigurationConstants.PackageSources); 476var sourceCredentialsSection = Settings.GetSection(ConfigurationConstants.CredentialsSectionName); 577var disabledSourcesSection = Settings.GetSection(ConfigurationConstants.DisabledPackageSources); 622var disabledSourcesSection = Settings.GetSection(ConfigurationConstants.DisabledPackageSources); 629var credentialsSection = Settings.GetSection(ConfigurationConstants.CredentialsSectionName); 814var disabledSourcesSection = Settings.GetSection(ConfigurationConstants.DisabledPackageSources); 834var credentialsSection = Settings.GetSection(ConfigurationConstants.CredentialsSectionName); 876var sourceCredentialsSection = Settings.GetSection(ConfigurationConstants.CredentialsSectionName); 976SettingSection? sourcesSection = Settings.GetSection(sectionName); 1030var disabledSources = Settings.GetSection(ConfigurationConstants.DisabledPackageSources); 1045var activeSourceSection = Settings.GetSection(ConfigurationConstants.ActivePackageSourceSectionName); 1063var activePackageSourceSection = Settings.GetSection(ConfigurationConstants.ActivePackageSourceSectionName);
PackageSourceMapping\PackageSourceMappingProvider.cs (1)
38SettingSection? packageSourceMappingSection = _settings.GetSection(ConfigurationConstants.PackageSourceMapping);
Settings\ConfigurationDefaults.cs (2)
60IEnumerable<SourceItem>? sourceItems = _settingsManager.GetSection(sectionName)?.Items.OfType<SourceItem>(); 66var disabledPackageSources = _settingsManager.GetSection(ConfigurationConstants.DisabledPackageSources)?.Items.OfType<AddItem>() ?? Enumerable.Empty<AddItem>();
Settings\ImmutableSettings.cs (1)
48return _settings.GetSection(sectionName);
Utility\SettingsUtility.cs (5)
29var sectionElement = settings.GetSection(section); 52var sectionElement = settings.GetSection(section); 141var sectionElement = settings.GetSection(section); 357var fallbackFoldersSection = settings.GetSection(ConfigurationConstants.FallbackPackageFolders); 442var configSection = settings.GetSection(ConfigurationConstants.Config);
NuGet.Packaging (2)
Signing\TrustedSigners\TrustedSignersProvider.cs (2)
24var trustedSignersSection = _settings.GetSection(ConfigurationConstants.TrustedSigners); 77var trustedSignersSection = settings.GetSection(ConfigurationConstants.TrustedSigners);