Example #1
0
        public IActionResult CreateOrEdit(CreateOrEditViewModel createOrEdit)
        {
            if (this.ModelState.IsValid)
            {
                if (!string.IsNullOrEmpty(createOrEdit.Id))
                {
                    System.IO.File.Delete(PathManager.GetStylePath(this, createOrEdit.Id));
                }

                System.IO.File.WriteAllText(PathManager.GetStylePath(this, createOrEdit.Filename), createOrEdit.Content);
                BandleManager.RebuildAllBundles(this);
                return(this.RedirectToAction("Index"));
            }

            return(this.CreateRedirectToSelfResult());
        }
Example #2
0
 public void HandleEvent(IRequestHandler requestHandler, string filename)
 {
     BandleManager.RebuildAllBundles(requestHandler);
 }