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

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

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