public static void TerminateWithNotification(this IUntypedActorContext context, IActorRef target) { if (context == null) throw new ArgumentNullException("context"); if (target == null) throw new ArgumentNullException(nameof(target)); context.Watch(target); target.Terminate(); }