38 references to NuGetSourceIdentity
aspire (11)
NuGet\BundleNuGetService.cs (3)
88
= static () => RandomNumberGenerator.GetBytes(
NuGetSourceIdentity
.KeySizeInBytes);
206
if (sourceIdentityKey.Length !=
NuGetSourceIdentity
.KeySizeInBytes)
209
$"The NuGet source identity key must be {
NuGetSourceIdentity
.KeySizeInBytes} bytes.");
NuGet\NuGetClient.cs (2)
720
.Where(
NuGetSourceIdentity
.HasCredentialMaterial)
1131
NuGetSourceIdentity
.Compute(source.Source, identityKey),
NuGet\NuGetConfigurationBuilder.cs (4)
19
.Select(mapping =>
NuGetSourceIdentity
.Compute(mapping.Source, settings.SourceIdentityKey))
20
.Append(
NuGetSourceIdentity
.Compute(PackageSources.NuGetOrg, settings.SourceIdentityKey))
169
var sourceIdentity =
NuGetSourceIdentity
.Compute(source, sourceIdentityKey);
443
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)
160
=>
NuGetSourceIdentity
.HasCredentialMaterial(source);
Aspire.Cli.Tests (27)
DotNet\DotNetAppHostNuGetConfigMergerTests.cs (4)
197
var sources = NuGetTestHelper.CreateClient().GetSettings(root.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]).Sources;
677
var sources = NuGetTestHelper.CreateClient().GetSettings(root.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]).Sources;
1191
appHostDirectory.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
1261
appHostDirectory.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
NuGet\BundleNuGetServiceTests.cs (3)
75
var key = new byte[
NuGetSourceIdentity
.KeySizeInBytes];
132
var previewSnapshot = client.GetSettings(preview.EffectiveWorkingDirectory.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
135
var persistedSnapshot = client.GetSettings(appHostDirectory.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
NuGet\NuGetClientTests.cs (6)
253
var snapshot = client.GetSettings(workspace.WorkspaceRoot.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
1436
Enumerable.Repeat((byte)0x5A,
NuGetSourceIdentity
.KeySizeInBytes).ToArray());
1472
new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
1502
Enumerable.Repeat((byte)0x5A,
NuGetSourceIdentity
.KeySizeInBytes).ToArray());
1519
var sourceIdentityKey = Enumerable.Repeat((byte)0x5A,
NuGetSourceIdentity
.KeySizeInBytes).ToArray();
1590
var settings = client.GetSettings(overlayDirectory.FullName, new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
NuGet\NuGetConfigurationTests.cs (2)
30
new("aspire-test-0",
NuGetSourceIdentity
.Compute(PackageSources.NuGetOrg, settings.SourceIdentityKey), isEnabled, true, false)
222
=> 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\PackageSourceIdentityTests.cs (2)
35
new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
60
new byte[
NuGetSourceIdentity
.KeySizeInBytes]);
Projects\PrebuiltAppHostServerTests.cs (4)
32
private static readonly byte[] s_sourceIdentityKey = new byte[
NuGetSourceIdentity
.KeySizeInBytes];
2358
NuGetSourceIdentity
.Compute(source, s_sourceIdentityKey),
5326
NuGetSourceIdentity
.Compute(source.Source, sourceIdentityKey),
5333
.Where(
NuGetSourceIdentity
.HasCredentialMaterial)
Projects\ProjectUpdaterNuGetConfigurationTests.cs (2)
879
expectedConfiguredSources.Select(source =>
NuGetSourceIdentity
.Compute(source, settings.SourceIdentityKey)).Order(),
883
var overrideIdentity =
NuGetSourceIdentity
.Compute(overrideSource, settings.SourceIdentityKey);
TestServices\NuGetTestHelper.cs (1)
90
var settings = new NuGetSettingsInfo([], "standalone", [], [], [], [], [], new byte[
NuGetSourceIdentity
.KeySizeInBytes]);