Skip to content

Commit c333b8c

Browse files
authored
Net10 support added (#2353)
* NET10 support added * DataGrid Paging Disappears on Click in .NET Core 10.0.0 RC Fix #2286 * various fixes * KnownIPNetworks used instead KnownNetworks * build fixed
1 parent 17e3fbd commit c333b8c

File tree

9 files changed

+30
-21
lines changed

9 files changed

+30
-21
lines changed

Radzen.Blazor.Tests/ExpressionSerializerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class TestEntity
2222
public Guid Id { get; set; }
2323
public TimeOnly StartTime { get; set; }
2424
public DateOnly BirthDate { get; set; }
25-
public int[] Scores { get; set; }
25+
public List<int> Scores { get; set; }
2626
public List<string> Tags { get; set; }
2727
public List<TestEntity> Children { get; set; }
2828
public Address Address { get; set; }

Radzen.Blazor.Tests/Radzen.Blazor.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
1111
<PackageReference Include="bunit.web" Version="1.36.0" />
1212
<PackageReference Include="xunit" Version="2.4.1" />
1313
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">

Radzen.Blazor/AIChatService.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,9 @@ public async IAsyncEnumerable<string> GetCompletionsAsync(string userInput, stri
8787

8888
var assistantResponse = new StringBuilder();
8989

90-
while (!reader.EndOfStream && !cancellationToken.IsCancellationRequested)
90+
string line;
91+
while ((line = await reader.ReadLineAsync()) is not null && !cancellationToken.IsCancellationRequested)
9192
{
92-
var line = await reader.ReadLineAsync();
93-
9493
if (string.IsNullOrWhiteSpace(line) || !line.StartsWith("data:"))
9594
{
9695
continue;

Radzen.Blazor/Radzen.Blazor.csproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<IncludeSymbols>true</IncludeSymbols>
44
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
55
<NoWarn>BL9993;BL0007;BL0005</NoWarn>
6-
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
6+
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0;net10.0</TargetFrameworks>
77
<RazorLangVersion>7.0</RazorLangVersion>
88
<LangVersion>latest</LangVersion>
99
<OutputType>Library</OutputType>
@@ -34,6 +34,8 @@
3434
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Condition="'$(TargetFramework)' == 'net8.0'" Version="8.0.0" />
3535
<PackageReference Include="Microsoft.AspNetCore.Components" Condition="'$(TargetFramework)' == 'net9.0'" Version="9.*-*" />
3636
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Condition="'$(TargetFramework)' == 'net9.0'" Version="9.*-*" />
37+
<PackageReference Include="Microsoft.AspNetCore.Components" Condition="'$(TargetFramework)' == 'net10.0'" Version="10.*-*" />
38+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Condition="'$(TargetFramework)' == 'net10.0'" Version="10.*-*" />
3739
<PackageReference Include="Radzen.Terser.MSBuild" Version="0.0.4" PrivateAssets="All" />
3840
</ItemGroup>
3941

@@ -55,10 +57,10 @@
5557
</PropertyGroup>
5658

5759
<ItemGroup>
58-
<Sass Include="$(MSBuildProjectDirectory)/themes/*.scss" Exclude="$(MSBuildProjectDirectory)/themes/_*.scss" Condition="'$(TargetFramework)' == 'net9.0'" />
60+
<Sass Include="$(MSBuildProjectDirectory)/themes/*.scss" Exclude="$(MSBuildProjectDirectory)/themes/_*.scss" Condition="'$(TargetFramework)' == 'net10.0'" />
5961
</ItemGroup>
6062

61-
<Target Name="Sass" BeforeTargets="BeforeBuild" Condition="'$(TargetFramework)' == 'net9.0'">
63+
<Target Name="Sass" BeforeTargets="BeforeBuild" Condition="'$(TargetFramework)' == 'net10.0'">
6264
<PropertyGroup>
6365
<_SassFileList>@(Sass->'&quot;%(FullPath)&quot;', ' ')</_SassFileList>
6466
<DartSassBuilderArgs>files $(_SassFileList) --outputstyle $(DartSassOutputStyle) --level $(DartSassOutputLevel)</DartSassBuilderArgs>
@@ -67,14 +69,14 @@
6769
<Message Text="Converted SassFile list to argument" Importance="$(DartSassMessageLevel)" />
6870
</Target>
6971

70-
<Target Name="MoveCss" AfterTargets="AfterCompile" Condition="'$(TargetFramework)' == 'net9.0'">
72+
<Target Name="MoveCss" AfterTargets="AfterCompile" Condition="'$(TargetFramework)' == 'net10.0'">
7173
<ItemGroup>
7274
<CssFile Include="$(MSBuildProjectDirectory)/themes/*.css" />
7375
</ItemGroup>
7476
<Move SourceFiles="@(CssFile)" DestinationFolder="$(MSBuildProjectDirectory)/wwwroot/css/" />
7577
</Target>
7678

77-
<Target Name="MinifyTest" BeforeTargets="Build" Condition="'$(TargetFramework)' == 'net9.0'">
79+
<Target Name="MinifyTest" BeforeTargets="Build" Condition="'$(TargetFramework)' == 'net10.0'">
7880
<TerserMinify InputFile="wwwroot\Radzen.Blazor.js" OutputFile="wwwroot\Radzen.Blazor.min.js" />
7981
</Target>
8082

Radzen.Blazor/RadzenDataGrid.razor.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2183,7 +2183,15 @@ internal async Task ReloadInternal()
21832183

21842184
if (Data != null && !LoadData.HasDelegate)
21852185
{
2186+
#if NET10_0_OR_GREATER
2187+
var count = View.Count();
2188+
if (count != Count)
2189+
{
2190+
Count = count;
2191+
}
2192+
#else
21862193
Count = 1;
2194+
#endif
21872195
}
21882196

21892197
if (AllowVirtualization)

RadzenBlazorDemos.Host/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
{
7575
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
7676
};
77-
forwardingOptions.KnownNetworks.Clear();
77+
forwardingOptions.KnownIPNetworks.Clear();
7878
forwardingOptions.KnownProxies.Clear();
7979

8080
app.UseForwardedHeaders(forwardingOptions);

RadzenBlazorDemos.Host/RadzenBlazorDemos.Host.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<ErrorOnDuplicatePublishOutputFiles>False</ErrorOnDuplicatePublishOutputFiles>
66
<UserSecretsId>d4f5f92a-c1c5-47b2-bb94-becc7f09133c</UserSecretsId>
77
</PropertyGroup>
88
<ItemGroup>
99
<ProjectReference Include="..\RadzenBlazorDemos\RadzenBlazorDemos.csproj" />
10-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.*-*" />
11-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.*-*" />
10+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="10.*-*" />
11+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.*-*" />
1212
<PackageReference Include="Microsoft.AspNetCore.OData" Version="9.*-*" />
1313
<PackageReference Include="DocumentFormat.OpenXml" Version="2.20.0" />
1414
</ItemGroup>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<UserSecretsId>cf316844-9d34-42f9-a2a7-72a167736c64</UserSecretsId>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<ProjectReference Include="..\RadzenBlazorDemos.Host\RadzenBlazorDemos.Host.csproj" />
11+
<ProjectReference Include="..\RadzenBlazorDemos\RadzenBlazorDemos.csproj" />
1212
</ItemGroup>
1313
</Project>

RadzenBlazorDemos/RadzenBlazorDemos.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
22
<PropertyGroup>
3-
<TargetFramework>net9.0</TargetFramework>
3+
<TargetFramework>net10.0</TargetFramework>
44
</PropertyGroup>
55
<ItemGroup>
66
<PackageReference Include="Radzen.Blazor" Version="*" Condition="'$(Configuration)' == 'Release'" />
77
<ProjectReference Include="..\Radzen.Blazor\Radzen.Blazor.csproj" Condition="'$(Configuration)' != 'Release'" />
8-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.*-*" />
9-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.*-*" PrivateAssets="all" />
10-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.*-*" />
8+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.*-*" />
9+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.*-*" PrivateAssets="all" />
10+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="10.*-*" />
1111
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="6.0.10" />
1212
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
1313
<PackageReference Include="Microsoft.CodeAnalysis.Razor" Version="6.0.10" />

0 commit comments

Comments
 (0)