Skip to content

Commit

Permalink
Fix for DynamicData version 9 (#691)
Browse files Browse the repository at this point in the history
closes #679
  • Loading branch information
ChrisPulman authored Sep 20, 2024
1 parent bf3f6dd commit 06950d9
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 48 deletions.
4 changes: 2 additions & 2 deletions samples/Directory.build.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<AvaloniaVersion>11.0.10</AvaloniaVersion>
<AvaloniaVersion>11.1.3</AvaloniaVersion>
<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>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.556" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" Version="4.12.4" PrivateAssets="All" />
<PackageReference Include="Roslynator.Analyzers" Version="4.12.5" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)..\src\stylecop.json" Link="stylecop.json" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<OutputType>WinExe</OutputType>
<!--If you are willing to use Windows/MacOS native APIs you will need to create 3 projects.
One for Windows with net7.0-windows TFM, one for MacOS with net7.0-macos and one with net7.0 TFM for Linux.-->
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
Expand Down
2 changes: 1 addition & 1 deletion samples/LoginApp.Avalonia/LoginApp.Avalonia.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/LoginApp.WinForms/LoginApp.WinForms.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion samples/LoginApp.Wpf/LoginApp.Wpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<StartupObject>LoginApp.Wpf.Program</StartupObject>
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<UseWpf>true</UseWpf>
<SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
Expand Down
4 changes: 0 additions & 4 deletions samples/LoginApp/FodyWeavers.xml

This file was deleted.

6 changes: 5 additions & 1 deletion samples/LoginApp/LoginApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
<CodeAnalysisRuleSet />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ReactiveUI.Fody" Version="19.*" />
<PackageReference Include="Polyfill" Version="6.9.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="ReactiveUI.SourceGenerators" Version="1.1.31" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\ReactiveUI.Validation\ReactiveUI.Validation.csproj" />
Expand Down
40 changes: 20 additions & 20 deletions samples/LoginApp/ViewModels/SignUpViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using System.Threading.Tasks;
using LoginApp.Services;
using ReactiveUI;
using ReactiveUI.Fody.Helpers;
using ReactiveUI.SourceGenerators;
using ReactiveUI.Validation.Extensions;
using ReactiveUI.Validation.Helpers;
using ReactiveUI.Validation.States;
Expand All @@ -22,12 +22,30 @@ namespace LoginApp.ViewModels;
/// <summary>
/// A view model which shows controls to create an account.
/// </summary>
public class SignUpViewModel : ReactiveValidationObject, IRoutableViewModel, IActivatableViewModel
public partial class SignUpViewModel : ReactiveValidationObject, IRoutableViewModel, IActivatableViewModel
{
private readonly ObservableAsPropertyHelper<bool> _isBusy;
private readonly IUserDialogs? _dialogs;
private readonly CompositeDisposable _disposables = [];

/// <summary>
/// Gets or sets the typed <see cref="UserName"/>.
/// </summary>
[Reactive]
private string _userName = string.Empty;

/// <summary>
/// Gets or sets the typed <see cref="Password"/>.
/// </summary>
[Reactive]
private string _password = string.Empty;

/// <summary>
/// Gets or sets the typed <see cref="ConfirmPassword"/>.
/// </summary>
[Reactive]
private string _confirmPassword = string.Empty;

/// <summary>
/// Initializes a new instance of the <see cref="SignUpViewModel"/> class.
/// </summary>
Expand Down Expand Up @@ -106,24 +124,6 @@ public SignUpViewModel(IScreen? hostScreen = null, IUserDialogs? dialogs = null)
.DisposeWith(_disposables);
}

/// <summary>
/// Gets or sets the typed <see cref="UserName"/>.
/// </summary>
[Reactive]
public string UserName { get; set; } = string.Empty;

/// <summary>
/// Gets or sets the typed <see cref="Password"/>.
/// </summary>
[Reactive]
public string Password { get; set; } = string.Empty;

/// <summary>
/// Gets or sets the typed <see cref="ConfirmPassword"/>.
/// </summary>
[Reactive]
public string ConfirmPassword { get; set; } = string.Empty;

/// <summary>
/// Gets a value indicating whether the form is currently validating asynchronously.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<NoWarn>$(NoWarn);1591;CA1707;SA1633</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Linq.Expressions;
using System.Reactive.Disposables;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,7 @@
// See the LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Linq.Expressions;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using ReactiveUI.Validation.Collections;
using ReactiveUI.Validation.Components.Abstractions;
using ReactiveUI.Validation.Extensions;
using ReactiveUI.Validation.States;

namespace ReactiveUI.Validation.Components;
Expand Down
6 changes: 3 additions & 3 deletions src/ReactiveUI.Validation/ReactiveUI.Validation.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<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>
<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>
<TargetFrameworks>netstandard2.0;net6.0;net8.0;net8.0-android;net8.0-ios;net8.0-tvos;net8.0-macos;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462;net472;net6.0-windows10.0.17763.0;net8.0-windows10.0.17763.0</TargetFrameworks>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ReactiveUI" Version="20.1.1" />
<PackageReference Include="ReactiveUI" Version="20.1.52" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard')) or $(TargetFramework.StartsWith('net4'))">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ namespace ReactiveUI.Validation.ValidationBindings.Abstractions;
/// <summary>
/// A validation binding component.
/// </summary>
public interface IValidationBinding : IDisposable
{
}
public interface IValidationBinding : IDisposable;

0 comments on commit 06950d9

Please sign in to comment.