Пример #1
0
        public IViewComponentResult Invoke()
        {
            var model = new ToastNotificationViewModel()
            {
                ToastMessages    = _tempDataWrapper.Get <IEnumerable <ToastMessage> >(Constants.TempDataKey),
                GlobalOptionJson = _globalOption.MergeWith(ToastOption.Defaults).Json
            };

            return(View("ToastrView", model));
        }
Пример #2
0
        public IViewComponentResult Invoke()
        {
            var model = new ToastNotificationViewModel()
            {
                ToastMessagesJson = _toastNotification.ReadAllMessages().ToJson(),
                GlobalOptionJson  = _globalOption.MergeWith(ToastOption.Defaults).Json,
                RequestHeaderKey  = Constants.RequestHeaderKey,
                LibraryName       = _nToastNotifyOption.Library.ToString().ToLower()
            };

            return(View("ToastrView", model));
        }
Пример #3
0
        public IViewComponentResult Invoke()
        {
            var model = new ToastNotificationViewModel()
            {
                ToastMessagesJson = _toastNotification.ReadAllMessages().ToJson(),
                GlobalOptionJson  = _globalOption.Json,
                ResponseHeaderKey = Constants.ResponseHeaderKey,
                RequestHeaderKey  = Constants.RequestHeaderKey,
                LibraryDetails    = _nToastNotifyOption.LibraryDetails,
                Hash = Utils.GetEmbeddedFileProvider().GetFileInfo($"js.dist.{_nToastNotifyOption.LibraryDetails.VarName}.js").LastModified.DateTime.ToString("yyyyMMddhhss")
            };

            return(View("ToastView", model));
        }