Пример #1
0
        public PID SpawnNamed(Props props, string name)
        {
            var pid = props.Spawn($"{Self.Id}/{name}", Self);

            if (_children == null)
            {
                _children = new HashSet <PID>();
            }
            _children.Add(pid);
            Watch(pid);
            return(pid);
        }
Пример #2
0
        public PID SpawnNamed(Props props, string name)
        {
            if (props.GuardianStrategy != null)
            {
                throw new ArgumentException("Props used to spawn child cannot have GuardianStrategy.");
            }

            var pid = props.Spawn($"{Self.Id}/{name}", Self);

            EnsureExtras().AddChild(pid);


            return(pid);
        }
Пример #3
0
        public PID SpawnNamed(Props props, string name)
        {
            if (props.GuardianStrategy != null)
            {
                throw new ArgumentException("Props used to spawn child cannot have GuardianStrategy.");
            }

            var pid = props.Spawn($"{Self.Id}/{name}", Self);

            if (_children == null)
            {
                _children = new FastSet <PID>();
            }
            _children.Add(pid);

            return(pid);
        }
Пример #4
0
        public PID SpawnNamed(Props props, string name)
        {
            var pid = props.Spawn($"{Self.Id}/{name}", Self);

            if (_children == null)
            {
                _children = new FastSet <PID>();
            }
            _children.Add(pid);

            //fast path add watched
            if (_watching == null)
            {
                _watching = new FastSet <PID>();
            }
            _watching.Add(pid);
            return(pid);
        }
Пример #5
0
 public static PID SpawnNamed(Props props, string name)
 {
     return(props.Spawn(name, null));
 }
Пример #6
0
        public PID SpawnNamed(Props props, string name)
        {
            var parent = props.GuardianStrategy != null?Guardians.GetGuardianPID(props.GuardianStrategy) : null;

            return(props.Spawn(name, parent));
        }