public ProjectsMethods(IMapper mapper, INotificationMethods notificationMethods, ApplicationDbContext context)
 {
     //var optionsBuilder = new DbContextOptionsBuilder<ApplicationDbContext>();
     //optionsBuilder.UseSqlServer(Setting.ConnectionString);
     //db = new ApplicationDbContext(optionsBuilder.Options);
     db      = context;
     _mapper = mapper;
     this.notificationMethods = notificationMethods;
 }
        //public TeamsMethods()
        //{
        //}

        public TeamsMethods(IMapper mapper, ApplicationDbContext dbContext, IHubContext <Hubs.ObserverHub> observerHub, INotificationMethods notificationMethods)
        {
            //var optionsBuilder = new DbContextOptionsBuilder<ApplicationDbContext>();
            //optionsBuilder.UseSqlServer(Setting.ConnectionString);
            //_context = new ApplicationDbContext(optionsBuilder.Options);
            _context                 = dbContext;
            this.observerHub         = observerHub;
            this.notificationMethods = notificationMethods;
            _mapper = mapper;
        }
Esempio n. 3
0
        public LiveObserverHost(IServiceProvider services, IConfiguration config, INotificationMethods notifications)
        {
            //IUserMethods users,
            _config  = config;
            Services = services;
            //_users = users;
            _notifications = notifications;
            //_notificationMethods = notificationMethods;
            //systemAdminId = _config.GetValue<string>("Tokens:Admin");
            //managerIds = _users.GetUsersInRole("Manager");

            using (var scope = Services.CreateScope())
            {
                var scopedProcessingService =
                    scope.ServiceProvider
                    .GetRequiredService <IUserMethods>();

                _users = scopedProcessingService;
            }
        }
 public TasksMethods(IMapper mapper, INotificationMethods notificationMethods, ApplicationDbContext context)
 {
     db      = context;
     _mapper = mapper;
     this.notificationMethods = notificationMethods;
 }
        //private readonly IHubContext<NotificationsHub> _notificationsHub;

        //, IHubContext<NotificationsHub> notificationsHub
        public NotificationsController(INotificationMethods notificationMethods)
        {
            _notificationMethods = notificationMethods;
            //_notificationsHub = notificationsHub;
        }