示例#1
0
 internal static bool DoesAnySubFolderResideInTargetMailbox(FolderRecWrapper folderRec, Guid targetMailboxGuid, List <FolderToMailboxMapping> folderToMailboxMap)
 {
     return(folderRec.IsTargetMailbox(targetMailboxGuid, delegate(string fullFolderName)
     {
         string text = PublicFolderMailboxMigrator.NormalizeFolderPath(folderRec.FullFolderName);
         HashSet <Guid> hashSet = null;
         if (!string.IsNullOrWhiteSpace(text))
         {
             int num = text.Length;
             if (text.EndsWith("\\", StringComparison.OrdinalIgnoreCase))
             {
                 num = text.Length - 1;
             }
             foreach (FolderToMailboxMapping folderToMailboxMapping in folderToMailboxMap)
             {
                 string text2 = folderToMailboxMapping.FolderName;
                 text2 = ((text2.IndexOf('ÿ') > -1) ? text2.Replace('ÿ', "\\"[0]) : text2);
                 if (text2.Length > num + 1 && text2[num] == "\\"[0] && text2.StartsWith(text, StringComparison.OrdinalIgnoreCase))
                 {
                     if (hashSet == null)
                     {
                         hashSet = new HashSet <Guid>();
                     }
                     hashSet.Add(folderToMailboxMapping.MailboxGuid);
                 }
             }
         }
         return hashSet;
     }));
 }
示例#2
0
 private Guid GetContentMailboxGuid(FolderRecWrapper sourceFolderRec)
 {
     return(sourceFolderRec.GetContentMailboxGuid(delegate(string fullFolderName)
     {
         fullFolderName = PublicFolderMailboxMigrator.NormalizeFolderPath(sourceFolderRec.FullFolderName);
         if (string.IsNullOrWhiteSpace(fullFolderName))
         {
             return this.publicFolderConfiguration.GetHierarchyMailboxInformation().HierarchyMailboxGuid;
         }
         Guid result = this.publicFolderConfiguration.GetHierarchyMailboxInformation().HierarchyMailboxGuid;
         int num = 0;
         foreach (FolderToMailboxMapping folderToMailboxMapping in this.folderToMailboxMap)
         {
             string text = folderToMailboxMapping.FolderName;
             text = ((text.IndexOf('ÿ') > -1) ? text.Replace('ÿ', "\\"[0]) : text);
             if (fullFolderName.StartsWith(text, StringComparison.OrdinalIgnoreCase) && text.Length >= num)
             {
                 num = text.Length;
                 result = folderToMailboxMapping.MailboxGuid;
             }
         }
         return result;
     }));
 }
示例#3
0
 private bool DoesAnySubFolderResideInTargetMailbox(FolderRecWrapper folderRec)
 {
     return(PublicFolderMailboxMigrator.DoesAnySubFolderResideInTargetMailbox(folderRec, base.TargetMailboxGuid, this.folderToMailboxMap));
 }