Last active
August 29, 2015 14:26
-
-
Save isaacabraham/d50e47df28bac11ca38d to your computer and use it in GitHub Desktop.
Testing Service Fabric through FSX
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
#load "load-references.fsx" | |
#r @"..\bin\debug\Interfaces.dll" | |
open Microsoft.ServiceFabric.Actors | |
open ServiceFabricDemo | |
open System | |
let cat = ActorProxy.Create<ICat>(ActorId "Blackie", "fabric:/CatActors") | |
async { | |
do! cat.Eat "Whiskers" |> Async.AwaitTask | |
do! cat.Eat "Sheba" |> Async.AwaitTask | |
do! cat.Meow 3 (TimeSpan.FromHours 6.) |> Async.AwaitTask | |
do! cat.Purr() |> Async.AwaitTask | |
let! color = cat.Colour() |> Async.AwaitTask | |
let! food = cat.FavouriteFood() |> Async.AwaitTask | |
return sprintf "%s is %s and likes %s." (cat.GetActorId().GetStringId()) color food | |
} |> Async.RunSynchronously | |
(* | |
val it : string = "Blackie is Black and likes Sheba." | |
*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment