예제 #1
0
 private void AddPrimaryOrArchiveMailboxInfo(IMailboxLocationInfo locationInfo)
 {
     this.ValidateIsPrimaryOrArchive(locationInfo.MailboxLocationType);
     if (this.propertyBag == null)
     {
         this.newArchiveAndExchangeInfo.Add(locationInfo);
         return;
     }
     if (locationInfo.MailboxLocationType == MailboxLocationType.Primary)
     {
         this.propertyBag[IADMailStorageSchema.ExchangeGuid] = locationInfo.MailboxGuid;
         this.propertyBag[IADMailStorageSchema.Database]     = locationInfo.DatabaseLocation;
         return;
     }
     this.propertyBag[IADMailStorageSchema.ArchiveGuid] = locationInfo.MailboxGuid;
     ADRecipient.ArchiveDatabaseSetter(locationInfo.DatabaseLocation, this.propertyBag);
 }
예제 #2
0
 private void RemovePrimaryOrArchiveMailboxInfo(MailboxLocationType mailboxLocationType)
 {
     this.ValidateIsPrimaryOrArchive(mailboxLocationType);
     if (this.propertyBag == null)
     {
         for (int i = 0; i < this.newArchiveAndExchangeInfo.Count; i++)
         {
             if (this.newArchiveAndExchangeInfo[i].MailboxLocationType == mailboxLocationType)
             {
                 this.newArchiveAndExchangeInfo.RemoveAt(i);
                 return;
             }
         }
         return;
     }
     if (mailboxLocationType == MailboxLocationType.Primary)
     {
         this.propertyBag[IADMailStorageSchema.ExchangeGuid] = null;
         this.propertyBag[IADMailStorageSchema.Database]     = null;
         return;
     }
     this.propertyBag[IADMailStorageSchema.ArchiveGuid] = null;
     ADRecipient.ArchiveDatabaseSetter(null, this.propertyBag);
 }