Ejemplo n.º 1
0
 /// <summary>
 /// Starts the <c>PrivateRootActor</c>. When the <c>PrivateRootActor</c> starts it will in turn
 /// start the <c>PublicRootActor</c>.
 /// </summary>
 /// <param name="stage">The <c>Stage</c> in which to start the <c>PrivateRootActor</c>.</param>
 /// <param name="logger">The default <c>ILogger</c> for this <c>World</c> and <c>Stage</c>.</param>
 private void StartRootFor(Stage stage, ILogger logger)
 => stage.ActorProtocolFor <IStoppable>(
     Definition.Has <PrivateRootActor>(Definition.NoParameters, PrivateRootName),
     null,
     AddressFactory.From(PrivateRootId, PrivateRootName),
     null,
     null,
     logger);
Ejemplo n.º 2
0
        private World(string name, Configuration configuration)
        {
            Name                    = name;
            Configuration           = configuration;
            classLoader             = new DynaClassLoader(GetType().GetAssemblyLoadContext());
            completesProviderKeeper = new CompletesEventuallyProviderKeeper();
            loggerProviderKeeper    = new LoggerProviderKeeper();
            mailboxProviderKeeper   = new MailboxProviderKeeper();
            stages                  = new Dictionary <string, Stage>();

            AddressFactory = new AddressFactory();

            var defaultStage = StageNamed(DefaultStage);

            configuration.StartPlugins(this, 1);

            StartRootFor(defaultStage, DefaultLogger);

            configuration.StartPlugins(this, 2);
            defaultStage.StartDirectoryScanner();
        }