https://github.com/danielearwicker/eventless
Functional Reactive Programming for .NET and XAML/WPF
https://github.com/danielearwicker/eventless
Last synced: about 1 year ago
JSON representation
Functional Reactive Programming for .NET and XAML/WPF
- Host: GitHub
- URL: https://github.com/danielearwicker/eventless
- Owner: danielearwicker
- Created: 2013-02-28T10:28:07.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2016-12-24T20:59:42.000Z (over 9 years ago)
- Last Synced: 2025-03-26T15:47:59.327Z (about 1 year ago)
- Language: C#
- Homepage:
- Size: 95.7 KB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# eventless
*Functional Reactive Programming for .NET and WPF/XAML*
# Installation
Install-Package Eventless
# Documentation
The assembly, `Eventless.dll`, is fully documented for Visual Studio auto-completion.
[Browse the documentation](http://earwicker.com/eventless/)
# Quick Start
All the facilities are in the `Eventless` namespace:
```csharp
using Eventless;
```
You can create a model that mixes mutable data and computed (immutable) data like this:
```csharp
public class Person
{
public IMutable FirstName { get; } = Mutable.From(string.Empty);
public IMutable LastName { get; } = Mutable.From(string.Empty);
public IImmutable FullName { get; }
public Person()
{
FullName = Computed.From(() => $"{FirstName.Value} {LastName.Value}");
}
}
```
This can then be used as the view model of a simple window (note that you have to bind to the `Value` property in the binding expressions).
```xaml
First name
Last name
Full name
```
# Compatibility
At the moment `Eventless` is built for old-school WPF as a .NET 4.5 assembly. But I'm interested in seeing how it fits with Universal Windows Platform. Anyone with experience of that platform is encouraged to investigate and send me a pull request!
# MIT License
https://opensource.org/licenses/MIT
Copyright (c) 2013-2016 Daniel Earwicker