Example #1
0
        public ActorSystem Build()
        {
            _settings.ActorSystem.EnsureRole("terminal");
            var configString = new HoconConfigFactory(_settings.ActorSystem).Build();
            var actorConfig  = ConfigurationFactory.ParseString(configString);

            return(ActorSystem.Create(_settings.ActorSystem.ActorSystemName, actorConfig));
        }
Example #2
0
        public ActorSystem Build()
        {
            _config.EnsureRole("host");
            var factory      = new HoconConfigFactory(_config);
            var configString = factory.Build();
            var actorConfig  = ConfigurationFactory.ParseString(configString);

            return(ActorSystem.Create(_config.ActorSystemName, actorConfig));
        }
Example #3
0
        public void TestHoconConfigFactory()
        {
            var subject = new HoconConfigFactory(new HoconConfig());
            var target  = subject.Build();

            Assert.False(target.IsNullOrEmpty());
            Assert.DoesNotContain("#!", target);

            var hoconObj = Parser.Parse(target, _ => new HoconRoot(new HoconValue()));

            Assert.NotNull(hoconObj);
            Assert.False(hoconObj.Value.IsEmpty);
        }