Skip to content

Instantly share code, notes, and snippets.

View leeoades's full-sized avatar

Lee Oades leeoades

View GitHub Profile
{
"meta": { "theme": "kendall" },
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Lee Oades",
"label": "Software Developer and Consultant // Lee Oades Consulting Ltd",
"image": "https://avatars2.githubusercontent.com/u/2321091?s=800",
"email": "lee.oades@gmail.com",
"phone":"+44 (0)7946 233 130",
"url": "https://registry.jsonresume.org/leeoades",
@leeoades
leeoades / PausableObservableTests
Created December 17, 2012 12:29
Unit Tests for Pausable Observable
namespace Stuff
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using Core.Extensions;
using Microsoft.Reactive.Testing;
using NUnit.Framework;
@leeoades
leeoades / Pausable Observable
Created December 17, 2012 12:27
Pause an RX stream
public static IObservable<T> Pausable<T>(
this IObservable<T> sourceStream,
IObservable<bool> isPausedStream,
bool startPaused = false)
{
return Observable.Create<T>(o =>
{
var subscriptions = new SerialDisposable();
var replaySubjects = new SerialDisposable();
@leeoades
leeoades / Cache.cs
Created November 20, 2012 00:03
An Observable Cache
using System;
using System.Reactive.Concurrency;
using System.Reactive.Linq;
using System.Reactive.Subjects;
namespace Stuff
{
public class Cache<T> : IDisposable
{
private readonly IConnectableObservable<T> _source;