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 class SomeCommandHandler | |
{ | |
public void Handle(SomeCommand command) | |
{ | |
} | |
} | |
public class UoWWrapper | |
{ | |
public UoWWrapper(Action<object> next) |
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 class SomeCommandHandler | |
{ | |
public SomeCommandhandler(uow){_uow = uow}; | |
public void Handle(SomeCommand command) | |
{ | |
} | |
} | |
public class UoWWrapper |
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 class Bus | |
{ | |
public Dictionary<Type, Action<object>> _handlers = new (); | |
public void Register<T>(Action<T> handler) { _handlers[typeof(T)] = x=> (T)handler; } | |
public void Handle(object message) { _handlers[message.GetType()](message); } | |
} |
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 class ReqRepExample : Example | |
{ | |
Context _context; | |
public void Start(Context context) | |
{ | |
_context = context; | |
Task.Factory.StartNew(startServer); | |
Task.Factory.StartNew(()=> startClient("1")); |
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
open System | |
open MSDN.FSharp.Charting | |
open System.Windows.Forms.DataVisualization.Charting | |
[<EntryPoint>] | |
let main argv = | |
let r = Random() | |
let chart = [for d in 0..100 -> | |
(d, d*2)] |
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
// Learn more about F# at http://fsharp.net | |
// See the 'F# Tutorial' project for more help. | |
type DoSomething = { Id:string ; Name : string } | |
type DoSomethingElse = { Id:string ; Name : string } | |
type UnhandledSomething = { Id:string ; Name : string } | |
type Handlers () = | |
static member Handle (cmd:DoSomething) = |
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
Powershell build step. | |
Script:Source. | |
Script source: & {$host.UI.RawUI.BufferSize = new-object System.Management.Automation.Host.Size(512, 50); .\tools\psake\psake .\build\build.ps1 ci; | |
if ($psake.build_success -eq $false) { exit 1 } else { exit 0 }} | |
[replace .\tools\psake\psake .\build\build.ps1 ci with whatever your command line build is. |
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
open FSharp.Charting | |
open System | |
[<EntryPoint>] | |
let main argv = | |
printfn "%A" argv | |
Chart.Line([ for x in 0 .. 10 -> x, x*x ]).ShowChart() | |
Console.ReadLine() |> ignore | |
0 // return an integer exit code |
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 class Worker | |
{ | |
private readonly NetMQContext _context; | |
private readonly string _id; | |
public Worker(NetMQContext context, string id) | |
{ | |
_context = context; | |
_id = id; | |
} |
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 class Server | |
{ | |
private readonly NetMQContext _context; | |
private readonly string _id; | |
public Server(NetMQContext context, string id) | |
{ | |
_context = context; | |
_id = id; | |
} |