public void Setup() { _folderPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N")); _filePath = Path.Combine(_folderPath, "test.txt"); Directory.CreateDirectory(_folderPath); _trigger = new FolderChangedTrigger(_folderPath, "*.*"); _trigger.Attach(this); }
public RazorMailTemplateEngine(RazorTemplatesFactory templatesFactory, bool autoReloadTemplates) { _templatesFactory = templatesFactory; if (autoReloadTemplates) { _folderChangedTrigger = new FolderChangedTrigger(templatesFactory.TemplatesFolderPath, "*.cshtml"); _folderChangedTrigger.Attach(templatesFactory); _folderChangedTrigger.Start(); } }