コード例 #1
0
 public static void AddFlashMessage(this TempDataDictionary dictionary, UserMessage flashMessage)
 {
     var messages = (ICollection<UserMessage>)dictionary[FlashMessageKey];
     if (messages == null)
     {
         messages = new List<UserMessage>();
         dictionary[FlashMessageKey] = messages;
     }
     messages.Add(flashMessage);
 }
コード例 #2
0
 protected void AddUserMessage(UserMessage message)
 {
     TempData.AddFlashMessage(message);
 }