27 references to Key
NuGet.Configuration (27)
PackageSource\PackageSourceProvider.cs (16)
133
var disabledSources = new HashSet<string>(disabledSourcesSettings?.GroupBy(setting => setting.
Key
).Select(group => group.First().
Key
) ?? Enumerable.Empty<string>());
140
var name = setting.
Key
;
235
var name = setting.
Key
;
451
var sourcesToRemove = sourcesSettings?.Where(s => string.Equals(s.
Key
, name, StringComparison.OrdinalIgnoreCase));
552
var disableSourcesToRemove = disabledSourcesSettings?.Where(s => string.Equals(s.
Key
, name, StringComparison.OrdinalIgnoreCase));
602
credentialsSettingsItem = credentialsSection?.Items.OfType<CredentialsItem>().FirstOrDefault(s => string.Equals(s.ElementName, sourceToUpdate.
Key
, StringComparison.OrdinalIgnoreCase));
790
existingDisabledSourcesLookup = existingDisabledSources?.ToDictionary(setting => setting.
Key
, StringComparer.OrdinalIgnoreCase);
795
.GroupBy(s => s.
Key
, StringComparer.OrdinalIgnoreCase)
800
string message = string.Format(CultureInfo.CurrentCulture, Resources.ShowError_ConfigDuplicateDisabledSources, duplicatedKey.
Key
, filePath);
852
if (existingDisabledSourcesLookup != null && existingDisabledSourcesLookup.TryGetValue(sourceItem.Value.
Key
, out var existingDisabledSourceItem))
858
if (existingsourceCredentialsLookup != null && existingsourceCredentialsLookup.TryGetValue(sourceItem.Value.
Key
, out var existingSourceCredentialItem))
956
if (existingSettingsLookup.TryGetValue(setting.
Key
, out var previouslyAddedSetting) &&
960
existingSettingsLookup.Remove(setting.
Key
);
963
existingSettingsLookup[setting.
Key
] = setting;
1016
return activeSourceSection?.Items.OfType<AddItem>().FirstOrDefault()?.
Key
;
Settings\ConfigurationDefaults.cs (2)
71
bool isEnabled = !disabledPackageSources.Any(p => p.
Key
.Equals(source.
Key
, StringComparison.OrdinalIgnoreCase));
Settings\Items\AddItem.cs (4)
119
return string.Equals(
Key
, item.
Key
, StringComparison.Ordinal);
125
public sealed override int GetHashCode() =>
Key
.GetHashCode();
129
var newItem = new AddItem(
Key
, Value, AdditionalAttributes);
Settings\Items\CredentialsItem.cs (4)
152
if (string.Equals(item.
Key
, ConfigurationConstants.UsernameToken, StringComparison.OrdinalIgnoreCase))
161
else if (string.Equals(item.
Key
, ConfigurationConstants.PasswordToken, StringComparison.OrdinalIgnoreCase))
171
else if (string.Equals(item.
Key
, ConfigurationConstants.ClearTextPasswordToken, StringComparison.OrdinalIgnoreCase))
181
else if (string.Equals(item.
Key
, ConfigurationConstants.ValidAuthenticationTypesToken, StringComparison.OrdinalIgnoreCase))
Settings\Items\SourceItem.cs (1)
91
var newSetting = new SourceItem(
Key
, Value, ProtocolVersion, AllowInsecureConnections, DisableTLSCertificateValidation);