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
namespace Your_Project | |
{ | |
using System.Collections.Generic; | |
static public class Utility | |
{ | |
/// <summary> | |
/// Extension method yields the given value verbatim allowing it to be used in an enumerable context. | |
/// USAGE: 1.YieldValue() | |
/// EXAMPLE: listOfNumbers.Union(1.YieldValue()); // using System.Linq |
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
// Run this script before any others. | |
// Polyfill: provides a missing console and empty implementations for its missing methods. | |
(function(disable) { | |
if (!window.console) window.console = { }; | |
var methods = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; | |
for (var i = 0; i < methods.length; i++) { | |
if (disable || !console[methods[i]]) { | |
console[methods[i]] = function () { }; | |
} | |
} |