Skip to content

Instantly share code, notes, and snippets.

@runceel
Created June 21, 2019 11:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save runceel/34b10ab65294bd5d1e9fe7f63f00c6e5 to your computer and use it in GitHub Desktop.
Save runceel/34b10ab65294bd5d1e9fe7f63f00c6e5 to your computer and use it in GitHub Desktop.
class ViewModel
{
public ReactiveProperty<string> Input { get; }
public ReactiveProperty<string> Output { get; }
public ViewModel()
{
Input = new ReactiveProperty("");
Output = Input
.Delay(TimeSpan.FromSecond(1)) // Using a Rx method.
.Select(x => x.ToUpper()) // Using a LINQ method.
.ToReactiveProperty(); // Convert to ReactiveProperty
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment