Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit 0365658

Browse files
authored
Merge Dev into Master (#88)
* When adding packages to the package dimension, ensure distinct values * Fix sleep configuration for jobs (#69) * Add deployment scripts for HandlePackageEdits and ArchivePackages (#70) * add deployment scripts for v2 jobs * handlepackageedits missing instrumentationkey (#71) * Secret rotation logic for jobs v2 (#68) * Fix callback service response (#76) * DB support for unicode user agents (#79) * Fix ImportAzureCdnStatistics bugs: #3408, #3410 (#78) * Add FakeXrmEasy.365 package to translations list (#83) * gallery issue 3432 version2
1 parent 1ef0692 commit 0365658

65 files changed

Lines changed: 893 additions & 316 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/ArchivePackages/App.config

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
55
</startup>
66
<runtime>
77
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
88
<dependentAssembly>
9-
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
10-
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
9+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
10+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0"/>
1111
</dependentAssembly>
1212
<dependentAssembly>
13-
<assemblyIdentity name="Microsoft.Azure.KeyVault" publicKeyToken="31bf3856ad364e35" culture="neutral" />
14-
<bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0" />
13+
<assemblyIdentity name="Microsoft.Azure.KeyVault" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
14+
<bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0"/>
1515
</dependentAssembly>
1616
<dependentAssembly>
17-
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform" publicKeyToken="31bf3856ad364e35" culture="neutral" />
18-
<bindingRedirect oldVersion="0.0.0.0-3.13.4.878" newVersion="3.13.4.878" />
17+
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
18+
<bindingRedirect oldVersion="0.0.0.0-3.13.4.878" newVersion="3.13.4.878"/>
1919
</dependentAssembly>
2020
<dependentAssembly>
21-
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
22-
<bindingRedirect oldVersion="0.0.0.0-3.13.4.878" newVersion="3.13.4.878" />
21+
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
22+
<bindingRedirect oldVersion="0.0.0.0-3.13.4.878" newVersion="3.13.4.878"/>
2323
</dependentAssembly>
2424
<dependentAssembly>
25-
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
26-
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
25+
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
26+
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0"/>
2727
</dependentAssembly>
2828
<dependentAssembly>
29-
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
30-
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
29+
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
30+
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0"/>
3131
</dependentAssembly>
3232
<dependentAssembly>
33-
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
34-
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
33+
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
34+
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0"/>
3535
</dependentAssembly>
3636
</assemblyBinding>
3737
</runtime>
38-
</configuration>
38+
</configuration>

src/ArchivePackages/ArchivePackages.csproj

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>ArchivePackages</RootNamespace>
1111
<AssemblyName>ArchivePackages</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
15+
<NuGetPackageImportStamp>
16+
</NuGetPackageImportStamp>
1417
</PropertyGroup>
1518
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1619
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -33,7 +36,7 @@
3336
</PropertyGroup>
3437
<ItemGroup>
3538
<Reference Include="Dapper, Version=1.50.2.0, Culture=neutral, processorArchitecture=MSIL">
36-
<HintPath>..\..\packages\Dapper.1.50.2\lib\net45\Dapper.dll</HintPath>
39+
<HintPath>..\..\packages\Dapper.1.50.2\lib\net451\Dapper.dll</HintPath>
3740
<Private>True</Private>
3841
</Reference>
3942
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -52,6 +55,18 @@
5255
<HintPath>..\..\packages\Microsoft.Data.Services.Client.5.7.0\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
5356
<Private>True</Private>
5457
</Reference>
58+
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
59+
<HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
60+
<Private>True</Private>
61+
</Reference>
62+
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
63+
<HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
64+
<Private>True</Private>
65+
</Reference>
66+
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop, Version=1.0.168.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
67+
<HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
68+
<Private>True</Private>
69+
</Reference>
5570
<Reference Include="Microsoft.WindowsAzure.Configuration, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5671
<HintPath>..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.3.2.1\lib\net40\Microsoft.WindowsAzure.Configuration.dll</HintPath>
5772
<Private>True</Private>
@@ -66,6 +81,17 @@
6681
</Reference>
6782
<Reference Include="System" />
6883
<Reference Include="System.Core" />
84+
<Reference Include="System.Net" />
85+
<Reference Include="System.Net.Http" />
86+
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
87+
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
88+
<Private>True</Private>
89+
</Reference>
90+
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
91+
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
92+
<Private>True</Private>
93+
</Reference>
94+
<Reference Include="System.Net.Http.WebRequest" />
6995
<Reference Include="System.Spatial, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7096
<HintPath>..\..\packages\System.Spatial.5.7.0\lib\net40\System.Spatial.dll</HintPath>
7197
<Private>True</Private>
@@ -97,6 +123,13 @@
97123
<PropertyGroup>
98124
<PostBuildEvent>move /y App.config ArchivePackages.exe.config</PostBuildEvent>
99125
</PropertyGroup>
126+
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
127+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
128+
<PropertyGroup>
129+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
130+
</PropertyGroup>
131+
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
132+
</Target>
100133
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
101134
Other similar extension points exist, see Microsoft.Common.targets.
102135
<Target Name="BeforeBuild">

src/ArchivePackages/packages.config

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Dapper" version="1.50.2" targetFramework="net45" />
3+
<package id="Dapper" version="1.50.2" targetFramework="net452" />
44
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
5+
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net452" />
6+
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net452" />
7+
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net452" />
58
<package id="Microsoft.Data.Edm" version="5.7.0" targetFramework="net45" />
69
<package id="Microsoft.Data.OData" version="5.7.0" targetFramework="net45" />
710
<package id="Microsoft.Data.Services.Client" version="5.7.0" targetFramework="net45" />
11+
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net452" />
812
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.1" targetFramework="net45" />
913
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
1014
<package id="System.Spatial" version="5.7.0" targetFramework="net45" />

src/Gallery.CredentialExpiration/Scripts/Gallery.CredentialExpiration.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cd bin
99

1010
REM SmtpUri is expected to be of the format: smtps://username:password@host:port. Note that if username contains an "@", you need to URI encode it!
1111

12-
start /w gallery.credentialexpiration.exe -ConsoleLogOnly -VaultName "#{Deployment.Azure.KeyVault.VaultName}" -ClientId "#{Deployment.Azure.KeyVault.ClientId}" -CertificateThumbprint "#{Deployment.Azure.KeyVault.CertificateThumbprint}" -WhatIf #{Jobs.gallery.credentialexpiration.WhatIf} -WarnDaysBeforeExpiration #{Jobs.gallery.credentialexpiration.WarnDaysBeforeExpiration} -MailFrom "#{Jobs.gallery.credentialexpiration.MailFrom}" -GalleryBrand "#{Jobs.gallery.credentialexpiration.GalleryBrand}" -GalleryAccountUrl "#{Jobs.gallery.credentialexpiration.GalleryAccountUrl}" -SmtpUri "#{Jobs.gallery.credentialexpiration.SmtpUri}" -GalleryDatabase "#{Jobs.gallery.credentialexpiration.GalleryDatabase}" -InstrumentationKey "#{Jobs.gallery.credentialexpiration.InstrumentationKey}" -verbose true -interval #{Jobs.gallery.credentialexpiration.Interval}
12+
start /w gallery.credentialexpiration.exe -ConsoleLogOnly -VaultName "#{Deployment.Azure.KeyVault.VaultName}" -ClientId "#{Deployment.Azure.KeyVault.ClientId}" -CertificateThumbprint "#{Deployment.Azure.KeyVault.CertificateThumbprint}" -WhatIf #{Jobs.gallery.credentialexpiration.WhatIf} -WarnDaysBeforeExpiration #{Jobs.gallery.credentialexpiration.WarnDaysBeforeExpiration} -MailFrom "#{Jobs.gallery.credentialexpiration.MailFrom}" -GalleryBrand "#{Jobs.gallery.credentialexpiration.GalleryBrand}" -GalleryAccountUrl "#{Jobs.gallery.credentialexpiration.GalleryAccountUrl}" -SmtpUri "#{Jobs.gallery.credentialexpiration.SmtpUri}" -GalleryDatabase "#{Jobs.gallery.credentialexpiration.GalleryDatabase}" -InstrumentationKey "#{Jobs.gallery.credentialexpiration.InstrumentationKey}" -verbose true -Interval #{Jobs.gallery.credentialexpiration.Interval}
1313

1414
echo "Finished #{Jobs.gallery.credentialexpiration.Title}"
1515

src/HandlePackageEdits/HandlePackageEdits.csproj

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<AssemblyName>HandlePackageEdits</AssemblyName>
1212
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14+
<NuGetPackageImportStamp>
15+
</NuGetPackageImportStamp>
1416
</PropertyGroup>
1517
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1618
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -76,6 +78,18 @@
7678
<HintPath>..\..\packages\Microsoft.Extensions.Logging.Abstractions.1.0.0\lib\netstandard1.1\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
7779
<Private>True</Private>
7880
</Reference>
81+
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
82+
<HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
83+
<Private>True</Private>
84+
</Reference>
85+
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
86+
<HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
87+
<Private>True</Private>
88+
</Reference>
89+
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop, Version=1.0.168.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
90+
<HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
91+
<Private>True</Private>
92+
</Reference>
7993
<Reference Include="Microsoft.Web.XmlTransform, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
8094
<HintPath>..\..\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
8195
<Private>True</Private>
@@ -161,6 +175,17 @@
161175
<Reference Include="System.ComponentModel.DataAnnotations" />
162176
<Reference Include="System.Core" />
163177
<Reference Include="System.IO.Compression" />
178+
<Reference Include="System.Net" />
179+
<Reference Include="System.Net.Http" />
180+
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
181+
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
182+
<Private>True</Private>
183+
</Reference>
184+
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
185+
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
186+
<Private>True</Private>
187+
</Reference>
188+
<Reference Include="System.Net.Http.WebRequest" />
164189
<Reference Include="System.Spatial, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
165190
<HintPath>..\..\packages\System.Spatial.5.7.0\lib\net40\System.Spatial.dll</HintPath>
166191
<Private>True</Private>
@@ -189,6 +214,13 @@
189214
</ProjectReference>
190215
</ItemGroup>
191216
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
217+
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
218+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
219+
<PropertyGroup>
220+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
221+
</PropertyGroup>
222+
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
223+
</Target>
192224
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
193225
Other similar extension points exist, see Microsoft.Common.targets.
194226
<Target Name="BeforeBuild">

src/HandlePackageEdits/packages.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
<package id="EntityFramework" version="6.1.3" targetFramework="net452" />
55
<package id="Microsoft.ApplicationInsights" version="2.1.0" targetFramework="net452" />
66
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
7+
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net452" />
8+
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net452" />
9+
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net452" />
710
<package id="Microsoft.Data.Edm" version="5.7.0" targetFramework="net452" />
811
<package id="Microsoft.Data.OData" version="5.7.0" targetFramework="net452" />
912
<package id="Microsoft.Data.Services.Client" version="5.7.0" targetFramework="net452" />
1013
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="1.0.0" targetFramework="net452" />
1114
<package id="Microsoft.Extensions.Logging" version="1.0.0" targetFramework="net452" />
1215
<package id="Microsoft.Extensions.Logging.Abstractions" version="1.0.0" targetFramework="net452" />
16+
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net452" />
1317
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net45" />
1418
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.1" targetFramework="net452" />
1519
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />

src/NuGet.Jobs.Common/Configuration/JobArgumentNames.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public static class JobArgumentNames
108108
public const string ValidateCertificate = "ValidateCertificate";
109109
public const string StoreName = "StoreName";
110110
public const string StoreLocation = "StoreLocation";
111+
public const string RefreshIntervalSec = "RefreshIntervalSec";
111112

112113
// Arguments specific to e-mail
113114
public const string MailFrom = "MailFrom";

src/NuGet.Jobs.Common/Configuration/JobConfigurationManager.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
using System;
55
using System.Collections.Generic;
66
using System.Diagnostics;
7-
using System.Globalization;
87
using System.Linq;
8+
using NuGet.Services.Configuration;
99

1010
namespace NuGet.Jobs
1111
{
@@ -181,22 +181,15 @@ public static bool TryGetBoolArgument(IDictionary<string, string> jobArgsDiction
181181

182182
private static IDictionary<string, string> InjectSecrets(ISecretReaderFactory secretReaderFactory, Dictionary<string, string> argsDictionary)
183183
{
184-
var secretReader = secretReaderFactory.CreateSecterReader(argsDictionary);
184+
var secretReader = secretReaderFactory.CreateSecretReader(argsDictionary);
185185
var secretInjector = secretReaderFactory.CreateSecretInjector(secretReader);
186186

187187
if (secretReader == null)
188188
{
189189
throw new ApplicationException("Could not create a secret reader. Please check your configuration.");
190190
}
191191

192-
var argsWithSecrets = new Dictionary<string, string>();
193-
194-
foreach (var keyValuePair in argsDictionary)
195-
{
196-
argsWithSecrets[keyValuePair.Key] = secretInjector.InjectAsync(keyValuePair.Value).Result;
197-
}
198-
199-
return argsWithSecrets;
192+
return new SecretDictionary(secretInjector, argsDictionary);
200193
}
201194
}
202195
}

0 commit comments

Comments
 (0)