Exemplo n.º 1
0
        public void Start()
        {
            var akkaConfig = ConfigurationFactory.ParseString(this.Config["Akka"]);

            this.ActorSystem = ActorSystem.Create("arcadia-assistant", akkaConfig);
            this.OnStart(this.ActorSystem);

            var services = new ServiceCollection();

            services.AddHttpClient();

            var di = new DependencyInjection();

            this.container = di.GetContainer(this.Config, services);

            // ReSharper disable once ObjectCreationAsStatement
            new AutoFacDependencyResolver(this.container, this.ActorSystem);

            var builder = new ActorSystemBuilder(this.ActorSystem);

            var appSettings = this.container.Resolve <AppSettings>();

            this.ServerActors = builder.AddRootActors(
                appSettings.Messaging.CalendarEventsMail,
                appSettings.Messaging.CalendarEventsPush,
                appSettings.Messaging.Imap);
        }
Exemplo n.º 2
0
 public virtual void Dispose()
 {
     this.ActorSystem?.Dispose();
     this.container.Dispose();
     this.ActorSystem  = null;
     this.ServerActors = null;
     this.container    = null;
 }
Exemplo n.º 3
0
        public void Start()
        {
            var akkaConfig = ConfigurationFactory.ParseString(this.config["akka"]);

            this.ActorSystem = ActorSystem.Create("arcadia-assistant", akkaConfig);
            this.container   = this.containerBuilder.Build();

            new AutoFacDependencyResolver(this.container, this.ActorSystem);

            var builder = new ActorSystemBuilder(this.ActorSystem);

            this.ServerActors = builder.AddRootActors();
        }
Exemplo n.º 4
0
        public void Start()
        {
            var akkaConfig = ConfigurationFactory.ParseString(this.Config["Akka"]);

            this.ActorSystem = ActorSystem.Create("arcadia-assistant", akkaConfig);
            this.OnStart(this.ActorSystem);

            var di = new DependencyInjection();

            this.container = di.GetContainer(this.Config);

            // ReSharper disable once ObjectCreationAsStatement
            new AutoFacDependencyResolver(this.container, this.ActorSystem);

            var builder = new ActorSystemBuilder(this.ActorSystem);

            this.ServerActors = builder.AddRootActors();
        }