Skip to content

Instantly share code, notes, and snippets.

View MartonBoda's full-sized avatar

Márton Boda MartonBoda

View GitHub Profile

Advanced

editorconfig name possible values
dotnet_sort_system_directives_first true , false

Indentation Options

editorconfig name possible values
csharp_indent_block_contents true , false
csharp_indent_braces true , false
@staltz
staltz / introrx.md
Last active April 19, 2024 09:27
The introduction to Reactive Programming you've been missing
@ToJans
ToJans / fpexplained.cs
Last active July 25, 2020 04:02
This is a C# implementation showing what functors, applicatives and monads look like.
using System;
namespace FPExplained
{
// This is a C# implementation showing what functors, applicatives and monads look like.
//
// ----><8-----------------------------------
// UPDATE:
// ***********************************
// For a maybe monad, all these constructs look a bit redundant; their reason of existance is more obvious
@niik
niik / RetryWithBackOffStrategy.cs
Last active October 2, 2021 01:42
An Rx retry operator with a customizable back off strategy.
// Licensed under the MIT license with <3 by GitHub
/// <summary>
/// An exponential back off strategy which starts with 1 second and then 4, 9, 16...
/// </summary>
[SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
public static readonly Func<int, TimeSpan> ExponentialBackoff = n => TimeSpan.FromSeconds(Math.Pow(n, 2));
/// <summary>
/// Returns a cold observable which retries (re-subscribes to) the source observable on error up to the