Skip to content

Commit dcba2ff

Browse files
authored
Housekeeping: Add Net10, Remove obsolete FilterOnProperty (#1050)
* Remove obsolete FilterOnProperty and update dependencies Removed the obsolete FilterOnProperty extension and related tests. Updated .NET workflow to support .NET 10 and improved caching. Upgraded package dependencies in Directory.Build.props and test project. Updated copyright years. * Update build configs and remove obsolete files Updated GitHub Actions workflows to use 'windows-latest' and setup-dotnet@v5.0.1. Changed test project to use Microsoft.NET.Sdk instead of MSBuild.Sdk.Extras and removed global.json and ObsoleteEx.cs. Also updated the solution file for Visual Studio 18 and made minor adjustments to target frameworks and using directives. * Clean up target framework property groups Removed obsolete MonoAndroid debug settings and redundant netcoreapp property groups from build files. Added support for net10 target framework in Directory.Build.targets. * Refactor target framework defines and remove UWP check Consolidated target framework property groups in Directory.Build.targets to simplify conditional defines. Removed the WINDOWS_UWP preprocessor check from EnumerableEx.cs, making ToHashSet available for all platforms.
1 parent 7d65daa commit dcba2ff

File tree

354 files changed

+438
-634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

354 files changed

+438
-634
lines changed

.github/workflows/ci-build.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010

1111
jobs:
1212
build:
13-
runs-on: windows-2022
13+
runs-on: windows-latest
1414
outputs:
1515
nbgv: ${{ steps.nbgv.outputs.SemVer2 }}
1616
steps:
@@ -21,14 +21,22 @@ jobs:
2121
fetch-depth: 0
2222
lfs: true
2323

24-
- name: Setup .NET 6/7/8/9
25-
uses: actions/setup-dotnet@v5
24+
- name: Setup .NET (With cache)
25+
uses: actions/setup-dotnet@v5.0.1
2626
with:
2727
dotnet-version: |
2828
6.0.x
2929
7.0.x
3030
8.0.x
3131
9.0.x
32+
10.0.x
33+
cache: true
34+
cache-dependency-path: |
35+
**/Directory.Packages.props
36+
**/*.sln
37+
**/*.csproj
38+
**/global.json
39+
**/nuget.config
3240
3341
- name: NBGV
3442
id: nbgv

.github/workflows/release.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010

1111
jobs:
1212
release:
13-
runs-on: windows-2022
13+
runs-on: windows-latest
1414
environment:
1515
name: release
1616
outputs:
@@ -22,15 +22,23 @@ jobs:
2222
with:
2323
fetch-depth: 0
2424

25-
- name: Setup .NET 6/7/8/9
26-
uses: actions/setup-dotnet@v5
25+
- name: Setup .NET (With cache)
26+
uses: actions/setup-dotnet@v5.0.1
2727
with:
2828
dotnet-version: |
2929
6.0.x
3030
7.0.x
3131
8.0.x
3232
9.0.x
33-
33+
10.0.x
34+
cache: true
35+
cache-dependency-path: |
36+
**/Directory.Packages.props
37+
**/*.sln
38+
**/*.csproj
39+
**/global.json
40+
**/nuget.config
41+
3442
- name: NBGV
3543
id: nbgv
3644
uses: dotnet/nbgv@master

src/Directory.Build.props

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Project>
44
<PropertyGroup>
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6-
<NoWarn>$(NoWarn);1591;1701;1702;1705;VSX1000</NoWarn>
6+
<NoWarn>$(NoWarn);1591;1701;1702;1705;VSX1000;CA1510</NoWarn>
77
<Platform>AnyCPU</Platform>
88
<Nullable>enable</Nullable>
99
<LangVersion>latest</LangVersion>
@@ -35,11 +35,6 @@
3535
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
3636
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
3737
</PropertyGroup>
38-
39-
<!-- MonoAndroid doesn't seem to want to allow debugging for maintainers -->
40-
<PropertyGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
41-
<DebugType>Full</DebugType>
42-
</PropertyGroup>
4338

4439
<PropertyGroup Condition="$(IsTestProject) OR $(IsBenchmarkProject)">
4540
<IsPackable>false</IsPackable>
@@ -63,7 +58,7 @@
6358
<PackageReference Include="Nerdbank.GitVersioning" Version="3.9.50" PrivateAssets="all" />
6459
</ItemGroup>
6560
<ItemGroup Condition="$(TargetFramework) == 'netstandard2.0'">
66-
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.5" />
61+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.10" />
6762
</ItemGroup>
6863
<ItemGroup Condition="!$(IsTestProject) AND !$(IsBenchmarkProject)">
6964
<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.556" PrivateAssets="all" />

src/Directory.Build.targets

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,11 @@
33
<Product>$(AssemblyName) ($(TargetFramework))</Product>
44
</PropertyGroup>
55

6-
<PropertyGroup Condition="$(TargetFramework.StartsWith('uap'))">
7-
<DefineConstants>$(DefineConstants);WINDOWS_UWP;P_LINQ</DefineConstants>
8-
</PropertyGroup>
9-
106
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
117
<DefineConstants>$(DefineConstants);P_LINQ;SUPPORTS_BINDINGLIST</DefineConstants>
128
</PropertyGroup>
139

14-
<PropertyGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
15-
<DefineConstants>$(DefineConstants);NETSTANDARD;PORTABLE;P_LINQ;SUPPORTS_BINDINGLIST</DefineConstants>
16-
</PropertyGroup>
17-
18-
<PropertyGroup Condition="($(TargetFramework) == 'netstandard2.0') OR ($(TargetFramework) == 'netstandard2.1')">
19-
<DefineConstants>$(DefineConstants);SUPPORTS_ASYNC_DISPOSABLE</DefineConstants>
20-
</PropertyGroup>
21-
22-
<PropertyGroup Condition="$(TargetFramework.StartsWith('netcoreapp'))">
23-
<DefineConstants>$(DefineConstants);NETCOREAPP;P_LINQ;SUPPORTS_BINDINGLIST;SUPPORTS_ASYNC_DISPOSABLE</DefineConstants>
24-
</PropertyGroup>
25-
26-
<PropertyGroup Condition="($(TargetFramework) == 'netcoreapp3.0') OR ($(TargetFramework) == 'netcoreapp3.1')">
27-
<DefineConstants>$(DefineConstants);SUPPORTS_ASYNC_DISPOSABLE</DefineConstants>
28-
</PropertyGroup>
29-
30-
<PropertyGroup Condition="$(TargetFramework.StartsWith('net5'))">
31-
<DefineConstants>$(DefineConstants);NETSTANDARD;PORTABLE;P_LINQ;SUPPORTS_BINDINGLIST;SUPPORTS_ASYNC_DISPOSABLE</DefineConstants>
32-
</PropertyGroup>
33-
34-
<PropertyGroup Condition="$(TargetFramework.StartsWith('net6'))">
35-
<DefineConstants>$(DefineConstants);NETSTANDARD;PORTABLE;P_LINQ;SUPPORTS_BINDINGLIST;SUPPORTS_ASYNC_DISPOSABLE</DefineConstants>
36-
</PropertyGroup>
37-
38-
<PropertyGroup Condition="$(TargetFramework.StartsWith('net7'))">
39-
<DefineConstants>$(DefineConstants);NETSTANDARD;PORTABLE;P_LINQ;SUPPORTS_BINDINGLIST;SUPPORTS_ASYNC_DISPOSABLE</DefineConstants>
40-
</PropertyGroup>
41-
42-
<PropertyGroup Condition="$(TargetFramework.StartsWith('net8'))">
43-
<DefineConstants>$(DefineConstants);NETSTANDARD;PORTABLE;P_LINQ;SUPPORTS_BINDINGLIST;SUPPORTS_ASYNC_DISPOSABLE</DefineConstants>
44-
</PropertyGroup>
45-
46-
<PropertyGroup Condition="$(TargetFramework.StartsWith('net9'))">
47-
<DefineConstants>$(DefineConstants);NETSTANDARD;PORTABLE;P_LINQ;SUPPORTS_BINDINGLIST;SUPPORTS_ASYNC_DISPOSABLE</DefineConstants>
10+
<PropertyGroup Condition="$(TargetFramework.StartsWith('netstandard')) or $(TargetFramework.StartsWith('net6')) or $(TargetFramework.StartsWith('net7')) or $(TargetFramework.StartsWith('net8')) or $(TargetFramework.StartsWith('net9')) or $(TargetFramework.StartsWith('net10'))">
11+
<DefineConstants>$(DefineConstants);NETSTANDARD;P_LINQ;SUPPORTS_BINDINGLIST;SUPPORTS_ASYNC_DISPOSABLE</DefineConstants>
4812
</PropertyGroup>
4913
</Project>

src/DynamicData.Tests/API/ApiApprovalTests.DynamicDataTests.DotNet9_0.verified.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,6 @@ namespace DynamicData.Binding
309309
protected virtual void OnPropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string? propertyName = null) { }
310310
protected virtual void SetAndRaise<T>(ref T backingField, T newValue, [System.Runtime.CompilerServices.CallerMemberName] string? propertyName = null) { }
311311
protected virtual void SetAndRaise<T>(ref T backingField, T newValue, System.Collections.Generic.IEqualityComparer<T>? comparer, [System.Runtime.CompilerServices.CallerMemberName] string? propertyName = null) { }
312-
[System.Obsolete("This never worked properly in the first place")]
313-
public System.IDisposable SuspendNotifications(bool invokePropertyChangeEventWhenDisposed = true) { }
314312
}
315313
public class BindingListAdaptor<[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] T> : DynamicData.IChangeSetAdaptor<T>
316314
where T : notnull
@@ -469,7 +467,7 @@ namespace DynamicData.Binding
469467
public static bool operator !=(DynamicData.Binding.PropertyValue<TObject, TValue>? left, DynamicData.Binding.PropertyValue<TObject, TValue>? right) { }
470468
public static bool operator ==(DynamicData.Binding.PropertyValue<TObject, TValue>? left, DynamicData.Binding.PropertyValue<TObject, TValue>? right) { }
471469
}
472-
public struct SortAndBindOptions : System.IEquatable<DynamicData.Binding.SortAndBindOptions>
470+
public readonly struct SortAndBindOptions : System.IEquatable<DynamicData.Binding.SortAndBindOptions>
473471
{
474472
public SortAndBindOptions() { }
475473
public int InitialCapacity { get; init; }
@@ -1344,10 +1342,6 @@ namespace DynamicData
13441342
public static System.IObservable<DynamicData.IChangeSet<TObject, TKey>> FilterOnObservable<TObject, TKey>(this System.IObservable<DynamicData.IChangeSet<TObject, TKey>> source, System.Func<TObject, TKey, System.IObservable<bool>> filterFactory, System.TimeSpan? buffer = default, System.Reactive.Concurrency.IScheduler? scheduler = null)
13451343
where TObject : notnull
13461344
where TKey : notnull { }
1347-
[System.Obsolete("Use AutoRefresh(), followed by Filter() instead")]
1348-
public static System.IObservable<DynamicData.IChangeSet<TObject, TKey>> FilterOnProperty<TObject, TKey, TProperty>(this System.IObservable<DynamicData.IChangeSet<TObject, TKey>> source, System.Linq.Expressions.Expression<System.Func<TObject, TProperty>> propertySelector, System.Func<TObject, bool> predicate, System.TimeSpan? propertyChangedThrottle = default, System.Reactive.Concurrency.IScheduler? scheduler = null)
1349-
where TObject : System.ComponentModel.INotifyPropertyChanged
1350-
where TKey : notnull { }
13511345
[System.Obsolete("This can cause unhandled exception issues so do not use")]
13521346
public static System.IObservable<T> FinallySafe<T>(this System.IObservable<T> source, System.Action finallyAction) { }
13531347
public static System.IObservable<DynamicData.Change<TObject, TKey>> Flatten<TObject, TKey>(this System.IObservable<DynamicData.IChangeSet<TObject, TKey>> source)
@@ -2528,7 +2522,6 @@ namespace DynamicData
25282522
public static System.IObservable<DynamicData.IChangeSet<T>> Xor<T>(this System.IObservable<DynamicData.IChangeSet<T>> source, params System.IObservable<DynamicData.IChangeSet<T>>[] others)
25292523
where T : notnull { }
25302524
}
2531-
public static class ObsoleteEx { }
25322525
public class PageContext<TObject> : System.IEquatable<DynamicData.PageContext<TObject>>
25332526
{
25342527
public PageContext(DynamicData.Operators.IPageResponse Response, System.Collections.Generic.IComparer<TObject> Comparer, DynamicData.SortAndPageOptions Options) { }

src/DynamicData.Tests/Cache/FilterOnPropertyFixture.cs

Lines changed: 0 additions & 80 deletions
This file was deleted.

src/DynamicData.Tests/DynamicData.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="MSBuild.Sdk.Extras">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFrameworks>net9.0</TargetFrameworks>
44
<NoWarn>$(NoWarn);CS0618;CA1801;CA1812;CA1816;CA1062;CA1063;CS8767;CS8602;CS8618;IDE1006</NoWarn>
@@ -11,7 +11,7 @@
1111

1212
<ItemGroup>
1313
<PackageReference Include="Bogus" Version="35.*" />
14-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.*" />
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" />
1515
<PackageReference Include="xunit" Version="$(XunitVersion)" />
1616
<PackageReference Include="xunit.runner.console" Version="$(XunitVersion)" />
1717
<PackageReference Include="xunit.runner.visualstudio" Version="3.*" />

src/DynamicData.sln

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.0.31808.319
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.1.11312.151 d18.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamicData", "DynamicData\DynamicData.csproj", "{FE903921-6C55-40E3-9A16-4127ECACC12C}"
77
EndProject
@@ -12,7 +12,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".other", ".other", "{DFCC45
1212
..\.github\workflows\ci-build.yml = ..\.github\workflows\ci-build.yml
1313
Directory.Build.props = Directory.Build.props
1414
Directory.Build.targets = Directory.Build.targets
15-
global.json = global.json
1615
..\nuget.config = ..\nuget.config
1716
..\README.md = ..\README.md
1817
..\.github\workflows\release.yml = ..\.github\workflows\release.yml

src/DynamicData/Aggregation/AggregateEnumerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2011-2023 Roland Pheasant. All rights reserved.
1+
// Copyright (c) 2011-2025 Roland Pheasant. All rights reserved.
22
// Roland Pheasant licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for full license information.
44

src/DynamicData/Aggregation/AggregateItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2011-2023 Roland Pheasant. All rights reserved.
1+
// Copyright (c) 2011-2025 Roland Pheasant. All rights reserved.
22
// Roland Pheasant licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for full license information.
44

0 commit comments

Comments
 (0)