Skip to content

Instantly share code, notes, and snippets.

@jennings

jennings/rx-net-vs-rxjs.md

Last active Dec 19, 2019
Embed
What would you like to do?
A cheatsheet of Rx.NET to rxjs operators

Creation

System.Reactive rxjs 6
Observable.Return import { of } from "rxjs"
Observable.Empty import { EMPTY } from "rxjs"
Observable.Never import { NEVER } from "rxjs"
Observable.Throw import { throwError } from "rxjs"
Observable.Create new Observable(observer => {})
Observable.Range import { range } from "rxjs"
Observable.Generate import { generate } from "rxjs"
Observable.Interval import { interval } from "rxjs"
Observable.Timer import { timer } from "rxjs"

Reduction

System.Reactive rxjs 6
.Where import { filter } from "rxjs/operators"
.Distinct import { distinct } from "rxjs/operators"
.DistinctUntilChanged import { distinctUntilChanged, distinctUntilKeyChanged } from "rxjs/operators"
.IgnoreElements import { ignoreElements } from "rxjs/operators"
.Skip, .Take import { skip, take } from "rxjs/operators"
.SkipWhile, .TakeWhile import { } from "rxjs/operators"
.SkipLast, .TakeLast import { skipLast } from "rxjs/operators"
.SkipUntil, .TakeUntil import { skipUntil } from "rxjs/operators"

Inspection

System.Reactive rxjs 6
.Any
.All
.Contains
.DefaultIfEmpty
.ElementAt
.SequenceEqual

Aggregation

System.Reactive rxjs 6
.Count
.Min
.Max
.Sum
.Average
.First
.Last
.Single
.Aggregate
.Scan
.MinBy, .MaxBy
.GroupBy

Combining sequences

System.Reactive rxjs 6
.Switch import { switchAll } from "rxjs/operators"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.