示例#1
0
        private static IFlash AddMessage(
            this IFlash flash,
            string type,
            string content,
            string title = null,
            string key   = null)
        {
            if (string.IsNullOrWhiteSpace(type))
            {
                throw new ArgumentNullException(nameof(type));
            }

            flash.Push(new Message {
                Type = type, Content = content, Key = key, Title = title
            });
            return(flash);
        }