Ejemplo n.º 1
0
        public Agenda(IServiceProvider services)
        {
            logger          = services.GetRequiredService <Logger>();
            statecollection = services.GetRequiredService <StateCollection>();
            notifier        = services.GetRequiredService <NotifierFactory>().Create(statecollection);
            constants       = services.GetRequiredService <Constants>();

            notifiercollection = new ConcurrentDictionary <ulong, CancellationTokenSource>();
        }
Ejemplo n.º 2
0
        public Bot()
        {
            // set up services and store reference to services that are relevant for this class
            services        = BuildServiceProvider();
            settings        = services.GetService <Settings>();
            agenda          = services.GetService <Agenda>();
            constants       = services.GetService <Constants>();
            logger          = services.GetService <Logger>();
            statecollection = services.GetService <StateCollection>();
            notifier        = services.GetService <Notifier>();

            shouldrestart = false;
            exitevent     = new ManualResetEventSlim(false);
            analysis      = new Analysis(services);
        }
Ejemplo n.º 3
0
 public Analysis(IServiceProvider services)
 {
     statecollection = services.GetRequiredService <StateCollection>();
 }
Ejemplo n.º 4
0
 public Notifier(IServiceProvider services, StateCollection statecollection)
 {
     this.statecollection = statecollection;
     logger = services.GetService <Logger>();
 }
Ejemplo n.º 5
0
 public Notifier Create(StateCollection statecollection)
 {
     return(new Notifier(services, statecollection));
 }