public AcidCodeCompiler(string codetext) { _codetext = codetext; _isCodeCompiled = false; _compiledCode = null; _compilationErrors = String.Empty; _siteSettings = new GeneralSiteSettings(); }
private NewUserWelcomeMailTemplate MapEmailTemplate(AddUserCommand user, GeneralSiteSettings siteSettings) { var template = new NewUserWelcomeMailTemplate(); template.FirstName = user.FirstName; template.LastName = user.LastName; template.TemporaryPassword = new HtmlString(user.Password); template.ApplicationName = siteSettings.ApplicationName; return(template); }
public ActionResult Index(GeneralSiteSettings generalSiteSettings) { if (!ModelState.IsValid) { return(View(new AdministrationViewModel { SiteSettings = generalSiteSettings, SectionName = "settings" })); } _acidRepos.SaveSettings(generalSiteSettings); return(View(new AdministrationViewModel { SiteSettings = generalSiteSettings, SectionName = "settings", AdminMessage = "Settings saved" })); }
public void SaveSettings(GeneralSiteSettings settings) { settings = settings ?? throw new ArgumentNullException(nameof(settings)); var dbEntry = _dbContext.GeneralSiteSettings.SingleOrDefault(); if (dbEntry == null) { _dbContext.GeneralSiteSettings.Add(settings); } else { dbEntry.CompilationTime = settings.CompilationTime; dbEntry.RunningTime = settings.RunningTime; } _dbContext.SaveChanges(); }
public AcidCodeCompiler(string codetext, GeneralSiteSettings siteSettings) : this(codetext) { _siteSettings = siteSettings ?? throw new ArgumentNullException(nameof(siteSettings)); }
public AcidCodeRunner(IAcidCodeCompiler codeCompiler, GeneralSiteSettings siteSettings) : this(codeCompiler) { _siteSettings = siteSettings ?? throw new ArgumentNullException(nameof(siteSettings)); }
public AcidCodeRunner(IAcidCodeCompiler codeCompiler) { _codeCompiler = codeCompiler ?? throw new ArgumentNullException(nameof(codeCompiler)); _siteSettings = new GeneralSiteSettings(); }