-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIFlash.cs
More file actions
41 lines (40 loc) · 1.48 KB
/
IFlash.cs
File metadata and controls
41 lines (40 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using FlashMessage.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace FlashMessage
{
public interface IFlash
{
/// <summary>
/// The list of messages that will be shown.
/// </summary>
public List<Message> Messages { get; set; }
/// <summary>
/// Adds a message to the lsit of messages.
/// </summary>
/// <param name="content">The content of the message.</param>
/// <param name="category">The type of message, e.g. error, success, warning, info, etc.</param>
/// <param name="cssClass">Allows the CSS to be overridden.</param>
public void Add(string content, FlashMessageCategory category, string overrideCssClass = "");
public void Clear();
public bool HasFlash(FlashMessageCategory category);
public FlashType MessageFlashType { get; set; }
/// <summary>
/// This ToString should return HTML for the flash.
/// </summary>
/// <returns></returns>
public string ToString();
public string ToString(FlashMessageCategory category);
public void Error(string message);
public void Info(string message);
public void Warning(string message);
public void Success(string message);
public void SaveSession();
public void ClearSession();
public void LoadSession();
}
}