Skip to content

Commit 6a45888

Browse files
committed
Target .NET 9 and remove Newtonsoft reference
1 parent 93fdd94 commit 6a45888

File tree

5 files changed

+7
-30
lines changed

5 files changed

+7
-30
lines changed

src/core/Dime.ExtJs.csproj

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,26 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Authors>Dime Software</Authors>
4-
<TargetFrameworks>net8.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
55
<AssemblyName>Dime.ExtJs</AssemblyName>
66
<PackageId>Dime.ExtJs</PackageId>
77
<PackageIconUrl>https://cdn.dime-software.com/dime-software/logo-shape.png</PackageIconUrl>
88
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
99
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
1010
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
1111
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
12-
<Version>1.2.0</Version>
12+
<Version>2.0.0</Version>
1313
<Description>.NET classes for ExtJS operations such as grouping, sorting and filtering</Description>
1414
<Copyright>Dime Software © 2024</Copyright>
1515
<NeutralLanguage>en</NeutralLanguage>
1616
<IncludeSource>True</IncludeSource>
1717
<IncludeSymbols>True</IncludeSymbols>
1818
<RootNamespace>Dime.ExtJs</RootNamespace>
19-
<AssemblyVersion>1.2.0.0</AssemblyVersion>
19+
<AssemblyVersion>2.0.0.0</AssemblyVersion>
2020
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2121
<RepositoryType>git</RepositoryType>
2222
<PackageReadmeFile>README.md</PackageReadmeFile>
2323
</PropertyGroup>
24-
25-
<ItemGroup>
26-
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
27-
<PackageReference Include="System.Runtime" Version="4.3.1" />
28-
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
29-
</ItemGroup>
3024
<ItemGroup>
3125
<None Include="README.md" Pack="true" PackagePath="\" />
3226
</ItemGroup>

src/core/Filter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public Filter()
5151
public IDictionary<int, string> GetFields()
5252
{
5353
int c = 1;
54-
Dictionary<int, string> properties = new Dictionary<int, string>();
54+
Dictionary<int, string> properties = [];
5555
Property.Split('.').ToList().ForEach(x =>
5656
{
5757
properties.Add(c, x);

src/core/Group.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using Newtonsoft.Json;
2-
1+

32
namespace Dime.ExtJs
43
{
54
/// <summary>
@@ -18,12 +17,5 @@ public Group() : base()
1817
/// Gets or sets the flag whether this is a complex grouper
1918
/// </summary>
2019
public bool ComplexType { get; set; }
21-
22-
/// <summary>
23-
/// Casts a string to the group
24-
/// </summary>
25-
/// <param name="groupedString">The group string as passed in by the Ext framework</param>
26-
public static explicit operator Group(string groupedString)
27-
=> string.IsNullOrEmpty(groupedString) ? null : JsonConvert.DeserializeObject<Group>(groupedString);
2820
}
2921
}

src/core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ using Dime.ExtJs;
1616

1717
public IEnumerable<MyData> Get(string filterString)
1818
{
19-
Filter filterObject = JsonConvert.DeserializeObject<Filter>(filterString);
19+
Filter filterObject = JsonSerializer.Deserialize<Filter>(filterString);
2020
}
2121
```
2222

src/core/Sort.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using Newtonsoft.Json;
2-
3-
namespace Dime.ExtJs
1+
namespace Dime.ExtJs
42
{
53
/// <summary>
64
/// Represents an Ext sort
@@ -13,12 +11,5 @@ public class Sort : Action
1311
public Sort() : base()
1412
{
1513
}
16-
17-
/// <summary>
18-
/// Casts a string to the sorter
19-
/// </summary>
20-
/// <param name="orderString">The order string as passed in by the Ext framework</param>
21-
public static explicit operator Sort(string orderString)
22-
=> string.IsNullOrEmpty(orderString) ? null : JsonConvert.DeserializeObject<Sort>(orderString);
2314
}
2415
}

0 commit comments

Comments
 (0)