Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 15 additions & 35 deletions blazorbootstrap/Models/ToastMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,67 +9,47 @@ public ToastMessage()
Id = Guid.NewGuid();
}

public ToastMessage(ToastType type, string message)
public ToastMessage(ToastType type)
: this()
{
Id = Guid.NewGuid();
Type = type;
}

public ToastMessage(ToastType type, string message)
: this(type)
{
Message = message;
}

public ToastMessage(ToastType type, string title, string message)
: this(type, message)
{
Id = Guid.NewGuid();
Type = type;
Title = title;
Message = message;
}

public ToastMessage(ToastType type, IconName iconName, string title, string message)
: this(type, title, message)
{
Id = Guid.NewGuid();
Type = type;
IconName = iconName;
Title = title;
Message = message;
}

public ToastMessage(ToastType type, string customIconName, string title, string message)
: this(type, title, message)
{
Id = Guid.NewGuid();
Type = type;
CustomIconName = customIconName;
Title = title;
Message = message;
}

public ToastMessage(ToastType type, IconName iconName, string title, string helpText, string message)
public ToastMessage(ToastType type, IconName iconName, string title, string helpText, string message, bool autoHide = false)
: this(type, iconName, title, message)
{
Id = Guid.NewGuid();
Type = type;
IconName = iconName;
Title = title;
HelpText = helpText;
Message = message;
}

public ToastMessage(ToastType type, string customIconName, string title, string helpText, string message)
{
Id = Guid.NewGuid();
Type = type;
CustomIconName = customIconName;
Title = title;
HelpText = helpText;
Message = message;
AutoHide = autoHide;
}

public ToastMessage(ToastType type, string customIconName, string title, string helpText, string message, bool autoHide)
public ToastMessage(ToastType type, string customIconName, string title, string helpText, string message, bool autoHide = false)
: this(type, customIconName, title, message)
{
Id = Guid.NewGuid();
Type = type;
CustomIconName = customIconName;
Title = title;
HelpText = helpText;
Message = message;
AutoHide = autoHide;
}

Expand Down
Loading