Skip to content

Commit 6a7f56f

Browse files
committed
chore: refactor
1 parent 2267832 commit 6a7f56f

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

reference/Counter/XAML-MVUX/Counter/Countable.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
namespace Counter;
22

3+
internal partial record Countable(int Count, int Step)
4+
{
5+
public Countable Increment() => this with
6+
{
7+
Count = Count + Step
8+
};
9+
}
10+
311
internal partial record MainModel
412
{
513
public IState<Countable> Countable => State.Value(this, () => new Countable(0, 1));
614

7-
public ValueTask IncrementCommand() =>
8-
Countable.Update(c => c?.Increment(), CancellationToken.None);
15+
public ValueTask IncrementCommand()
16+
=> Countable.Update(c => c?.Increment(), CancellationToken.None);
917
}

0 commit comments

Comments
 (0)