Skip to content

Commit

Permalink
chore: prepare for support for net9.0 (#1208)
Browse files Browse the repository at this point in the history
chore: prepare for support of net9.0
  • Loading branch information
Seddryck authored Nov 18, 2024
1 parent e7666b0 commit cd19299
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 42 deletions.
2 changes: 1 addition & 1 deletion DubUrl.Adomd/Rewriting/PowerBiPremiumRewriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public override void Execute(UrlInfo urlInfo)
for (int i = 0; i < segments.Count; i++)
segments[i] = Encode(segments[i]);

fullHost.AppendJoin('/', [.. segments]);
fullHost.AppendJoin('/', segments);

Specificator.Execute(SERVER_KEYWORD, fullHost.ToString());
}
Expand Down
4 changes: 2 additions & 2 deletions DubUrl.Adomd/Rewriting/SsasRewriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public override void Execute(UrlInfo urlInfo)
var fullHost = new StringBuilder();
fullHost.Append(urlInfo.Host);
if (urlInfo.Segments.Length == 0 || urlInfo.Segments.Length > 3)
throw new InvalidConnectionUrlException($"The connection-url for 'Microsoft SQL Server Analysis Service Multidimensional' is expecting one to three segments. This connection-url is containing {urlInfo.Segments.Length} segments: '{string.Join("', '", [.. urlInfo.Segments])}'");
throw new InvalidConnectionUrlException($"The connection-url for 'Microsoft SQL Server Analysis Service Multidimensional' is expecting one to three segments. This connection-url is containing {urlInfo.Segments.Length} segments: '{string.Join("', '", urlInfo.Segments)}'");
if (urlInfo.Port != 0)
{
fullHost.Append(':').Append(urlInfo.Port);
Expand Down Expand Up @@ -80,7 +80,7 @@ public override void Execute(UrlInfo urlInfo)
else if (urlInfo.Segments.Length >= 2 && urlInfo.Segments.Length <= 3)
Specificator.Execute(DATABASE_KEYWORD, urlInfo.Segments.Skip(1).First());
else
throw new InvalidConnectionUrlException($"The connection-url for 'Microsoft SQL Server Analysis Service Multidimensional' is expecting one to three segments. This connection-url is containing {urlInfo.Segments.Length} segments: '{string.Join("', '", [.. urlInfo.Segments])}'");
throw new InvalidConnectionUrlException($"The connection-url for 'Microsoft SQL Server Analysis Service Multidimensional' is expecting one to three segments. This connection-url is containing {urlInfo.Segments.Length} segments: '{string.Join("', '", urlInfo.Segments)}'");
}
}

Expand Down
2 changes: 1 addition & 1 deletion DubUrl.Core/Rewriting/Implementation/DuckdbRewriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public override void Execute(UrlInfo urlInfo)
if (!urlInfo.Segments.Any())
segments.Add(":memory:");
else
throw new InvalidConnectionUrlException($"Expecting no segment in the connectionUrl because the InMemory mode was activated by specifying the host '{urlInfo.Host}' but get {urlInfo.Segments.Length} segments. The list of segments was '{string.Join("', '", [.. urlInfo.Segments])}'");
throw new InvalidConnectionUrlException($"Expecting no segment in the connectionUrl because the InMemory mode was activated by specifying the host '{urlInfo.Host}' but get {urlInfo.Segments.Length} segments. The list of segments was '{string.Join("', '", urlInfo.Segments)}'");
}
else if (string.IsNullOrEmpty(urlInfo.Host) && urlInfo.Segments.Length > 1 && string.IsNullOrEmpty(urlInfo.Segments[0]))
segments = urlInfo.Segments.Skip(1).ToList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public override void Execute(UrlInfo urlInfo)
if (urlInfo.Segments.Length > 0 && urlInfo.Segments.Length <= 2)
Specificator.Execute(DATABASE_KEYWORD, urlInfo.Segments.Last());
else
throw new InvalidConnectionUrlException($"The connection-url for Microsoft SQL Server is expecting one or two segments. This connection-url is containing {urlInfo.Segments.Length} segments: '{string.Join("', '", [.. urlInfo.Segments])}'");
throw new InvalidConnectionUrlException($"The connection-url for Microsoft SQL Server is expecting one or two segments. This connection-url is containing {urlInfo.Segments.Length} segments: '{string.Join("', '", urlInfo.Segments)}'");
}
}
}
11 changes: 10 additions & 1 deletion DubUrl.Extensions.Testing/DubUrl.Extensions.Testing.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'net9.0'">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
Expand Down
62 changes: 36 additions & 26 deletions DubUrl.Extensions/DubUrl.Extensions.csproj
Original file line number Diff line number Diff line change
@@ -1,32 +1,42 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'net9.0'">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.0" />
</ItemGroup>

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

<ItemGroup>
<PackageReference Update="DotNet.ReproducibleBuilds" Version="1.2.25">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Update="DotNet.ReproducibleBuilds" Version="1.2.25">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<PropertyGroup>
<PackageId>DubUrl.Extensions</PackageId>
<RepositoryUrl>https://github.com/Seddryck/DubUrl</RepositoryUrl>
<PackageTags>connection-string;database;sql;dependency-injection;configuration</PackageTags>
<Description>DubUrl provides a standardized URL-style mechanism for providing database connection information and opening a DbConnection in the .NET ecosystem</Description>
</PropertyGroup>

<PropertyGroup>
<PackageId>DubUrl.Extensions</PackageId>
<RepositoryUrl>https://github.com/Seddryck/DubUrl</RepositoryUrl>
<PackageTags>connection-string;database;sql;dependency-injection;configuration</PackageTags>
<Description>DubUrl provides a standardized URL-style mechanism for providing database connection information and opening a DbConnection in the .NET ecosystem</Description>
</PropertyGroup>

</Project>
9 changes: 6 additions & 3 deletions DubUrl.OleDb/DubUrl.OleDb.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<PackageReference Include="System.Data.OleDb" Version="8.0.1" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'net9.0'">
<PackageReference Include="System.Data.OleDb" Version="8.0.1" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="System.Data.OleDb" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DubUrl.Core\DubUrl.csproj" />
Expand Down
17 changes: 14 additions & 3 deletions DubUrl.QA/DubUrl.QA.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,29 @@
<PackageReference Include="NReco.PrestoAdo" Version="1.1.0" />
<PackageReference Include="SingleStoreConnector" Version="1.1.4" />
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.10" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'net9.0'">
<PackageReference Include="System.Data.Odbc" Version="8.0.1" />
<PackageReference Include="System.Data.OleDb" Version="8.0.1" />
</ItemGroup>

<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="System.Data.Odbc" Version="9.0.0" />
<PackageReference Include="System.Data.OleDb" Version="9.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'net9.0'">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Ini" Version="8.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Ini" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
Expand Down
14 changes: 10 additions & 4 deletions DubUrl.Testing/DubUrl.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="23.6.1" />
<PackageReference Include="SingleStoreConnector" Version="1.1.4" />
<PackageReference Include="Snowflake.Data" Version="4.2.0" />
<PackageReference Include="System.Data.Odbc" Version="8.0.1" />
<PackageReference Include="System.Data.OleDb" Version="8.0.1" />
<PackageReference Include="System.Management" Version="8.0.0" />
<PackageReference Include="Teradata.Client.Provider" Version="20.0.3" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'net9.0'">
<PackageReference Include="System.Data.Odbc" Version="8.0.1" />
<PackageReference Include="System.Data.OleDb" Version="8.0.1" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="System.Data.Odbc" Version="9.0.0" />
<PackageReference Include="System.Data.OleDb" Version="9.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="NUnit" Version="4.2.2" />
Expand All @@ -43,8 +49,8 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\DubUrl\DubUrl.Core\DubUrl.csproj" />
</ItemGroup>
<ProjectReference Include="..\..\DubUrl\DubUrl.Core\DubUrl.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="DotNet.ReproducibleBuilds" Version="1.2.25">
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit cd19299

Please sign in to comment.