Created
October 15, 2014 10:24
-
-
Save aaronpowell/3fc27e97f6ef3544a08c to your computer and use it in GitHub Desktop.
Nimbus + F#
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
open System | |
open Config | |
open MyApp.Messages | |
[<EntryPoint>] | |
let main argv = | |
let bus = busBuilder() | |
{ Value = "Hey from F#" } | |
|> bus.Send | |
|> ignore | |
Console.ReadKey() |> ignore | |
return 0 |
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
namespace MyApp.Messages | |
open Nimbus.MessageContracts | |
[<CLIMutable>] | |
type SomeCommand = | |
{ Value : string } | |
with interface IBusCommand |
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
namespace NyApp.Handlers | |
open Nimbus.Handlers | |
open MyApp.Messages | |
type SumeCommandHandler() = | |
interface IHandleCommand<SomeCommand> with | |
member x.Handle(busCommand: SomeCommand): Task = | |
//Do stuff here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment