/// <summary> /// Uses the extension method to get the list of alerts from temp data /// add a new alert to this list and then hand the execution off to /// the innerResult /// </summary> /// <param name="context"></param> public override void ExecuteResult(ControllerContext context) { Toastr toastr = context.Controller.TempData.GetToastr(); toastr.AddToastMessage(Title, Message, Style, CloseButton, ProgressBar, CloseWindowButtonShown); InnerResult.ExecuteResult(context); }
public static Toastr GetToastr(this TempDataDictionary tempData) { if (!tempData.ContainsKey(Toastr)) { tempData[Toastr] = new Toastr(); } return((Toastr)tempData[Toastr]); }