This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface LoadStarted { type: 'STARTED'; } | |
interface LoadComplete<TResult> { type: 'COMPLETE'; result: TResult; } | |
interface LoadFailed { type: 'FAILED'; error: any; } | |
type LoadAction<TResult> = LoadStarted | LoadComplete<TResult> | LoadFailed; | |
type AsyncFunction<TResult> = () => Promise<TResult>; | |
interface State<TResult> { | |
isLoading: boolean; | |
result?: TResult; | |
error?: any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -vv | %{$_.trim()} | ?{$_ -match 'origin/([a-zA-Z\-]+): gone'} | %{git branch -D $Matches[1]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// One |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyD3Component { | |
constructor(targetElement: HTMLElement) { | |
//create some resources that need to be cleaned up | |
const observer = new MutationObserver(mutations => { | |
//get a flattened list of all removed elements | |
const removedElements = mutations.map(m => m.removedNodes) | |
.reduce((a, b) => a.concat(Array.prototype.slice.apply(b)), []); | |
//dispose if my target element was removed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyD3Component { | |
constructor(targetElement: HTMLElement) { | |
//create some resources that need to be cleaned up | |
} | |
dispose() { | |
//clean up my resources | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyD3Component { | |
private observer: MutationObserver; | |
constructor(targetElement: HTMLElement) { | |
//create some resources that need to be cleaned up | |
this.observer = new MutationObserver(mutations => { | |
//get a flattened list of all removed elements | |
const removedElements = mutations.map(m => m.removedNodes) | |
.reduce((a, b) => a.concat(Array.prototype.slice.apply(b)), []); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using NUnit.Framework; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace nCrunchBugRepro | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Attachment | |
{ | |
/// <summary> | |
/// Gets the unique identifier for this attachment. | |
/// </summary> | |
public Guid Id { get; set; } | |
/// <summary> | |
/// Gets the file name for this attachment. | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// A converter class used to return conditional values based on the binding value. | |
/// </summary> | |
public class When : MarkupExtension, IValueConverter | |
{ | |
#region Public Properties | |
/// <summary> | |
/// Gets or sets the value to which the resolved value will be compared. | |
/// </summary> | |
/// <value> |