Skip to content

Commit

Permalink
Updated to .NET8, removed older frameworks
Browse files Browse the repository at this point in the history
Updated code to use RapidApi and reflect some minor changes to the entry response
Removed separate projects for DI registration, assuming that default Microsoft DI is used
  • Loading branch information
HannoZ committed Apr 8, 2024
1 parent b833323 commit 8c4eb21
Show file tree
Hide file tree
Showing 45 changed files with 1,541 additions and 798 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,4 @@ MigrationBackup/

/source/Lexicala.NET.ConsoleApp/appsettings.json
/source/Lexicala.NET.ConsoleApp.NET472/App.config
/source/Visual Studio 2022/Visualizers
41 changes: 0 additions & 41 deletions source/Lexicala.NET.Autofac/DependencyRegistration.cs

This file was deleted.

27 changes: 0 additions & 27 deletions source/Lexicala.NET.Autofac/Lexicala.NET.Autofac.csproj

This file was deleted.

This file was deleted.

118 changes: 0 additions & 118 deletions source/Lexicala.NET.ConsoleApp.NET472/Program.cs

This file was deleted.

11 changes: 6 additions & 5 deletions source/Lexicala.NET.ConsoleApp/Lexicala.NET.ConsoleApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<UserSecretsId>83e2368c-8e8a-4e8e-9f3d-c00d575b6393</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Lexicala.NET.MicrosoftDependencyInjection\Lexicala.NET.MicrosoftDependencyInjection.csproj" />
<ProjectReference Include="..\Lexicala.NET\Lexicala.NET.csproj" />
</ItemGroup>

Expand Down
7 changes: 4 additions & 3 deletions source/Lexicala.NET.ConsoleApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Threading.Tasks;
using Lexicala.NET.MicrosoftDependencyInjection;
using Lexicala.NET.Request;
using Microsoft.Extensions.Logging;

namespace Lexicala.NET.ConsoleApp
{
Expand All @@ -16,11 +16,11 @@ public static async Task Main(string[] args)
{
IConfiguration configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddEnvironmentVariables()
.AddCommandLine(args)
// add your own user name and password to the user secrets store
.AddUserSecrets<Program>()
.Build();


try
{
RegisterServices(configuration);
Expand Down Expand Up @@ -97,6 +97,7 @@ private static void RegisterServices(IConfiguration configuration)
{
IServiceCollection services = new ServiceCollection();
services.RegisterLexicala(configuration);
services.AddLogging(cfg => cfg.AddConsole());

_serviceProvider = services.BuildServiceProvider(true);
}
Expand Down

This file was deleted.

18 changes: 10 additions & 8 deletions source/Lexicala.NET.Tests/Lexicala.NET.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -15,6 +15,7 @@
<None Remove="Resources\Entry_RDE00032314_1.json" />
<None Remove="Resources\ES_DE00008087.json" />
<None Remove="Resources\ES_DE00008088.json" />
<None Remove="Resources\ES_DE00010530.json" />
<None Remove="Resources\ES_DE00019850.json" />
<None Remove="Resources\languages.json" />
<None Remove="Resources\me.json" />
Expand All @@ -35,6 +36,7 @@
<EmbeddedResource Include="Resources\Entry_ES_DE00008087.json" />
<EmbeddedResource Include="Resources\Entry_ES_DE00008088.json" />
<EmbeddedResource Include="Resources\ES_DE00008087.json" />
<EmbeddedResource Include="Resources\ES_DE00010530.json" />
<EmbeddedResource Include="Resources\ES_DE00019850.json" />
<EmbeddedResource Include="Resources\ES_DE00008088.json" />
<EmbeddedResource Include="Resources\languages.json" />
Expand All @@ -53,16 +55,16 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="Moq" Version="4.17.2" />
<PackageReference Include="Moq.AutoMock" Version="3.3.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="Moq.AutoMock" Version="3.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="Shouldly" Version="4.2.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 8c4eb21

Please sign in to comment.