-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #404 from runceel/main
Release pre-v9.0.0
- Loading branch information
Showing
90 changed files
with
4,853 additions
and
722 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
- 'docs/**' | ||
|
||
env: | ||
DOTNET_VERSION: 6.0.x | ||
DOTNET_VERSION: 7.0.x | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
branches: [ main ] | ||
|
||
env: | ||
DOTNET_VERSION: 6.0.x | ||
DOTNET_VERSION: 7.0.x | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
using System; | ||
using System.Reactive.Subjects; | ||
using BenchmarkDotNet.Attributes; | ||
using Reactive.Bindings; | ||
using Reactive.Bindings.Extensions; | ||
|
||
namespace ReactivePropertyBenchmark; | ||
|
||
public partial class BasicUsages | ||
{ | ||
[Benchmark] | ||
public ReactiveCommand CreateReactiveCommand() => new ReactiveCommand(); | ||
|
||
[Benchmark] | ||
public ReactiveCommandSlim CreateReactiveCommandSlim() => new ReactiveCommandSlim(); | ||
|
||
|
||
|
||
[Benchmark] | ||
public ReactiveCommand BasicUsecaseForReactiveCommand() | ||
{ | ||
var subject = new Subject<bool>(); | ||
var cmd = subject.ToReactiveCommand(); | ||
cmd.Subscribe(x => { }); | ||
cmd.Execute(); | ||
subject.OnNext(true); | ||
cmd.Execute(); | ||
return cmd; | ||
} | ||
|
||
[Benchmark] | ||
public ReactiveCommandSlim BasicUsecaseForReactiveCommandSlim() | ||
{ | ||
var subject = new Subject<bool>(); | ||
var cmd = subject.ToReactiveCommandSlim(); | ||
cmd.Subscribe(x => { }); | ||
cmd.Execute(); | ||
subject.OnNext(true); | ||
cmd.Execute(); | ||
return cmd; | ||
} | ||
|
||
[Benchmark] | ||
public ReactiveProperty<string> ReactivePropertyValidation() | ||
{ | ||
var rp = new ReactiveProperty<string>("") | ||
.SetValidateNotifyError(x => string.IsNullOrEmpty(x) ? "invalid" : null); | ||
rp.Value = "xxx"; // valid | ||
rp.Value = ""; // invalid | ||
return rp; | ||
} | ||
|
||
[Benchmark] | ||
public ValidatableReactiveProperty<string> ValidatableReactivePropertyValidation() | ||
{ | ||
var rp = ValidatableReactiveProperty.CreateFromValidationLogic( | ||
"", | ||
x => string.IsNullOrEmpty(x) ? "invalid" : null); | ||
rp.Value = "xxx"; // valid | ||
rp.Value = ""; // invalid | ||
return rp; | ||
} | ||
|
||
[Benchmark] | ||
public IObservable<string> ObservePropertyLegacy() | ||
{ | ||
var p = new Person(); | ||
return p.ObservePropertyLegacy(x => x.Name); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using BenchmarkDotNet.Running; | ||
using BenchmarkDotNet.Running; | ||
|
||
namespace ReactivePropertyBenchmark | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) => | ||
BenchmarkRunner.Run(typeof(Program).Assembly); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<LUTConfig Version="1.0"> | ||
<Repository /> | ||
<ParallelBuilds>true</ParallelBuilds> | ||
<ParallelTestRuns>true</ParallelTestRuns> | ||
<TestCaseTimeout>180000</TestCaseTimeout> | ||
</LUTConfig> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.