public static List <Toastr> GetToastrListFromMessageList(List <Message> Messages) { var ToastrList = new List <Toastr>(); if (Messages != null) { foreach (Message message in Messages) { Toastr toast = message as Toastr; ToastrList.Add(toast); } } return((List <Toastr>)ToastrList); }
public static List <Toastr> GetToastrListFromIMessageList(List <IMessage> IMessages) { var ToastrList = new List <Toastr>(); if (IMessages != null) { foreach (IMessage imessage in IMessages) { Message message = imessage as Message; Toastr toast = new Toastr { Title = "Toast", Type = StatusCode.Error, Text = "Nothing to say" }; ToastrList.Add(toast); } } return((List <Toastr>)ToastrList); }