mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Fix for Reactive Example, update packages (#3232)
This commit is contained in:
@@ -3,7 +3,6 @@ using System.Reactive;
|
||||
using System.Reactive.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text;
|
||||
using ReactiveUI;
|
||||
using ReactiveUI.Fody.Helpers;
|
||||
|
||||
@@ -34,8 +33,8 @@ namespace ReactiveExample {
|
||||
!string.IsNullOrEmpty (password));
|
||||
|
||||
_isValid = canLogin.ToProperty (this, x => x.IsValid);
|
||||
Login = ReactiveCommand.CreateFromTask (
|
||||
() => Task.Delay (TimeSpan.FromSeconds (1)),
|
||||
Login = ReactiveCommand.CreateFromTask<EventArgs> (
|
||||
e => Task.Delay (TimeSpan.FromSeconds (1)),
|
||||
canLogin);
|
||||
|
||||
_usernameLength = this
|
||||
@@ -47,7 +46,7 @@ namespace ReactiveExample {
|
||||
.Select (password => password.Length)
|
||||
.ToProperty (this, x => x.PasswordLength);
|
||||
|
||||
Clear = ReactiveCommand.Create (() => { });
|
||||
Clear = ReactiveCommand.Create<EventArgs> (e => { });
|
||||
Clear.Subscribe (unit => {
|
||||
Username = string.Empty;
|
||||
Password = string.Empty;
|
||||
@@ -67,10 +66,10 @@ namespace ReactiveExample {
|
||||
public int PasswordLength => _passwordLength.Value;
|
||||
|
||||
[IgnoreDataMember]
|
||||
public ReactiveCommand<Unit, Unit> Login { get; }
|
||||
public ReactiveCommand<EventArgs, Unit> Login { get; }
|
||||
|
||||
[IgnoreDataMember]
|
||||
public ReactiveCommand<Unit, Unit> Clear { get; }
|
||||
public ReactiveCommand<EventArgs, Unit> Clear { get; }
|
||||
|
||||
[IgnoreDataMember]
|
||||
public bool IsValid => _isValid.Value;
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<InformationalVersion>2.0</InformationalVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ReactiveUI.Fody" Version="19.5.39" />
|
||||
<PackageReference Include="ReactiveUI" Version="19.5.39" />
|
||||
<PackageReference Include="ReactiveUI.Fody" Version="19.5.41" />
|
||||
<PackageReference Include="ReactiveUI" Version="19.5.41" />
|
||||
<PackageReference Include="ReactiveMarbles.ObservableEvents.SourceGenerator" Version="1.3.1" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user