This file contains hidden or 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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>netcoreapp2.0</TargetFramework> | |
</PropertyGroup> | |
<!-- https://stackoverflow.com/questions/15858710/how-concatenate-files-in-msbuild-and-preserve-tabs-and-spaces --> | |
<Target Name="ConcatenateScripts" AfterTargets="Build"> | |
<ItemGroup> | |
<ConcatFiles Include="@(Compile)" /> | |
<ConcatFiles Remove="obj/**/*.cs" /> |
This file contains hidden or 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
int original = 42; | |
decltype(original) copy = original; | |
decltype((original)) reference = original; | |
original = 1729; | |
std::cout << copy << std::endl; // 42 | |
std::cout << reference << std::endl; // 1729 |
This file contains hidden or 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 Machinery | |
{ | |
abstract class StateBase<TInput> | |
{ | |
public event EventHandler<TInput> InputRequested; | |
public virtual void Enter(StateBase<TInput> oldState, TInput input) { } | |
public virtual void Exit(StateBase<TInput> newState, TInput input) { } | |
public abstract ReactionBase<TInput> React(TInput input); | |
} |
This file contains hidden or 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
{ | |
{ | |
{ | |
{ | |
Tabs are amazing. | |
} | |
} | |
} | |
} |
This file contains hidden or 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 Squisqula | |
{ | |
public sealed class Promise<T> | |
{ | |
public void SetResult(T result) | |
{ | |
_result = new T[] { result }; | |
var handler = Completed; |
This file contains hidden or 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 /*non-sealed*/ class Foo : IDisposable | |
{ | |
public /*implicitly sealed*/ void Dispose() | |
{ | |
Console.WriteLine("Disposing Foo managed resources."); | |
DisposeFooCore(); | |
} | |
protected virtual void DisposeFooCore() { } |
This file contains hidden or 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 Squisqula | |
{ | |
public class Future<T> | |
{ | |
public bool IsCompleted { get { return _isCompleted; } } | |
public T Result | |
{ |