5 instantiations of SourceItem
aspire (1)
NuGet\NuGetClient.cs (1)
1006
var sourceItem = new
SourceItem
(source.Key, source.Source);
NuGet.Configuration (4)
PackageSource\PackageSource.cs (1)
220
return new
SourceItem
(Name, Source, protocolVersion, allowInsecureConnections, disableTLSCertificateValidation)
Settings\Items\SourceItem.cs (1)
105
var newSetting = new
SourceItem
(Key, Value, ProtocolVersion, AllowInsecureConnections, DisableTLSCertificateValidation)
Settings\NuGetConfiguration.cs (1)
45
var defaultSource = new
SourceItem
(NuGetConstants.FeedName, NuGetConstants.V3FeedUrl, protocolVersion: PackageSourceProvider.MaxSupportedProtocolVersion.ToString(CultureInfo.CurrentCulture));
Settings\SettingFactory.cs (1)
49
return new
SourceItem
(element, origin);
36 references to SourceItem
aspire (8)
DotNet\DotNetAppHostNuGetConfigMerger.cs (1)
174
var localSources = settings.GetSection(ConfigurationConstants.PackageSources)?.Items.OfType<
SourceItem
>().ToArray() ?? [];
NuGet\NuGetClient.cs (7)
882
foreach (
var
source in settings.GetSection(ConfigurationConstants.PackageSources)?.Items.OfType<
SourceItem
>() ?? [])
984
.OfType<
SourceItem
>()
986
foreach (
var
defaultSource in originalContent is null || configuration.ClearPackageSources ? defaultSources : [])
992
foreach (
var
source in defaultSources.Where(source =>
1006
var
sourceItem = new SourceItem(source.Key, source.Source);
1087
var survivingSourceKeys = (sourceSection?.Items.OfType<
SourceItem
>()
Aspire.Cli.Tests (2)
NuGet\BundleNuGetServiceTests.cs (2)
277
ambientSettings.GetSection("packageSources")!.Items.OfType<global::NuGet.Configuration.
SourceItem
>().Single(source => source.Key == "private").AdditionalAttributes,
278
previewSettings.GetSection("packageSources")!.Items.OfType<global::NuGet.Configuration.
SourceItem
>().Single(source => source.Key == "private").AdditionalAttributes);
NuGet.Configuration (26)
PackageSource\PackageSource.cs (1)
197
public
SourceItem
AsSourceItem()
PackageSource\PackageSourceProvider.cs (20)
117
var sourcesItems = packageSourcesSection?.Items.OfType<
SourceItem
>();
138
foreach (
var
setting in sources)
234
internal static PackageSource ReadPackageSource(
SourceItem
setting, bool isEnabled, ISettings settings, IEnvironmentVariableReader environmentVariableReader)
264
private static int ReadProtocolVersion(
SourceItem
setting)
274
private static bool ReadDisableTLSCertificateValidation(
SourceItem
setting)
284
private static bool ReadAllowInsecureConnections(
SourceItem
setting)
294
private static TimeSpan ReadMinPublishAge(
SourceItem
setting)
473
var sourcesSettings = packageSourcesSection?.Items.OfType<
SourceItem
>();
484
foreach (
var
source in sourcesToRemove)
534
if (settingsLookup.TryGetValue(name, out
var
sourceSetting))
612
packageSources.TryGetValue(source.Name, out
var
sourceToUpdate);
841
SourceItem
? existingSourceItem = null;
929
SourceItem
? existingSourceItem = null;
969
private Dictionary<string,
SourceItem
> GetExistingSettingsLookup()
974
private Dictionary<string,
SourceItem
> GetExistingSettingsLookup(string sectionName)
977
List<
SourceItem
>? existingSettings = sourcesSection?.Items.OfType<
SourceItem
>().Where(
981
var existingSettingsLookup = new Dictionary<string,
SourceItem
>(StringComparer.OrdinalIgnoreCase);
984
foreach (
var
setting in existingSettings)
986
if (existingSettingsLookup.TryGetValue(setting.Key, out
var
previouslyAddedSetting) &&
Settings\ConfigurationDefaults.cs (3)
60
IEnumerable<
SourceItem
>? sourceItems = _settingsManager.GetSection(sectionName)?.Items.OfType<
SourceItem
>();
69
foreach (
var
source in sourceItems)
Settings\Items\SourceItem.cs (1)
105
var
newSetting = new SourceItem(Key, Value, ProtocolVersion, AllowInsecureConnections, DisableTLSCertificateValidation)
Settings\NuGetConfiguration.cs (1)
45
var
defaultSource = new SourceItem(NuGetConstants.FeedName, NuGetConstants.V3FeedUrl, protocolVersion: PackageSourceProvider.MaxSupportedProtocolVersion.ToString(CultureInfo.CurrentCulture));