public BookController(IDataStore dataStore, IDbHelper dbHelper, INotificationRegister notificationRegister) { _dataStore = dataStore; _dbHelper = dbHelper; _bookDAL = new BookDAL(_dbHelper); _notificationRegister = notificationRegister; }
private static void BuildNotificationProvider(Assembly assembly, IServiceScope scope) { IEnumerable <Type> providers = assembly.GetExportedTypes().Where(p => p.GetInterfaces().Any(x => x == typeof(INotificationProvider))); if (providers.Any()) { INotificationRegister register = scope.ServiceProvider.GetService <INotificationRegister>(); IDbHelper dbHelper = scope.ServiceProvider.GetService <IDbHelper>(); foreach (Type p in providers) { INotificationProvider obj = (INotificationProvider)assembly.CreateInstance(p.FullName); Dictionary <string, List <INotificationHandler> > result = obj.GetNotifications(dbHelper); foreach (KeyValuePair <string, List <INotificationHandler> > item in result) { foreach (INotificationHandler i in item.Value) { register.Subscribe(item.Key, i); } } } } }
public MvcModuleSetup(ApplicationPartManager partManager, IReferenceLoader referenceLoader, IPluginsAssemblyLoadContexts pluginsLoadContexts, DynamicChangeTokenProvider dynamicChangeTokenProvider, INotificationRegister notificationRegister, IOptions <PluginOptions> options, IWebHostEnvironment webHostEnvironment, IRazorViewEngine razorViewEngine, IViewCompilerProvider viewCompiler) { _partManager = partManager; _referenceLoader = referenceLoader; _pluginsLoadContexts = pluginsLoadContexts; _dynamicChangeTokenProvider = dynamicChangeTokenProvider; _notificationRegister = notificationRegister; _pluginOptions = options.Value; _env = webHostEnvironment; //_baseDirectory = AppContext.BaseDirectory; _baseDirectory = _env.ContentRootPath; _razorViewEngine = razorViewEngine; _viewCompiler = viewCompiler; }
public Plugin1Controller(INotificationRegister notificationRegister) { _notificationRegister = notificationRegister; }
public Plugin1Controller(INotificationRegister notificationRegister, IDataStore dataStore) { _notificationRegister = notificationRegister; _dataStore = dataStore; }
public Plugin1Controller(INotificationRegister notificationRegister, IDataStore dataStore) : base(ModuleDefiniation.MODULE_NAME, dataStore) { _notificationRegister = notificationRegister; _dataStore = dataStore; }
public BookController(IDataStore dataStore, IDbConnectionFactory dbConnectionFactory, INotificationRegister notificationRegister) : base(ModuleDefiniation.MODULE_NAME, dataStore) { _bookDAL = new BookDAL(dbConnectionFactory); _notificationRegister = notificationRegister; }