4 ms·
> "You can then send messages to the grain by creating a proxy object, and calling the methods: var grain = GrainClient.GrainFactory. GetGrain<IMyGrain("
by rdtsc 10y ago
> "You can then send messages to the grain by creating a proxy object, and calling the methods:
var grain = GrainClient.GrainFactory.
GetGrain<IMyGrain("grain1")
await grain.SayHello("World");
var brain = BrainClient.BrainFactory.
GetBrain<IMyBrain>("brain1");
await brain.Say("WTF");
Heh, Erlang:
GrainPid ! "HelloWorld"
BrainPid ! "WTF"
- platz 10y agoYou left out the code that gets the Pids, which is what the c# version is doing. Otherwise it's just await grain.SayHello("World");
- rdtsc 10y agoAh good point! It is even simpler then ;-) grain1 ! "HelloWorld" brain1 ! "WTF"
- aprooks 10y agodo! GrainPid <! "HelloWorld" via Orleankka F# https://github.com/OrleansContrib/Orleankka/blob/master/Source/FSharp.Demo.HelloWorld/Program.fs https://github.com/OrleansContrib/Orleankka/blob/master/Sour... stilll a bit more verbose than erlang though