// Token: 0x06000114 RID: 276 RVA: 0x00006670 File Offset: 0x00004870 internal static ImapDefaultFolderType GetDefaultFolderType(string mailboxName) { bool flag = false; bool flag2 = false; return(ImapMailbox.GetDefaultFolderType(mailboxName, out flag, out flag2)); }
// Token: 0x06000112 RID: 274 RVA: 0x000064E0 File Offset: 0x000046E0 internal static void EnsureDefaultFolderMappingTable(ILog log = null) { if (ImapMailbox.hasCreatedMappingTable) { return; } lock (ImapMailbox.MappingTableLock) { if (ImapMailbox.hasCreatedMappingTable) { return; } ImapMailbox.BuildDefaultFolderMappings(); ImapMailbox.hasCreatedMappingTable = true; } if (log != null) { foreach (KeyValuePair <string, KeyedPair <string, ImapDefaultFolderType> > keyValuePair in ImapMailbox.preferredDefaultFolderMappings) { log.Debug("Preferred Mapping: {0} => {1}", new object[] { keyValuePair.Key, keyValuePair.Value.Second }); } foreach (KeyValuePair <string, ImapDefaultFolderType> keyValuePair2 in ImapMailbox.secondaryDefaultFolderMappings) { log.Debug("Default Mapping: {0} => {1}", new object[] { keyValuePair2.Key, keyValuePair2.Value }); } } }
// Token: 0x06000043 RID: 67 RVA: 0x000032F4 File Offset: 0x000014F4 public ImapMailbox SelectImapMailbox(ImapMailbox imapMailbox) { base.CheckDisposed(); this.ThrowIfNotConnected(); AsyncOperationResult <ImapMailbox> asyncOperationResult = ImapConnectionCore.SelectImapMailbox(this.ConnectionContext, imapMailbox, null, null); this.ThrowIfExceptionNotNull(asyncOperationResult.Exception); return(asyncOperationResult.Data); }
// Token: 0x06000014 RID: 20 RVA: 0x000025B4 File Offset: 0x000007B4 internal void ResetAsStatus(string newCommandId, ImapMailbox imapMailbox) { this.Reset(ImapCommandType.Status, newCommandId, delegate(ImapCommand cmd) { string text = cmd.ConvertToQuotableString(((ImapMailbox)cmd.CommandParameters[0]).NameOnTheWire); return(string.Format(CultureInfo.InvariantCulture, "{0} STATUS \"{1}\" (UIDNEXT)\r\n", new object[] { cmd.CommandId, text })); }, new object[] { imapMailbox }); }
// Token: 0x06000116 RID: 278 RVA: 0x00006694 File Offset: 0x00004894 private static void BuildDefaultFolderMappings() { ImapMailbox.preferredDefaultFolderMappings = new Dictionary <string, KeyedPair <string, ImapDefaultFolderType> >(6, StringComparer.OrdinalIgnoreCase); ImapMailbox.secondaryDefaultFolderMappings = new Dictionary <string, ImapDefaultFolderType>(14, StringComparer.OrdinalIgnoreCase); ImapMailbox.preferredDefaultFolderMappings.Add(ImapMailbox.Inbox, new KeyedPair <string, ImapDefaultFolderType>(ImapMailbox.Inbox, ImapDefaultFolderType.Inbox)); ImapMailbox.AddDefaultMappings(); CultureInfo[] installedLanguagePackCultures = LanguagePackInfo.GetInstalledLanguagePackCultures(LanguagePackType.Server); CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture; try { CultureInfo[] array = installedLanguagePackCultures; int i = 0; while (i < array.Length) { CultureInfo currentUICulture = array[i]; try { Thread.CurrentThread.CurrentUICulture = currentUICulture; } catch (NotSupportedException) { goto IL_73; } goto IL_6E; IL_73: i++; continue; IL_6E: ImapMailbox.AddDefaultMappings(); goto IL_73; } } finally { Thread.CurrentThread.CurrentCulture = currentCulture; } }
// Token: 0x06000118 RID: 280 RVA: 0x00006760 File Offset: 0x00004960 private static void AddDefaultMappings() { ImapMailbox.AddPreferredMapping(ImapUtilities.ToModifiedUTF7(CXStrings.ImapDeletedItems), ImapDefaultFolderType.DeletedItems); ImapMailbox.secondaryDefaultFolderMappings[ImapUtilities.ToModifiedUTF7(CXStrings.ImapDeletedMessages)] = ImapDefaultFolderType.DeletedItems; ImapMailbox.secondaryDefaultFolderMappings[ImapUtilities.ToModifiedUTF7(CXStrings.ImapTrash)] = ImapDefaultFolderType.DeletedItems; ImapMailbox.secondaryDefaultFolderMappings[ImapMailbox.InboxPrefix + ImapUtilities.ToModifiedUTF7(CXStrings.ImapTrash)] = ImapDefaultFolderType.DeletedItems; ImapMailbox.secondaryDefaultFolderMappings["[Gmail]/" + ImapUtilities.ToModifiedUTF7(CXStrings.ImapTrash)] = ImapDefaultFolderType.DeletedItems; ImapMailbox.AddPreferredMapping(ImapUtilities.ToModifiedUTF7(CXStrings.ImapDrafts), ImapDefaultFolderType.Drafts); ImapMailbox.secondaryDefaultFolderMappings[ImapUtilities.ToModifiedUTF7(CXStrings.ImapDraft)] = ImapDefaultFolderType.Drafts; ImapMailbox.secondaryDefaultFolderMappings[ImapMailbox.InboxPrefix + ImapUtilities.ToModifiedUTF7(CXStrings.ImapDrafts)] = ImapDefaultFolderType.Drafts; ImapMailbox.secondaryDefaultFolderMappings["[Gmail]/" + ImapUtilities.ToModifiedUTF7(CXStrings.ImapDrafts)] = ImapDefaultFolderType.Drafts; ImapMailbox.AddPreferredMapping(ImapUtilities.ToModifiedUTF7(CXStrings.ImapJunkEmail), ImapDefaultFolderType.JunkEmail); ImapMailbox.AddPreferredMapping("[Gmail]/" + ImapUtilities.ToModifiedUTF7(CXStrings.ImapSpam), ImapDefaultFolderType.JunkEmail); ImapMailbox.secondaryDefaultFolderMappings[ImapUtilities.ToModifiedUTF7(CXStrings.ImapSpam)] = ImapDefaultFolderType.JunkEmail; ImapMailbox.secondaryDefaultFolderMappings[ImapUtilities.ToModifiedUTF7(CXStrings.ImapJunk)] = ImapDefaultFolderType.JunkEmail; ImapMailbox.secondaryDefaultFolderMappings["[Gmail]/" + ImapUtilities.ToModifiedUTF7(CXStrings.ImapAllMail)] = ImapDefaultFolderType.JunkEmail; ImapMailbox.AddPreferredMapping(ImapUtilities.ToModifiedUTF7(CXStrings.ImapSentItems), ImapDefaultFolderType.SentItems); ImapMailbox.secondaryDefaultFolderMappings[ImapUtilities.ToModifiedUTF7(CXStrings.ImapSentMessages)] = ImapDefaultFolderType.SentItems; ImapMailbox.secondaryDefaultFolderMappings[ImapUtilities.ToModifiedUTF7(CXStrings.ImapSent)] = ImapDefaultFolderType.SentItems; ImapMailbox.secondaryDefaultFolderMappings[ImapMailbox.InboxPrefix + ImapUtilities.ToModifiedUTF7(CXStrings.ImapSentItems)] = ImapDefaultFolderType.SentItems; ImapMailbox.secondaryDefaultFolderMappings[ImapMailbox.InboxPrefix + ImapUtilities.ToModifiedUTF7(CXStrings.ImapSent)] = ImapDefaultFolderType.SentItems; ImapMailbox.secondaryDefaultFolderMappings["[Gmail]/" + ImapUtilities.ToModifiedUTF7(CXStrings.ImapSentMail)] = ImapDefaultFolderType.SentItems; }
internal static ImapMailFlags FilterFlagsAgainstSupported(ImapMailFlags incomingFlags, ImapMailbox mailbox) { ImapMailFlags imapMailFlags = ImapMailFlags.All; if (mailbox != null) { imapMailFlags = mailbox.PermanentFlags; } return(incomingFlags & imapMailFlags); }
internal ImapFolder(ImapMailbox mailbox) { this.Mailbox = mailbox; }