29 references to Key
NuGet.Configuration (29)
PackageSource\PackageSourceProvider.cs (18)
133
var disabledSources = new HashSet<string>(disabledSourcesSettings?.GroupBy(setting => setting.
Key
).Select(group => group.First().
Key
) ?? Enumerable.Empty<string>());
140
var name = setting.
Key
;
349
var name = setting.
Key
;
427
$"{setting.
Key
}:{ConfigurationConstants.MinPublishAgeHours}",
592
var sourcesToRemove = sourcesSettings?.Where(s => string.Equals(s.
Key
, name, StringComparison.OrdinalIgnoreCase));
693
var disableSourcesToRemove = disabledSourcesSettings?.Where(s => string.Equals(s.
Key
, name, StringComparison.OrdinalIgnoreCase));
736
disabledSourceItem = disabledSourcesSection?.GetFirstItemWithAttribute<AddItem>(ConfigurationConstants.KeyAttribute, sourceToUpdate.
Key
);
743
credentialsSettingsItem = credentialsSection?.Items.OfType<CredentialsItem>().FirstOrDefault(s => string.Equals(s.ElementName, sourceToUpdate.
Key
, StringComparison.OrdinalIgnoreCase));
933
existingDisabledSourcesLookup = existingDisabledSources?.ToDictionary(setting => setting.
Key
, StringComparer.OrdinalIgnoreCase);
938
.GroupBy(s => s.
Key
, StringComparer.OrdinalIgnoreCase)
943
string message = string.Format(CultureInfo.CurrentCulture, Resources.ShowError_ConfigDuplicateDisabledSources, duplicatedKey.
Key
, filePath);
995
if (existingDisabledSourcesLookup != null && existingDisabledSourcesLookup.TryGetValue(sourceItem.Value.
Key
, out var existingDisabledSourceItem))
1001
if (existingsourceCredentialsLookup != null && existingsourceCredentialsLookup.TryGetValue(sourceItem.Value.
Key
, out var existingSourceCredentialItem))
1099
if (existingSettingsLookup.TryGetValue(setting.
Key
, out var previouslyAddedSetting) &&
1103
existingSettingsLookup.Remove(setting.
Key
);
1106
existingSettingsLookup[setting.
Key
] = setting;
1159
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)
105
var newSetting = new SourceItem(
Key
, Value, ProtocolVersion, AllowInsecureConnections, DisableTLSCertificateValidation)