Ejemplo n.º 1
0
        private IServiceProvider Build()
        {
            var services = new ServiceCollection();

            this.RegisterServices(services);
            OnRegisteringServices?.Invoke(this, services);
            ServiceProvider prov = services.BuildServiceProvider();

            EventMonitor.Instance.Start();
            return(prov);
        }
Ejemplo n.º 2
0
 private IServiceProvider Build()
 {
     try
     {
         var services = new ServiceCollection();
         this.RegisterServices(services);
         OnRegisteringServices?.Invoke(this, services);
         ServiceProvider prov = services.BuildServiceProvider();
         EventMonitor.Instance.Start();
         return(prov);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
         throw;
     }
 }