Skip to content

Commit 06950d9

Browse files
authored
Fix for DynamicData version 9 (#691)
closes #679
1 parent bf3f6dd commit 06950d9

File tree

13 files changed

+36
-48
lines changed

13 files changed

+36
-48
lines changed

samples/Directory.build.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<Project>
22
<PropertyGroup>
33
<Nullable>enable</Nullable>
4-
<AvaloniaVersion>11.0.10</AvaloniaVersion>
4+
<AvaloniaVersion>11.1.3</AvaloniaVersion>
55
<WarningsAsErrors>CS8600;CS8602;CS8603;CS8604;CS8605;CS8606;CS8607;CS8608;CS8609;CS8610;CS8611;CS8612;CS8613;CS8614;CS8615;CS8616;CS8617;CS8618;CS8619;CS8620;CS8621;CS8622;CS8623;CS8624;CS8625</WarningsAsErrors>
66
</PropertyGroup>
77
<ItemGroup>
88
<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.556" PrivateAssets="all" />
9-
<PackageReference Include="Roslynator.Analyzers" Version="4.12.4" PrivateAssets="All" />
9+
<PackageReference Include="Roslynator.Analyzers" Version="4.12.5" PrivateAssets="All" />
1010
</ItemGroup>
1111
<ItemGroup>
1212
<AdditionalFiles Include="$(MSBuildThisFileDirectory)..\src\stylecop.json" Link="stylecop.json" />

samples/LoginApp.Avalonia.Desktop/LoginApp.Avalonia.Desktop.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<OutputType>WinExe</OutputType>
44
<!--If you are willing to use Windows/MacOS native APIs you will need to create 3 projects.
55
One for Windows with net7.0-windows TFM, one for MacOS with net7.0-macos and one with net7.0 TFM for Linux.-->
6-
<TargetFramework>net7.0</TargetFramework>
6+
<TargetFramework>net8.0</TargetFramework>
77
<Nullable>enable</Nullable>
88
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
99
<ApplicationManifest>app.manifest</ApplicationManifest>

samples/LoginApp.Avalonia/LoginApp.Avalonia.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net7.0</TargetFramework>
3+
<TargetFramework>net8.0</TargetFramework>
44
<Nullable>enable</Nullable>
55
<LangVersion>latest</LangVersion>
66
</PropertyGroup>

samples/LoginApp.WinForms/LoginApp.WinForms.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
4+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
55
<UseWindowsForms>true</UseWindowsForms>
66
</PropertyGroup>
77

samples/LoginApp.Wpf/LoginApp.Wpf.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
44
<StartupObject>LoginApp.Wpf.Program</StartupObject>
5-
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
5+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
66
<UseWpf>true</UseWpf>
77
<SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion>
88
<EnableNETAnalyzers>True</EnableNETAnalyzers>

samples/LoginApp/FodyWeavers.xml

-4
This file was deleted.

samples/LoginApp/LoginApp.csproj

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
<CodeAnalysisRuleSet />
1111
</PropertyGroup>
1212
<ItemGroup>
13-
<PackageReference Include="ReactiveUI.Fody" Version="19.*" />
13+
<PackageReference Include="Polyfill" Version="6.9.0">
14+
<PrivateAssets>all</PrivateAssets>
15+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
16+
</PackageReference>
17+
<PackageReference Include="ReactiveUI.SourceGenerators" Version="1.1.31" PrivateAssets="all" />
1418
</ItemGroup>
1519
<ItemGroup>
1620
<ProjectReference Include="..\..\src\ReactiveUI.Validation\ReactiveUI.Validation.csproj" />

samples/LoginApp/ViewModels/SignUpViewModel.cs

+20-20
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
using System.Threading.Tasks;
1212
using LoginApp.Services;
1313
using ReactiveUI;
14-
using ReactiveUI.Fody.Helpers;
14+
using ReactiveUI.SourceGenerators;
1515
using ReactiveUI.Validation.Extensions;
1616
using ReactiveUI.Validation.Helpers;
1717
using ReactiveUI.Validation.States;
@@ -22,12 +22,30 @@ namespace LoginApp.ViewModels;
2222
/// <summary>
2323
/// A view model which shows controls to create an account.
2424
/// </summary>
25-
public class SignUpViewModel : ReactiveValidationObject, IRoutableViewModel, IActivatableViewModel
25+
public partial class SignUpViewModel : ReactiveValidationObject, IRoutableViewModel, IActivatableViewModel
2626
{
2727
private readonly ObservableAsPropertyHelper<bool> _isBusy;
2828
private readonly IUserDialogs? _dialogs;
2929
private readonly CompositeDisposable _disposables = [];
3030

31+
/// <summary>
32+
/// Gets or sets the typed <see cref="UserName"/>.
33+
/// </summary>
34+
[Reactive]
35+
private string _userName = string.Empty;
36+
37+
/// <summary>
38+
/// Gets or sets the typed <see cref="Password"/>.
39+
/// </summary>
40+
[Reactive]
41+
private string _password = string.Empty;
42+
43+
/// <summary>
44+
/// Gets or sets the typed <see cref="ConfirmPassword"/>.
45+
/// </summary>
46+
[Reactive]
47+
private string _confirmPassword = string.Empty;
48+
3149
/// <summary>
3250
/// Initializes a new instance of the <see cref="SignUpViewModel"/> class.
3351
/// </summary>
@@ -106,24 +124,6 @@ public SignUpViewModel(IScreen? hostScreen = null, IUserDialogs? dialogs = null)
106124
.DisposeWith(_disposables);
107125
}
108126

109-
/// <summary>
110-
/// Gets or sets the typed <see cref="UserName"/>.
111-
/// </summary>
112-
[Reactive]
113-
public string UserName { get; set; } = string.Empty;
114-
115-
/// <summary>
116-
/// Gets or sets the typed <see cref="Password"/>.
117-
/// </summary>
118-
[Reactive]
119-
public string Password { get; set; } = string.Empty;
120-
121-
/// <summary>
122-
/// Gets or sets the typed <see cref="ConfirmPassword"/>.
123-
/// </summary>
124-
[Reactive]
125-
public string ConfirmPassword { get; set; } = string.Empty;
126-
127127
/// <summary>
128128
/// Gets a value indicating whether the form is currently validating asynchronously.
129129
/// </summary>

src/ReactiveUI.Validation.Tests/ReactiveUI.Validation.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
55
<NoWarn>$(NoWarn);1591;CA1707;SA1633</NoWarn>
66
</PropertyGroup>
77

src/ReactiveUI.Validation/Components/ObservableValidationBase{TViewModel,TValue}.cs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
using System;
77
using System.Collections.Generic;
8-
using System.Diagnostics.CodeAnalysis;
98
using System.Linq;
109
using System.Linq.Expressions;
1110
using System.Reactive.Disposables;

src/ReactiveUI.Validation/Components/ObservableValidation{TViewModel,TValue}.cs

-9
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,7 @@
44
// See the LICENSE file in the project root for full license information.
55

66
using System;
7-
using System.Collections.Generic;
8-
using System.Diagnostics.CodeAnalysis;
9-
using System.Linq;
10-
using System.Linq.Expressions;
11-
using System.Reactive.Disposables;
12-
using System.Reactive.Linq;
13-
using System.Reactive.Subjects;
147
using ReactiveUI.Validation.Collections;
15-
using ReactiveUI.Validation.Components.Abstractions;
16-
using ReactiveUI.Validation.Extensions;
178
using ReactiveUI.Validation.States;
189

1910
namespace ReactiveUI.Validation.Components;

src/ReactiveUI.Validation/ReactiveUI.Validation.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net7.0-android;net7.0-ios;net7.0-tvos;net7.0-macos;net7.0-maccatalyst;net8.0;net8.0-android;net8.0-ios;net8.0-tvos;net8.0-macos;net8.0-maccatalyst</TargetFrameworks>
5-
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462;net472;net6.0-windows10.0.17763.0;net7.0-windows10.0.17763.0;net8.0-windows10.0.17763.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;net6.0;net8.0;net8.0-android;net8.0-ios;net8.0-tvos;net8.0-macos;net8.0-maccatalyst</TargetFrameworks>
5+
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462;net472;net6.0-windows10.0.17763.0;net8.0-windows10.0.17763.0</TargetFrameworks>
66
<NoWarn>$(NoWarn);CS1591</NoWarn>
77
<Nullable>enable</Nullable>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="ReactiveUI" Version="20.1.1" />
11+
<PackageReference Include="ReactiveUI" Version="20.1.52" />
1212
</ItemGroup>
1313

1414
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard')) or $(TargetFramework.StartsWith('net4'))">

src/ReactiveUI.Validation/ValidationBindings/Abstractions/IValidationBinding.cs

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,4 @@ namespace ReactiveUI.Validation.ValidationBindings.Abstractions;
1010
/// <summary>
1111
/// A validation binding component.
1212
/// </summary>
13-
public interface IValidationBinding : IDisposable
14-
{
15-
}
13+
public interface IValidationBinding : IDisposable;

0 commit comments

Comments
 (0)