https://github.com/reactivemarbles/mvvm
A light weight core package for Reactive Marbles to introduce MVVM abstractions
https://github.com/reactivemarbles/mvvm
Last synced: 8 months ago
JSON representation
A light weight core package for Reactive Marbles to introduce MVVM abstractions
- Host: GitHub
- URL: https://github.com/reactivemarbles/mvvm
- Owner: reactivemarbles
- License: mit
- Created: 2021-08-22T14:47:55.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-09-27T17:35:27.000Z (9 months ago)
- Last Synced: 2025-10-04T02:00:05.716Z (9 months ago)
- Language: C#
- Homepage:
- Size: 332 KB
- Stars: 14
- Watchers: 3
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
 [](https://github.com/reactivemarbles/Mvvm/actions/workflows/ci-build.yml)
# Reactive Marbles Mvvm
A light weight mvvm package for Reactive Marbles to introduce framework abstractions
## NuGet packages
| Name | Platform | NuGet |
| ----------------------------- | ----------------- | -------------------------------- |
| [ReactiveMarbles.Mvvm][Core] | Core - Libary | [![CoreBadge]][Core] |
[Core]: https://www.nuget.org/packages/ReactiveMarbles.Mvvm/
[CoreBadge]: https://img.shields.io/nuget/v/ReactiveMarbles.Mvvm.svg
## Get Started
### Registering Framework Concerns
`ICoreRegistration` gives the framework an understanding of the following concerns for ReactiveMarbles internals. We provide a simple builder and extension method to register it against the `ServiceLocator`.
```csharp
ServiceLocator
.Current()
.AddCoreRegistrations(() =>
CoreRegistrationBuilder
.Create()
.WithMainThreadScheduler(Scheduler.Default)
.WithTaskPoolScheduler(TaskPoolScheduler.Default)
.WithExceptionHandler(new DebugExceptionHandler())
.Build());
```
### AsValue
`AsValue` allows you to bind an `IObservable` to a property that produces a property changed event.
```csharp
_valueChange =
this.WhenChanged(x => x.Property)
.Select(x => x + "Changed")
.AsValue(onChanged: x => RaisePropertyChanged(nameof(ValueChange)));
```
## Benchmarks
To see how Mvvm compares to other frameworks see: [Benchmarks](https://github.com/reactivemarbles/Mvvm/blob/main/src/ReactiveMarbles.Mvvm.Benchmarks/README.MD)