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 System; | |
using System.Threading; | |
namespace ThreadPoolExercises.Core | |
{ | |
public class ThreadingHelpers | |
{ | |
public static void ExecuteOnThread(Action action, int repeats, CancellationToken token = default, Action<Exception>? errorAction = null) | |
{ | |
// * Create a thread and execute there `action` given number of `repeats` - waiting for the execution! |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Ninject; | |
namespace ConsoleApplication5 | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) |
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
(function() { | |
// A function that's using https://github.com/kpdecker/jsdiff to display a | |
// difference between two strings in a console. | |
// Tested on latest versions of Firebug and Chrome Developer Tools. | |
// Developer tools in IE 10 and below don't support CSS styles in console. | |
var consoleDiff = function (first, second, diffType) { | |
var normalStyle = 'color: black; background-color: white; text-decoration: none;', | |
addStyle = 'color: #406619; background-color: #eaf2c2; text-decoration: none;', | |
removeStyle = 'color: #b30000; background-color: #fadad7; text-decoration: line-through;', | |
text = '', |