Ejemplo n.º 1
0
 /// <summary>
 /// Registers a dispatcher for a role
 /// Dispatchers take in a 'leaf' ProcessId (i.e. /user/my-process) and return an enumerable
 /// of real ProcessIds that the Process system will use to deliver all of the standard functions
 /// like tell, ask, subscribe, etc.
 /// </summary>
 /// <param name="name">Name of the dispatcher</param>
 /// <param name="selector">Function that will be invoked every time a dispatcher based ProcessId
 /// is used.</param>
 /// <returns>A root dispatcher ProcessId.  Use this to create new ProcessIds that will
 /// be passed to the selector function whenever the dispatcher based ProcessId is used</returns>
 public static ProcessId register(ProcessName name, Func <ProcessId, IEnumerable <ProcessId> > selector) =>
 ActorContext.AddDispatcher(name, selector);