in generators/CoreCLRStatefulActor/templates/service/class/Program.cs [16:38]
private static void Main()
{
try
{
//Creating a new event listener to redirect the traces to a file
ActorEventListener listener = new ActorEventListener();
listener.EnableEvents(ActorEventSource.Current, EventLevel.LogAlways, EventKeywords.All);
ActorEventSource.Current.Message("Registering Actor : {0}", "<%= actorName %>");
ActorRuntime.RegisterActorAsync<<%= actorName %>>(
(context, actorType) => new ActorService(context, actorType)).GetAwaiter().GetResult();
ActorEventSource.Current.Message("Registered Actor : {0}", "<%= actorName %>");
Thread.Sleep(Timeout.Infinite);
}
catch (Exception ex)
{
ActorEventSource.Current.ActorHostInitializationFailed(ex.ToString());
throw;
}
}