Skip to content

Instantly share code, notes, and snippets.

@Aaronontheweb
Created January 25, 2015 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aaronontheweb/63e64e8bc27a45535711 to your computer and use it in GitHub Desktop.
Save Aaronontheweb/63e64e8bc27a45535711 to your computer and use it in GitHub Desktop.
Basic Akka.NET Actor
using System;
using Akka.Actor;
namespace ActorsSendingMessages
{
/// <summary>
/// See http://akkadotnet.github.io/wiki/Actors for more details about
/// Akka.NET actors
/// </summary>
public class BasicActor : UntypedActor
{
protected override void PreStart()
{
}
protected override void PreRestart(Exception reason, object message)
{
}
protected override void OnReceive(object message)
{
//handle messages here
}
protected override void PostStop()
{
}
protected override void PostRestart(Exception reason)
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment