Ejemplo n.º 1
0
 public static ProcessId Register(ProcessName name, ProcessId process) =>
 map(registered as IProcessInternal,
     self => match(self.GetChildProcess(name),
                   Some: _ => failwith <IProcess>("Process '" + name + "' already registered"),
                   None: () => self.AddChildProcess(new ActorProxy(
                                                        registered.Id,
                                                        name,
                                                        ActorProxyTemplate.Registered,
                                                        () => new ActorProxyConfig(process))))).Id;