Exemplo n.º 1
0
 internal void SendStart(Actor targetActor)
 {
     try
     {
         Action <IStartable> consumer = actor => actor.Start();
         var message = new LocalMessage <IStartable>(targetActor, consumer, "Start()");
         Environment.Mailbox.Send(message);
     }
     catch (Exception ex)
     {
         Environment.Logger.Log("vlingo-dotnet/actors: Actor Start() failed: {ex.Message}");
         Environment.Stage.HandleFailureOf <IStartable>(new StageSupervisedActor <IStartable>(targetActor, ex));
     }
 }
Exemplo n.º 2
0
 internal void SendStart(Actor targetActor)
 {
     try
     {
         Action <IStartable> consumer = x => x.Start();
         if (!Environment.Mailbox.IsPreallocated)
         {
             var message = new LocalMessage <IStartable>(targetActor, consumer, "Start()");
             Environment.Mailbox.Send(message);
         }
         else
         {
             Environment.Mailbox.Send(targetActor, consumer, null, "Start()");
         }
     }
     catch (Exception ex)
     {
         Environment.Logger.Error("vlingo-net/actors: Actor Start() failed: {ex.Message}");
         Environment.Stage.HandleFailureOf(new StageSupervisedActor <IStartable>(targetActor, ex));
     }
 }
Exemplo n.º 3
0
 public LocalMessage(LocalMessage <TActor> message)
     : this(message.actor !, message.consumer !, message.completes, message.representation !)
 public StowedLocalMessage(LocalMessage <T> message)
     : base(message)
 {
 }
Exemplo n.º 5
0
 public LocalMessage(LocalMessage <T> message)
     : this(message.Actor, message.Consumer, null, message.Representation)
 {
 }