예제 #1
0
        public CoreNotificationService(DataSettings dataSettings, ILogger logger = null)
        {
            Logger       = logger ?? Log.Default;
            DataSettings = dataSettings;
            string emailTemplatesDirectory = dataSettings.GetEmailTemplatesDirectory().FullName;

            NotificationTemplateDirectory = new DirectoryInfo(Path.Combine(dataSettings.GetRootDataDirectory().FullName, "NotificationTemplates"));
            Templates = new HandlebarsDirectory(NotificationTemplateDirectory);
            Tld       = "com";
            Templates.Reload();
        }
예제 #2
0
 public DynamicTypeManager(DynamicTypeDataRepository descriptorRepository, DataSettings settings)
 {
     DataSettings  = settings;
     JsonDirectory = settings.GetRootDataDirectory(nameof(DynamicTypeManager));
     if (!JsonDirectory.Exists)
     {
         JsonDirectory.Create();
     }
     descriptorRepository.EnsureDaoAssemblyAndSchema();
     DynamicTypeDataRepository = descriptorRepository;
     JsonFileProcessor         = new BackgroundThreadQueue <DataFile>()
     {
         Process = (df) =>
         {
             ProcessJsonFile(df.TypeName, df.FileInfo);
         }
     };
 }