Exemplo n.º 1
0
 public ContractJob(ILoggerProvider loggerProvider, NotificationDbContext dbContext, IMessageTransmitter transmitter)
 {
     DBContext      = dbContext;
     Logger         = loggerProvider.CreateLogger(nameof(ContractJob));
     LoggerProvider = loggerProvider;
     Transmitter    = transmitter;
 }
Exemplo n.º 2
0
 public SendDbLobReminderRecipientGetterStrategy(
     NotificationDbContext notificationDbContext,
     ILdapService ldapService)
 {
     _notificationDbContext = notificationDbContext;
     _ldapService           = ldapService;
 }
Exemplo n.º 3
0
 public UnitOfWork(
     INotificationLogRepository notificationLogRepository,
     NotificationDbContext dbContext)
 {
     NotificationLogRepository = notificationLogRepository;
     _dbContext = dbContext;
 }
Exemplo n.º 4
0
 public JobMailsender(ILoggerProvider loggerProvider, NotificationDbContext dbContext, IMessageTransmitter transmitter, string notificationType, string mailTemplate)
 {
     DBContext        = dbContext;
     Logger           = loggerProvider.CreateLogger(nameof(ContractJob));
     LoggerProvider   = loggerProvider;
     NotificationType = notificationType;
     MailTemplate     = mailTemplate;
     Transmitter      = transmitter;
 }
Exemplo n.º 5
0
 public DataAccess_Sql(
     ApplicationDbContext context,
     FileManagerService fmService,
     NotificationDbContext notificationCtx)
 {
     _notificationCtx = notificationCtx;
     _fmService       = fmService;
     _context         = context;
 }
 public UserUpdatedEventListener(
     IUserRepository userRepository,
     ICustomerRepository customerRepository,
     NotificationDbContext dbContext)
 {
     _userRepository     = userRepository;
     _customerRepository = customerRepository;
     _dbContext          = dbContext;
 }
        public NotifyController(ILogger <NotifyController> logger,
                                INotifyApplication notifyApplication, NotificationDbContext context)
        {
            _logger = logger;

            _notifyApplication = notifyApplication;

            _context = context;
        }
Exemplo n.º 8
0
        /// <summary>
        /// add system notification data to service container
        /// </summary>
        /// <param name="services">Service container</param>
        /// <param name="dbConnection">connection string to notification db</param>
        public static void AddNotificationDataProvider(this IServiceCollection services, string dbConnection)
        {
            using var localizedDbContext = new NotificationDbContext(new DbContextOptionsBuilder <NotificationDbContext>().UseSqlServer(dbConnection).Options);
            localizedDbContext.Database.Migrate();

            services.AddTransient <IEmailAccountData, EmailAccountData>();
            services.AddTransient <IMessageTemplateData, MessageTemplateData>();
            services.AddTransient <IQueuedEmailData, QueuedEmailData>();
        }
        public NotificationService(NotificationDbContext notificationDb, BuildFacade buildFacade, IConfiguration configuration, ILogger <NotificationService> logger)
        {
            this.notificationDb = notificationDb;
            this.logger         = logger;
            appId       = configuration.GetValue <string>("MicrosoftAppId");
            appPassword = configuration.GetValue <string>("MicrosoftAppPassword");

            buildFacade.StageUpdateEvent += OnStageUpdate;
            buildFacade.BuildUpdateEvent += OnBuildUpdate;
        }
Exemplo n.º 10
0
 public EmailTemplateServices(NotificationDbContext notificationDbContext,
                              ILogger <EmailTemplateServices> logger,
                              IRazorViewToStringRenderer razorViewToStringRenderer,
                              IWebHostEnvironment environment,
                              IOptions <TemplateSettings> settings)
 {
     _notificationDbContext = notificationDbContext;
     _logger = logger;
     _razorViewToStringRenderer = razorViewToStringRenderer;
     _settings           = settings;
     _hostingEnvironment = environment;
 }
Exemplo n.º 11
0
        public PushService(NotificationDbContext context, IConfiguration configuration)
        {
            _context = context;
            _client  = new WebPushClient();

            var vapidSubject    = configuration.GetValue <string>("Vapid:Subject");
            var vapidPublicKey  = configuration.GetValue <string>("Vapid:PublicKey");
            var vapidPrivateKey = configuration.GetValue <string>("Vapid:PrivateKey");

            CheckOrGenerateVapidDetails(vapidSubject, vapidPublicKey, vapidPrivateKey);

            _vapidDetails = new VapidDetails(vapidSubject, vapidPublicKey, vapidPrivateKey);
        }
Exemplo n.º 12
0
        public AppPushService(NotificationDbContext context, IConfiguration configuration)
        {
            this.context = context;
            this.client  = new PushServiceClient();

            var vapidSubject = configuration.GetValue <string>("Vapid:Subject");

            this.vapidPublicKey  = configuration.GetValue <string>("Vapid:PublicKey");
            this.vapidPrivateKey = configuration.GetValue <string>("Vapid:PrivateKey");

            ValidateVapidKeys(vapidSubject, vapidPublicKey, vapidPrivateKey);

            vapidDetails = new VapidDetails(vapidSubject, vapidPublicKey, vapidPrivateKey);
        }
 public SendDbLobReminderNotificationTask(
     IConfiguration configuration,
     IMailServer mailServer,
     IRecipientGetterStrategy getStrategy,
     IMailGenerator mailGenerator,
     ILogger logger,
     Sender sender,
     NotificationDbContext notificationDbContext)
 {
     _configuration         = configuration;
     _mailServer            = mailServer;
     _getStrategy           = getStrategy;
     _mailGenerator         = mailGenerator;
     _logger                = logger;
     _sender                = sender;
     _notificationDbContext = notificationDbContext;
 }
Exemplo n.º 14
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, NotificationDbContext notificationDbContext)
        {
            notificationDbContext.Database.EnsureCreated();
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app
            .UseRouting()
            .UseSwagger()
            .UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Notification service - V1"); })
            //.UseHttpsRedirection()
            .UseEndpoints(endpoints => {
                endpoints.MapControllers();
                endpoints.MapRazorPages();
                endpoints.MapGet("/",
                                 async context => { await context.Response.WriteAsync("Notification Service!"); });
            });
        }
Exemplo n.º 15
0
 public EmailRepository(NotificationDbContext context)
 {
     _context = context;
 }
Exemplo n.º 16
0
 public NotificationController(IMapper _Mapper, NotificationDbContext _DbContext)
 {
     this.Mapper    = _Mapper;
     this.DbContext = _DbContext;
 }
 protected WeChatTemplateMessageHandler(NotificationDbContext db, IWeChatTemplateMessageSender sender) : base(db, sender)
 {
 }
Exemplo n.º 18
0
 public UserOptionsRepository(NotificationDbContext db)
 {
     _db = db;
 }
 protected SmsHandler(NotificationDbContext db, ISmsSender sender) : base(db, sender)
 {
 }
Exemplo n.º 20
0
 public UserService(NotificationDbContext dbContext)
 {
     _dbContext = dbContext;
 }
Exemplo n.º 21
0
 protected EmailHandler(NotificationDbContext db, IEmailSender sender) : base(db, sender)
 {
 }
Exemplo n.º 22
0
 protected MessageHandler(NotificationDbContext db, IMessageSender <TMessage> sender)
 {
     Db     = db;
     Sender = sender;
 }
Exemplo n.º 23
0
 public UserRepository(NotificationDbContext notificationDBContext)
 {
     _notificationDBContext = notificationDBContext;
 }
Exemplo n.º 24
0
 public UserRepository(NotificationDbContext context)
 {
     _context = context;
 }
 public NotificationLogRepository(NotificationDbContext context)
 {
     _context = context;
 }
Exemplo n.º 26
0
 public AppPushService(NotificationDbContext context)
 {
     this.context = context;
     this.client  = new PushServiceClient();
 }