Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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;
        }