private void AddMessageToPropertyBag(string message, string Type) { List<string> messages = new List<string>(); if (PropertyBag.Contains(Type) && PropertyBag[Type] != null) { messages.AddRange((IEnumerable<string>) PropertyBag[Type]); } if (string.IsNullOrEmpty(message)) return; messages.Add(message); PropertyBag[Type] = messages; }
private void AddMessageToFlashBag(string message, string Type) { List<string> messages = new List<string>(); if (Flash.Contains(Type) && Flash[Type] != null) { messages.AddRange((IEnumerable<string>) Flash[Type]); } if (string.IsNullOrEmpty(message)) return; messages.Add(message); Flash[Type] = messages; }