58 references to NuGetSourceIdentity
aspire (14)
DotNet\DotNetAppHostNuGetConfigBuilder.cs (1)
85
.Select(source =>
NuGetSourceIdentity
.Compute(source, settings.SourceIdentityKey))
DotNet\DotNetAppHostNuGetConfigMerger.cs (1)
222
NuGetSourceIdentity
.Compute(
NuGet\BundleNuGetService.cs (4)
92
= static () => RandomNumberGenerator.GetBytes(
NuGetSourceIdentity
.KeySizeInBytes);
218
if (sourceIdentityKey.Length !=
NuGetSourceIdentity
.KeySizeInBytes)
221
$"The NuGet source identity key must be {
NuGetSourceIdentity
.KeySizeInBytes} bytes.");
232
.Select(source =>
NuGetSourceIdentity
.Compute(source, sourceIdentityKey))
NuGet\NuGetClient.cs (2)
800
.Where(
NuGetSourceIdentity
.HasCredentialMaterial)
1211
NuGetSourceIdentity
.Compute(source.Source, identityKey),
NuGet\NuGetConfigurationBuilder.cs (4)
25
.Select(mapping =>
NuGetSourceIdentity
.Compute(mapping.Source, settings.SourceIdentityKey))
26
.Append(
NuGetSourceIdentity
.Compute(PackageSources.NuGetOrg, settings.SourceIdentityKey))
173
var sourceIdentity =
NuGetSourceIdentity
.Compute(source, sourceIdentityKey);
486
var identity =
NuGetSourceIdentity
.Compute(mapping.SourceKey, settings.SourceIdentityKey);
Packaging\PackageSourceIdentity.cs (1)
17
public static string Normalize(string source) =>
NuGetSourceIdentity
.Normalize(source);
Packaging\PackageSourceOverrideMappings.cs (1)
146
=>
NuGetSourceIdentity
.HasCredentialMaterial(source);
Aspire.Cli.Tests (44)
DotNet\DotNetAppHostNuGetConfigMergerTests.cs (6)
703
var sources = NuGetTestHelper.CreateClient().GetSettings(root.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]).Sources;
1240
var sources = NuGetTestHelper.CreateClient().GetSettings(root.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]).Sources;
1864
directory.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]).DisabledPackageSourceKeys);
2008
directory.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
2062
appHostDirectory.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
2134
appHostDirectory.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
NuGet\BundleNuGetServiceTests.cs (5)
83
var previewSettings = client.GetSettings(preview.EffectiveWorkingDirectory.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
96
var persisted = client.GetSettings(app.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
256
var key = new byte[
NuGetSourceIdentity
.KeySizeInBytes];
317
var previewSnapshot = client.GetSettings(preview.EffectiveWorkingDirectory.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
320
var persistedSnapshot = client.GetSettings(appHostDirectory.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
NuGet\NuGetClientTests.cs (6)
418
var snapshot = client.GetSettings(workspace.WorkspaceRoot.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
1603
Enumerable.Repeat((byte)0x5A,
NuGetSourceIdentity
.KeySizeInBytes).ToArray());
1639
new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
1669
Enumerable.Repeat((byte)0x5A,
NuGetSourceIdentity
.KeySizeInBytes).ToArray());
1686
var sourceIdentityKey = Enumerable.Repeat((byte)0x5A,
NuGetSourceIdentity
.KeySizeInBytes).ToArray();
1757
var settings = client.GetSettings(overlayDirectory.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
NuGet\NuGetConfigurationTests.cs (9)
177
new(previousKey,
NuGetSourceIdentity
.Compute(previousSource, settings.SourceIdentityKey),
217
new("company-feed",
NuGetSourceIdentity
.Compute(selectedSource, settings.SourceIdentityKey),
219
new("other",
NuGetSourceIdentity
.Compute(otherSource, settings.SourceIdentityKey), true, false, false)
239
var identity =
NuGetSourceIdentity
.Compute(source, settings.SourceIdentityKey);
332
new("aspire-test-0",
NuGetSourceIdentity
.Compute(PackageSources.NuGetOrg, settings.SourceIdentityKey), isEnabled, true, false)
496
new("company-public",
NuGetSourceIdentity
.Compute(PackageSources.NuGetOrg, settings.SourceIdentityKey),
532
new("aspire-test",
NuGetSourceIdentity
.Compute(channelSource, settings.SourceIdentityKey),
534
new("nuget.org",
NuGetSourceIdentity
.Compute(PackageSources.NuGetOrg, settings.SourceIdentityKey),
650
=> new([], "ambient", [], [], mappings, [], [], new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
NuGet\NuGetTestHelperTests.cs (3)
19
var snapshot = client.GetSettings(workspace.Path, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
26
Assert.Equal(
NuGetSourceIdentity
.Compute(PackageSources.NuGetOrg, snapshot.SourceIdentityKey), source.Identity);
65
var snapshot = client.GetSettings(appHostDirectory.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
Packaging\IntegrationSourceTests.cs (2)
97
.Select(
NuGetSourceIdentity
.Normalize).Order(StringComparer.Ordinal),
98
sources.Select(
NuGetSourceIdentity
.Normalize).Order(StringComparer.Ordinal));
Packaging\PackageSourceIdentityTests.cs (6)
28
workspace.Path, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
53
workspace.Path, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
75
workspace.Path, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
93
workspace.Path, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
125
new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
150
new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
Projects\PrebuiltAppHostServerTests.cs (4)
32
private static readonly byte[] s_sourceIdentityKey = new byte[
NuGetSourceIdentity
.KeySizeInBytes];
2478
NuGetSourceIdentity
.Compute(source, s_sourceIdentityKey),
5446
NuGetSourceIdentity
.Compute(source.Source, sourceIdentityKey),
5453
.Where(
NuGetSourceIdentity
.HasCredentialMaterial)
Projects\ProjectUpdaterNuGetConfigurationTests.cs (2)
891
expectedConfiguredSources.Select(source =>
NuGetSourceIdentity
.Compute(source, settings.SourceIdentityKey)).Order(),
895
var overrideIdentity =
NuGetSourceIdentity
.Compute(overrideSource, settings.SourceIdentityKey);
TestServices\NuGetTestHelper.cs (1)
93
var settings = new NuGetSettingsInfo([], "standalone", [], [], [], [], [], new byte[
NuGetSourceIdentity
.KeySizeInBytes]);