/// <summary> /// Extra constructor mainly created for unit testing purposes. /// </summary> /// <param name="appSettings"></param> /// <param name="directory"></param> /// <param name="dictaatFactory"></param> /// <param name="context"></param> public DictaatRepository( IOptions <ConfigVariables> appSettings, IGoogleAnalytics analyticsRepo, IDictaatFactory dictaatFactory, WebdictaatContext context) { _directoryRoot = appSettings.Value.DictaatRoot; _pagesDirectory = appSettings.Value.PagesDirectory; _dictatenDirectory = appSettings.Value.DictatenDirectory; _templatesDirectory = appSettings.Value.TemplatesDirectory; _analyticsRepo = analyticsRepo; _context = context; _dictaatFactory = dictaatFactory; _pathHelper = new PathHelper(appSettings.Value); }
/// <summary> /// /// </summary> /// <param name="appSettings"></param> /// <param name="directory"></param> /// <param name="dictaatFactory"></param> public DictaatRepository( IOptions <ConfigVariables> appSettings, IDirectory directory, IFile file) { _directoryRoot = appSettings.Value.DictaatRoot; _pagesDirectory = appSettings.Value.PagesDirectory; _dictatenDirectory = appSettings.Value.DictatenDirectory; _templatesDirectory = appSettings.Value.TemplatesDirectory; var menuConfigName = appSettings.Value.MenuConfigName; _directory = directory; //best place to build the factory _dictaatFactory = new DictaatFactory(appSettings.Value, directory, file); }
/// <summary> /// /// </summary> /// <param name="appSettings"></param> /// <param name="directory"></param> /// <param name="dictaatFactory"></param> /// <param name="context"></param> public DictaatRepository( IOptions <ConfigVariables> appSettings, IGoogleAnalytics analyticsRepo, IDirectory directory, IFile file, Core.IJson json, WebdictaatContext context) { _directoryRoot = appSettings.Value.DictaatRoot; _pagesDirectory = appSettings.Value.PagesDirectory; _dictatenDirectory = appSettings.Value.DictatenDirectory; _templatesDirectory = appSettings.Value.TemplatesDirectory; var menuConfigName = appSettings.Value.MenuConfigName; _analyticsRepo = analyticsRepo; _directory = directory; _context = context; //best place to build the factory _dictaatFactory = new DictaatFactory(appSettings.Value, directory, file, json); _pathHelper = new PathHelper(appSettings.Value); }