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.CodeDom.Compiler; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Reflection; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Xunit; | |
using Xunit.Abstractions; |
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; | |
namespace Immutable | |
{ | |
enum Qux { Qux1, Qux2 } | |
class Baz | |
{ | |
public Baz(Qux qux) | |
{ |
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; | |
namespace Immutable | |
{ | |
enum Qux { Qux1, Qux2 } | |
static class Option | |
{ | |
public static Option<T> Value<T>(T value) | |
{ |
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
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'"> | |
<DefineConstants>$(DefineConstants);VS_10;</DefineConstants> | |
</PropertyGroup> |
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.Net.Http; | |
using System.Threading.Tasks; | |
using Xunit; | |
public class Fixture | |
{ | |
[Fact] | |
public void Should_FactMethodName() |
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 TestExceptions | |
{ | |
/// <summary> | |
/// Wrapper around a standard synchronization context, that catches any unhandled exceptions. | |
/// Acts as a facade passing calls to the original SynchronizationContext | |
/// </summary> | |
/// <example> |
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
[TestMethod] | |
public void OneLiner() | |
{ | |
Func<bool[], int, bool[]> gameOfLife = | |
(cells, width) => | |
cells.Select((cell, index) => | |
// Neighbours | |
new | |
{ |