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> | |
/// thread safe event registration and invoking. | |
/// subscriptions are stored as weakRefs so they can be garbage collected. | |
/// </summary> | |
/// <typeparam name="TEventArgs"></typeparam> | |
public class Event<TEventArgs> where TEventArgs : EventArgs | |
{ | |
private List<WeakReference<EventHandler<TEventArgs>>> _storage = new(); | |
/// <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
//from: https://stackoverflow.com/a/49864522/1115220 re question: https://stackoverflow.com/questions/8165570/https-proxy-server-in-node-js | |
import http = require( 'http' ) | |
const port: number = Number.parseInt( process.env.PORT ) || 9191; | |
import net = require( 'net' ) | |
import url = require( 'url' ) | |
import xlib = require( "xlib" ); |
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
export interface IModuleImport { | |
(authOptions?: IAuthOptions): IGCloud; | |
} | |
export interface IAuthOptions { | |
projectId?: string; | |
keyFilename?: string; | |
} |
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
/** | |
WHAT: A very simple example of redux + redux-simple-router using Typescript. | |
WHY: The official example found here: https://github.com/rackt/redux-simple-router/tree/1.0.2/examples/basic has problems: | |
1) it is spread over many files making it very hard to "skim" | |
2) it is organized by function, not by feature. (Example: learning "how to manipulate redux state" is spread over 5 files in 4 folders) | |
3) there are no comments explaining what's going on/why. | |
WHO: by JasonS@Novaleaf.com |