1 type derived from AddItem
NuGet.Configuration (1)
Settings\Items\SourceItem.cs (1)
8public sealed class SourceItem : AddItem
15 instantiations of AddItem
NuGet.Configuration (12)
PackageSource\PackageSourceProvider.cs (3)
512castSettings.AddOrUpdate(sourceSetting.Origin, ConfigurationConstants.DisabledPackageSources, new AddItem(name, "true")); 523Settings.AddOrUpdate(ConfigurationConstants.DisabledPackageSources, new AddItem(name, "true")); 1044new AddItem(source.Name, source.Source));
Settings\Items\AddItem.cs (1)
129var newItem = new AddItem(Key, Value, AdditionalAttributes);
Settings\Items\CredentialsItem.cs (5)
81_validAuthenticationTypes = new AddItem(ConfigurationConstants.ValidAuthenticationTypesToken, value); 127_username = new AddItem(ConfigurationConstants.UsernameToken, username); 130_password = new AddItem(passwordKey, password); 136_validAuthenticationTypes = new AddItem(ConfigurationConstants.ValidAuthenticationTypesToken, validAuthenticationTypes); 286_validAuthenticationTypes = new AddItem(ConfigurationConstants.ValidAuthenticationTypesToken, credentials.ValidAuthenticationTypes);
Settings\SettingFactory.cs (1)
71return new AddItem(element, origin);
Utility\SettingsUtility.cs (2)
184settings.AddOrUpdate(section, new AddItem(key, elementValue)); 226settings.AddOrUpdate(ConfigurationConstants.Config, new AddItem(key, value));
NuGet.PackageManagement (3)
PackageRestoreConsent.cs (2)
67_settings.AddOrUpdate(PackageRestoreSection, new AddItem(PackageRestoreConsentKey, value.ToString(CultureInfo.InvariantCulture))); 81_settings.AddOrUpdate(PackageRestoreSection, new AddItem(PackageRestoreAutomaticKey, value.ToString(CultureInfo.InvariantCulture)));
SourceControl\SourceControlUtility.cs (1)
23settings.AddOrUpdate(SolutionSection, new AddItem(DisableSourceControlIntegerationKey, "true"));
33 references to AddItem
NuGet.CommandLine.XPlat (2)
Commands\ConfigCommands\ConfigRunners.cs (2)
183AddItem item = sectionElement?.GetFirstItemWithAttribute<AddItem>(ConfigurationConstants.KeyAttribute, key);
NuGet.Configuration (31)
PackageSource\PackageSourceProvider.cs (14)
132var disabledSourcesSettings = disabledSourcesSection?.Items.OfType<AddItem>(); 550var disabledSourcesSettings = disabledSourcesSection?.Items.OfType<AddItem>(); 556foreach (var disabledSource in disableSourcesToRemove) 588AddItem? disabledSourceItem = null; 595disabledSourceItem = disabledSourcesSection?.GetFirstItemWithAttribute<AddItem>(ConfigurationConstants.KeyAttribute, sourceToUpdate.ElementName); 648AddItem? existingDisabledSourceItem, 785var existingDisabledSources = disabledSourcesSection?.Items.OfType<AddItem>(); 786Dictionary<string, AddItem>? existingDisabledSourcesLookup = null; 794AddItem duplicatedKey = existingDisabledSources! 810AddItem? existingDisabledSourceItem = null; 852if (existingDisabledSourcesLookup != null && existingDisabledSourcesLookup.TryGetValue(sourceItem.Value.Key, out var existingDisabledSourceItem)) 1001var value = disabledSources?.GetFirstItemWithAttribute<AddItem>(ConfigurationConstants.KeyAttribute, name); 1016return activeSourceSection?.Items.OfType<AddItem>().FirstOrDefault()?.Key;
Settings\ConfigurationDefaults.cs (2)
66var disabledPackageSources = _settingsManager.GetSection(ConfigurationConstants.DisabledPackageSources)?.Items.OfType<AddItem>() ?? Enumerable.Empty<AddItem>();
Settings\Items\AddItem.cs (3)
107var item = other as AddItem; 129var newItem = new AddItem(Key, Value, AdditionalAttributes);
Settings\Items\CredentialsItem.cs (5)
100internal readonly AddItem _username; 102internal readonly AddItem _password; 104internal AddItem? _validAuthenticationTypes { get; set; } 148var parsedItems = elementDescendants.Select(e => SettingFactory.Parse(e, origin)).OfType<AddItem>(); 150foreach (var item in parsedItems)
Utility\SettingsUtility.cs (7)
30var item = sectionElement?.GetFirstItemWithAttribute<AddItem>(ConfigurationConstants.KeyAttribute, key); 143var encryptedItem = sectionElement?.GetFirstItemWithAttribute<AddItem>(ConfigurationConstants.KeyAttribute, key); 335.OfType<AddItem>() 413var configSetting = configSection?.GetFirstItemWithAttribute<AddItem>(ConfigurationConstants.KeyAttribute, ConfigurationConstants.DefaultPushSource);