private void SendUserMessage(PID target, object message) { if (_props.SenderMiddlewareChain != null) { //slow path _props.SenderMiddlewareChain(EnsureExtras().Context, target, MessageEnvelope.Wrap(message)); } else { //fast path, 0 alloc target.SendUserMessage(message); } }
private void SendUserMessage(PID target, object message) { if (SenderMiddleware != null) { if (message is MessageEnvelope messageEnvelope) { //Request based middleware SenderMiddleware(this, target, messageEnvelope); } else { //tell based middleware SenderMiddleware(this, target, new MessageEnvelope(message, null, null)); } return; } //Default path target.SendUserMessage(message); }
public static void Tell(this PID self, object message) { self.SendUserMessage(message); }
internal static Task Sender(ISenderContext context, PID target, MessageEnvelope envelope) { target.SendUserMessage(envelope); return(Actor.Done); }
private Task DefaultSender(ISenderContext context, PID target, MessageEnvelope message) { target.SendUserMessage(message); return(Actor.Done); }
internal static Task Sender(ISenderContext context, PID target, MessageEnvelope envelope) { target.SendUserMessage(context.System, envelope); return(Task.CompletedTask); }