Skip to content

Instantly share code, notes, and snippets.

@arkadiuszwojcik
Created December 11, 2019 20:47
Show Gist options
  • Save arkadiuszwojcik/3c335cccddfcd8fa7beded88c398b72d to your computer and use it in GitHub Desktop.
Save arkadiuszwojcik/3c335cccddfcd8fa7beded88c398b72d to your computer and use it in GitHub Desktop.
Test scoped actor
[ActorScope(typeof(ActorScopeInstaller))]
public class TestActor : IActor
{
public Task ReceiveAsync(IContext context)
{
switch (context.Message)
{
case Started _:
var scopeContext = context as ActorScopeContext;
var pid = scopeContext.Spawn<SomeActor>();
break;
case Stopped _:
break;
default:
break;
}
return Actor.Done;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment