Skip to content

Commit

Permalink
Merge pull request #237 from Avanade/feature/structV8
Browse files Browse the repository at this point in the history
Update Liquid framework for net8.
  • Loading branch information
lucianareginalino authored Jun 18, 2024
2 parents 0d1ebf9 + 2e71e7c commit 7320cd1
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 82 deletions.
11 changes: 4 additions & 7 deletions src/Liquid.Cache.Memory/Liquid.Cache.Memory.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<PackageId>Liquid.Cache.Memory</PackageId>
<Nullable>enable</Nullable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -11,7 +11,7 @@
<Copyright>Avanade 2019</Copyright>
<PackageProjectUrl>https://github.com/Avanade/Liquid-Application-Framework</PackageProjectUrl>
<PackageIcon>logo.png</PackageIcon>
<Version>6.0.0</Version>
<Version>8.0.0-alpha-01</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsPackable>true</IsPackable>
<DebugType>Full</DebugType>
Expand All @@ -29,11 +29,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Liquid.Core\Liquid.Core.csproj" />
<PackageReference Include="Liquid.Core" Version="8.0.0-alpha-04" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
</ItemGroup>

</Project>
21 changes: 3 additions & 18 deletions src/Liquid.Cache.NCache/Liquid.Cache.NCache.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<PackageId>Liquid.Cache.NCache</PackageId>
<Nullable>enable</Nullable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -11,7 +11,7 @@
<Copyright>Avanade 2019</Copyright>
<PackageProjectUrl>https://github.com/Avanade/Liquid-Application-Framework</PackageProjectUrl>
<PackageIcon>logo.png</PackageIcon>
<Version>6.0.0</Version>
<Version>8.0.0-alpha-01</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsPackable>true</IsPackable>
<DebugType>Full</DebugType>
Expand All @@ -30,24 +30,9 @@

<ItemGroup>
<PackageReference Include="Alachisoft.NCache.SDK" Version="5.3.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageReference Include="Liquid.Core" Version="8.0.0-alpha-04" />
<PackageReference Include="NCache.Microsoft.Extensions.Caching" Version="5.3.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="System.DirectoryServices.Protocols" Version="6.0.1" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="System.Private.ServiceModel" Version="4.10.3" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.4" />
<PackageReference Include="System.ServiceModel.Duplex" Version="4.10.3" />
<PackageReference Include="System.ServiceModel.Http" Version="4.10.3" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.10.3" />
<PackageReference Include="System.ServiceModel.Security" Version="4.10.3" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Liquid.Core\Liquid.Core.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="client.ncconf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
13 changes: 5 additions & 8 deletions src/Liquid.Cache.Redis/Liquid.Cache.Redis.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Authors>Avanade Brazil</Authors>
Expand All @@ -10,7 +10,7 @@
<Copyright>Avanade 2019</Copyright>
<PackageProjectUrl>https://github.com/Avanade/Liquid-Application-Framework</PackageProjectUrl>
<PackageIcon>logo.png</PackageIcon>
<Version>6.0.0</Version>
<Version>8.0.0-alpha-01</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsPackable>true</IsPackable>
<DebugType>Full</DebugType>
Expand All @@ -28,12 +28,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.31" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Liquid.Core\Liquid.Core.csproj" />
<PackageReference Include="Liquid.Core" Version="8.0.0-alpha-04" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.6" />
<PackageReference Include="System.Drawing.Common" Version="8.0.6" />
</ItemGroup>

</Project>
12 changes: 5 additions & 7 deletions src/Liquid.Cache.SqlServer/Liquid.Cache.SqlServer.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<PackageId>Liquid.Cache.SqlServer</PackageId>
<Nullable>enable</Nullable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -11,7 +11,7 @@
<Copyright>Avanade 2019</Copyright>
<PackageProjectUrl>https://github.com/Avanade/Liquid-Application-Framework</PackageProjectUrl>
<PackageIcon>logo.png</PackageIcon>
<Version>6.0.0</Version>
<Version>8.0.0-alpha-01</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsPackable>true</IsPackable>
<DebugType>Full</DebugType>
Expand All @@ -29,13 +29,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.12.0" />
<PackageReference Include="Liquid.Core" Version="8.0.0-alpha-04" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.1" />
<PackageReference Include="Microsoft.Extensions.Caching.SqlServer" Version="6.0.8" />
<PackageReference Include="Microsoft.Extensions.Caching.SqlServer" Version="8.0.6" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Liquid.Core\Liquid.Core.csproj" />
</ItemGroup>

</Project>
12 changes: 6 additions & 6 deletions test/Liquid.Cache.Memory.Tests/Liquid.Cache.Memory.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
37 changes: 19 additions & 18 deletions test/Liquid.Cache.NCache.Tests/IServiceCollectionExtensionTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Liquid.Cache.NCache.Extensions.DependencyInjection;
using Liquid.Core.Interfaces;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using NSubstitute;
Expand All @@ -22,16 +23,16 @@ private void SetCollection()
[Fact]
public void AddLiquidNCacheDistributedCache_WhenWithTelemetryTrue_GetServicesReturnLiqudCache()

Check warning on line 24 in test/Liquid.Cache.NCache.Tests/IServiceCollectionExtensionTest.cs

View workflow job for this annotation

GitHub Actions / call-reusable-build-workflow / build

Missing XML comment for publicly visible type or member 'IServiceCollectionExtensionTest.AddLiquidNCacheDistributedCache_WhenWithTelemetryTrue_GetServicesReturnLiqudCache()'

Check warning on line 24 in test/Liquid.Cache.NCache.Tests/IServiceCollectionExtensionTest.cs

View workflow job for this annotation

GitHub Actions / call-reusable-build-workflow / build

Add at least one assertion to this test case. (https://rules.sonarsource.com/csharp/RSPEC-2699)
{
//SetCollection();
//_sut.AddLogging();
//_sut.AddLiquidNCacheDistributedCache(configuration =>
//{
// configuration.CacheName = "myCache";
// configuration.EnableLogs = false;
// configuration.ExceptionsEnabled = true;
//}, true);
SetCollection();
_sut.AddLogging();
_sut.AddLiquidNCacheDistributedCache(configuration =>
{
configuration.CacheName = "myCache";
configuration.EnableLogs = false;
configuration.ExceptionsEnabled = true;
}, true);

//var provider = _sut.BuildServiceProvider();
var provider = _sut.BuildServiceProvider();

//Assert.NotNull(provider.GetService<ILiquidCache>());
//Assert.NotNull(_sut.FirstOrDefault(x => x.ServiceType == typeof(ILiquidCache) && x.Lifetime == ServiceLifetime.Scoped));
Expand All @@ -41,15 +42,15 @@ public void AddLiquidNCacheDistributedCache_WhenWithTelemetryTrue_GetServicesRet
[Fact]
public void AddLiquidNCacheDistributedCache_WhenWithTelemetryfalse_GetServicesReturnLiqudCache()

Check warning on line 43 in test/Liquid.Cache.NCache.Tests/IServiceCollectionExtensionTest.cs

View workflow job for this annotation

GitHub Actions / call-reusable-build-workflow / build

Missing XML comment for publicly visible type or member 'IServiceCollectionExtensionTest.AddLiquidNCacheDistributedCache_WhenWithTelemetryfalse_GetServicesReturnLiqudCache()'

Check warning on line 43 in test/Liquid.Cache.NCache.Tests/IServiceCollectionExtensionTest.cs

View workflow job for this annotation

GitHub Actions / call-reusable-build-workflow / build

Add at least one assertion to this test case. (https://rules.sonarsource.com/csharp/RSPEC-2699)
{
//SetCollection();
//_sut.AddLiquidNCacheDistributedCache(configuration =>
//{
// configuration.CacheName = "myCache";
// configuration.EnableLogs = false;
// configuration.ExceptionsEnabled = true;
//}, false);

//var provider = _sut.BuildServiceProvider();
SetCollection();
_sut.AddLiquidNCacheDistributedCache(configuration =>
{
configuration.CacheName = "myCache";
configuration.EnableLogs = false;
configuration.ExceptionsEnabled = true;
}, false);

var provider = _sut.BuildServiceProvider();

//Assert.NotNull(provider.GetService<ILiquidCache>());
//Assert.NotNull(_sut.FirstOrDefault(x => x.ServiceType == typeof(ILiquidCache) && x.Lifetime == ServiceLifetime.Scoped));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -15,8 +15,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Liquid.Cache.Redis.Extensions.DependencyInjection;
using Liquid.Core.Implementations;
using Liquid.Core.Interfaces;
using Microsoft.Extensions.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration;
Expand Down Expand Up @@ -37,7 +38,7 @@ public void AddLiquidRedisDistributedCache_WhenWithTelemetryTrue_GetServicesRetu

Assert.NotNull(provider.GetService<ILiquidCache>());
Assert.NotNull(_sut.FirstOrDefault(x => x.ServiceType == typeof(ILiquidCache) && x.Lifetime == ServiceLifetime.Scoped));
Assert.NotNull(_sut.FirstOrDefault(x => x.ImplementationType == typeof(RedisCache)));
Assert.NotNull(_sut.FirstOrDefault(x => x.ImplementationType == typeof(LiquidCache)));

}

Expand All @@ -55,7 +56,7 @@ public void AddLiquidRedisDistributedCache_WhenWithTelemetryfalse_GetServicesRet

Assert.NotNull(provider.GetService<ILiquidCache>());
Assert.NotNull(_sut.FirstOrDefault(x => x.ServiceType == typeof(ILiquidCache) && x.Lifetime == ServiceLifetime.Scoped));
Assert.NotNull(_sut.FirstOrDefault(x => x.ImplementationType == typeof(RedisCache)));
Assert.NotNull(_sut.FirstOrDefault(x => x.ImplementationType == typeof(LiquidCache)));

}
}
Expand Down
12 changes: 6 additions & 6 deletions test/Liquid.Cache.Redis.Tests/Liquid.Cache.Redis.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 7320cd1

Please sign in to comment.