// Token: 0x06000B9B RID: 2971 RVA: 0x0005148C File Offset: 0x0004F68C public static bool Edit(string oldEmail, string newEmail, JunkEmailListType junkEmailListType, UserContext userContext, bool isFromOptions, out string message) { if (string.IsNullOrEmpty(oldEmail)) { throw new ArgumentNullException("oldEmail", "oldEmail cannot be null or empty"); } if (string.IsNullOrEmpty(newEmail)) { throw new ArgumentNullException("newEmail", "newEmail cannot be null or empty"); } if (userContext == null) { throw new ArgumentNullException("userContext"); } bool flag = true; message = string.Empty; string empty = string.Empty; JunkEmailRule junkEmailRule = userContext.MailboxSession.JunkEmailRule; string[] email = new string[] { oldEmail }; JunkEmailUtilities.InternalRemove(junkEmailRule, email, junkEmailListType, userContext); if (!JunkEmailUtilities.InternalAdd(junkEmailRule, newEmail, junkEmailListType, userContext, isFromOptions, out message)) { flag = false; } if (flag) { junkEmailRule.Save(); } return(flag); }
// Token: 0x06000B98 RID: 2968 RVA: 0x000512F8 File Offset: 0x0004F4F8 public static bool Add(string email, JunkEmailListType junkEmailListType, UserContext userContext, bool isFromOptions, out string message) { if (string.IsNullOrEmpty(email)) { throw new ArgumentNullException("email", "email cannot be null or empty"); } if (userContext == null) { throw new ArgumentNullException("userContext"); } JunkEmailRule junkEmailRule = userContext.MailboxSession.JunkEmailRule; bool flag = JunkEmailUtilities.InternalAdd(junkEmailRule, email, junkEmailListType, userContext, isFromOptions, out message); if (flag) { junkEmailRule.Save(); } return(flag); }