Skip to content

Instantly share code, notes, and snippets.

@Steell
Steell / ReactiveUndoRedoSamples.cs
Last active August 29, 2015 14:08
ReactiveUndoRedoRecorder sample
using System;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;
public static void Example()
{
// Subjects and functions for performing undos and redos
Subject<Unit> undoSubject = new Subject<Unit>();
Subject<Unit> redoSubject = new Subject<Unit>();
@Steell
Steell / ReactiveUndoRedoRecorder.cs
Last active April 30, 2018 14:47
Rx Implementation of an Undo/Redo Recorder.
using System;
using System.Collections.Immutable;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;
namespace Steellworks.Rx.UndoRedo
{
/// <summary>
/// Defines properties for fetching a value and its inverse.