Skip to content

Instantly share code, notes, and snippets.

f(events) -> state
match f(state, event) -> state
f(state, command) -> events
using System;
namespace Procent.DependencyInjection.app
{
public class UsersController
{
private readonly IApp _app;
public UsersController(IApp application)
@abenedykt
abenedykt / iisreset
Last active November 19, 2015 13:16
resetin remote iis :)
REM
REM if this does not work with a server, rcp server might be blocked with the firewal
REM so allow it on a firewall
REM
REM netsh advfirewall firewall add rule name="Remote IIS inetinfo" dir=in action=allow description="Remote IIS Service Managment" program="%systemroot%\System32\inetsrv\inetinfo.exe" enable=yes
REM
REM netsh advfirewall firewall add rule name="COM+ Remote Administration (All Programs)" dir=in action=allow description="" program="%windir%\system32\dllhost.exe" enable=yes localport=RPC protocol=tcp
iisreset zos-srv2
public struct Maybe<T> where T : class
{
public T Value { get; }
public bool HasValue => Value != null;
public bool HasNoValue => !HasValue;
private Maybe(T value)
{
public abstract class StringValueObject<T> where T : StringValueObject<T>
{
public string Value { get; protected set; }
public static bool operator ==(StringValueObject<T> a, StringValueObject<T> b)
{
if (ReferenceEquals(a, b))
{
return true;
}