Inheritance: IContainerFactory
Esempio n. 1
0
        public void Setup()
        {
            var containerFactory = new ContainerFactory(new ToolboxConfiguration(), new ConfigReader(), NoobotWrapper.GetLogger());
            _container = containerFactory.CreateContainer();

            _noobotCore = _container.GetNoobotCore();
            _noobotCore.Connect().Wait(TimeSpan.FromMinutes(1));
        }
        public void Setup()
        {
            File.Delete(Path.Combine(Environment.CurrentDirectory, "data/schedules.json"));

            var containerFactory = new ContainerFactory(new SchedulerConfig(), new ConfigReader(), NoobotWrapper.GetLogger());
            _container = containerFactory.CreateContainer();

            _noobotCore = _container.GetNoobotCore();
            _noobotCore.Connect().Wait(TimeSpan.FromMinutes(1));
        }
Esempio n. 3
0
        public void Start()
        {
            IContainerFactory containerFactory = new ContainerFactory(_configuration, _configReader, new ConsoleLog());
            INoobotContainer container = containerFactory.CreateContainer();
            _noobotCore = container.GetNoobotCore();

            Console.WriteLine("Connecting...");
            _noobotCore
                .Connect()
                .ContinueWith(task =>
                {
                    if (!task.IsCompleted || task.IsFaulted)
                    {
                        Console.WriteLine($"Error connecting to Slack: {task.Exception}");
                    }
                });
        }