Beispiel #1
0
 /// <summary>
 /// Register a named process (a kind of DNS for Processes).
 ///
 /// If the Process is visible to the cluster (PersistInbox) then the
 /// registration becomes a permanent named look-up until Process.deregister
 /// is called.
 ///
 /// See remarks.
 /// </summary>
 /// <remarks>
 /// Multiple Processes can register under the same name.  You may use
 /// a dispatcher to work on them collectively (wherever they are in the
 /// cluster).  i.e.
 ///
 ///     var regd = pid.Register(name);
 ///     Dispatch.Broadcast[regd].Tell("Hello");
 ///     Dispatch.First[regd].Tell("Hello");
 ///     Dispatch.LeastBusy[regd].Tell("Hello");
 ///     Dispatch.Random[regd].Tell("Hello");
 ///     Dispatch.RoundRobin[regd].Tell("Hello");
 /// </remarks>
 /// <param name="name">Name to register under</param>
 /// <returns>A ProcessId that allows dispatching to the process via the name.  The result
 /// would look like /disp/reg/name</returns>
 public static ProcessId Register(this ProcessId self, ProcessName name) =>
 ActorContext.System(self).Register(name, self);