Beispiel #1
0
        public void Bootup()
        {
            lock (_bootupLock)
            {
                if (this.Actor.Active)
                {
                    throw new InvalidOperationException("The actor has already been bootup.");
                }

                var services     = _serviceCatalog.GetServices();
                var routeBuilder = new MethodRouteBuilder(_methodFixture.Extractor);
                var routeCache   = routeBuilder.BuildCache(services);
                _methodResolver = new MethodRouteResolver(routeCache);

                this.Actor.RegisterRpcHandler(this);

                this.Actor.Bootup(_actorDirectory);

                foreach (var service in services)
                {
                    _serviceDirectory.RegisterService(this.Actor.Identity, service.DeclaringType);
                }
            }
        }