Skip to content

Commit d634694

Browse files
committed
Update packages, fix typos, and improve code formatting
Updated the `Microsoft.VisualStudio.Azure.Containers.Tools.Targets` package from version `1.20.1` to `1.21.0` in `Genocs.Core.Demo.Worker.csproj`. Updated the `SmartFormat.NET` package from version `3.4.0` to `3.5.0` in `Genocs.Logging.csproj`. Updated the `System.Linq.Dynamic.Core` package from version `1.4.3` to `1.4.4` in `Genocs.QueryBuilder.UnitTests.csproj`. Corrected a typo in the comment within `AzureKeyVaultOptions.cs` from "The vault Setting definition." to "The Azure Key Vault setting definition." Fixed indentation in the `AddAzureKeyVault` method within `Extensions.cs` to ensure proper formatting. Added a null or whitespace check for the `sectionName` parameter in the `UseAzureKeyVault` method within `Extensions.cs` and set it to `AzureKeyVaultOptions.Position` if it is null or whitespace.
1 parent 63533a2 commit d634694

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

src/Genocs.Core.Demo.Worker/Genocs.Core.Demo.Worker.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<ItemGroup>
2525
<PackageReference Include="MassTransit.Extensions.DependencyInjection" Version="7.3.1" />
2626
<PackageReference Include="MassTransit.RabbitMQ" Version="8.2.3" />
27-
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
27+
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
2828
<PackageReference Include="Serilog.Sinks.ApplicationInsights" Version="4.0.0" />
2929
</ItemGroup>
3030

src/Genocs.Logging/Genocs.Logging.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
</ItemGroup>
6161

6262
<ItemGroup>
63-
<PackageReference Include="SmartFormat.NET" Version="3.4.0" />
63+
<PackageReference Include="SmartFormat.NET" Version="3.5.0" />
6464
</ItemGroup>
6565

6666
</Project>

src/Genocs.QueryBuilder.UnitTests/Genocs.QueryBuilder.UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</PackageReference>
1414
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
1515
<PackageReference Include="Moq" Version="4.20.70" />
16-
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.3" />
16+
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.4" />
1717
<PackageReference Include="xunit" Version="2.9.0" />
1818
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
1919
<PrivateAssets>all</PrivateAssets>

src/Genocs.Secrets.AzureKeyVault/Configurations/AzureKeyVaultOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace Genocs.Secrets.AzureKeyVault.Configurations;
22

33
/// <summary>
4-
/// The vault Setting definition.
4+
/// The Azure Kay Vault setting definition.
55
/// </summary>
66
public class AzureKeyVaultOptions
77
{

src/Genocs.Secrets.AzureKeyVault/Extensions.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ public static IHostBuilder UseAzureKeyVault(
3838
}
3939

4040
cfg.AddAzureKeyVault(
41-
new Uri($"https://{settings.Name}.vault.azure.net/"),
42-
new DefaultAzureCredential(new DefaultAzureCredentialOptions
43-
{
44-
ManagedIdentityClientId = settings.ManagedIdentityId
45-
}));
41+
new Uri($"https://{settings.Name}.vault.azure.net/"),
42+
new DefaultAzureCredential(new DefaultAzureCredentialOptions
43+
{
44+
ManagedIdentityClientId = settings.ManagedIdentityId
45+
}));
4646
});
4747

4848
/// <summary>
@@ -56,6 +56,11 @@ public static IWebHostBuilder UseAzureKeyVault(
5656
string sectionName = AzureKeyVaultOptions.Position)
5757
=> builder.ConfigureAppConfiguration((ctx, cfg) =>
5858
{
59+
if (string.IsNullOrWhiteSpace(sectionName))
60+
{
61+
sectionName = AzureKeyVaultOptions.Position;
62+
}
63+
5964
AzureKeyVaultOptions settings = ctx.Configuration.GetOptions<AzureKeyVaultOptions>(sectionName);
6065
if (!settings.Enabled)
6166
{

0 commit comments

Comments
 (0)