Skip to content

Commit

Permalink
Merge pull request #99 from ITfoxtec/development
Browse files Browse the repository at this point in the history
add LibrarySettings as service
  • Loading branch information
Revsgaard authored Dec 3, 2024
2 parents 32f3cdc + cd7bc3a commit 42d49ab
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/AspNetCoreApi1Sample/AspNetCoreApi1Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Version>1.4.1</Version>
<Version>1.4.2</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/AspNetCoreApi2Sample/AspNetCoreApi2Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Version>1.4.1</Version>
<Version>1.4.2</Version>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Version>1.4.1</Version>
<Version>1.4.2</Version>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/AspNetCoreSamlIdPSample/AspNetCoreSamlIdPSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Version>1.4.1</Version>
<Version>1.4.2</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/ExternalLoginApiSample/ExternalLoginApiSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Version>1.4.1</Version>
<Version>1.4.2</Version>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Extensions.Configuration;
using FoxIDs.SampleHelperLibrary.Models;
using Microsoft.Extensions.Configuration;

namespace Microsoft.Extensions.DependencyInjection
{
Expand All @@ -9,7 +10,10 @@ public static class ServiceCollectionExtensions
var settings = new T();
configuration.Bind(key, settings);
services.AddSingleton(settings);

if (settings is LibrarySettings librarySettings)
{
services.AddSingleton(librarySettings);
}
return settings;
}
}
Expand Down

0 comments on commit 42d49ab

Please sign in to comment.