Exemple #1
0
 public static BackEndServer GetBackEndServer(MiniRecipient miniRecipient)
 {
     if (miniRecipient == null)
     {
         throw new ArgumentNullException("miniRecipient");
     }
     return(BackEndLocator.CallWithExceptionHandling <BackEndServer>(() => BackEndLocator.GetBackEndServerByDatabase(miniRecipient.Database, miniRecipient.OrganizationId, miniRecipient.PrimarySmtpAddress)));
 }
Exemple #2
0
 public static IList <BackEndServer> GetBackEndServerList(MiniRecipient miniRecipient, int maxServers)
 {
     if (miniRecipient == null)
     {
         throw new ArgumentNullException("miniRecipient");
     }
     return(BackEndLocator.CallWithExceptionHandling <IList <BackEndServer> >(() => BackEndLocator.GetBackEndServerListForDatabase(miniRecipient.Database, miniRecipient.OrganizationId, miniRecipient.PrimarySmtpAddress, maxServers)));
 }
Exemple #3
0
 public static BackEndServer GetBackEndServer(ADObjectId database)
 {
     if (database == null)
     {
         throw new ArgumentNullException("database");
     }
     return(BackEndLocator.CallWithExceptionHandling <BackEndServer>(() => BackEndLocator.GetBackEndServerByDatabase(database, null, default(SmtpAddress))));
 }
Exemple #4
0
 public static BackEndServer GetBackEndServer(ADUser aduser)
 {
     if (aduser == null)
     {
         throw new ArgumentNullException("aduser");
     }
     return(BackEndLocator.CallWithExceptionHandling <BackEndServer>(() => BackEndLocator.GetBackEndServerByDatabase(aduser.Database, aduser.OrganizationId, aduser.PrimarySmtpAddress)));
 }
Exemple #5
0
 private static Uri GetBackEndHttpServiceUrl <ServiceType>(BackEndServer backEndServer) where ServiceType : HttpService
 {
     if (backEndServer == null)
     {
         throw new ArgumentNullException("backEndServer");
     }
     return(BackEndLocator.CallWithExceptionHandling <Uri>(() => HttpProxyBackEndHelper.GetBackEndServiceUrlByServer <ServiceType>(backEndServer)));
 }
Exemple #6
0
 private static Uri GetBackEndHttpServiceUrl <ServiceType>(IMailboxInfo mailbox) where ServiceType : HttpService
 {
     if (mailbox == null)
     {
         throw new ArgumentNullException("mailbox");
     }
     return(BackEndLocator.CallWithExceptionHandling <Uri>(delegate
     {
         BackEndServer backEndServer = BackEndLocator.GetBackEndServer(mailbox);
         return HttpProxyBackEndHelper.GetBackEndServiceUrlByServer <ServiceType>(backEndServer);
     }));
 }
Exemple #7
0
 public static BackEndServer GetBackEndServer(IMailboxInfo mailbox)
 {
     if (mailbox == null)
     {
         throw new ArgumentNullException("mailbox");
     }
     return(BackEndLocator.CallWithExceptionHandling <BackEndServer>(delegate
     {
         if (mailbox.Location != null)
         {
             BackEndServer backEndServer = new BackEndServer(mailbox.Location.ServerFqdn, mailbox.Location.ServerVersion);
             ExTraceGlobals.CafeTracer.TraceDebug <BackEndServer, IMailboxInfo>(0L, "[BackEndLocator.GetBackEndServer] Returns back end server {0} for Mailbox {1}", backEndServer, mailbox);
             return backEndServer;
         }
         return BackEndLocator.GetBackEndServerByDatabase(mailbox.MailboxDatabase, mailbox.OrganizationId, mailbox.PrimarySmtpAddress);
     }));
 }
Exemple #8
0
 public static BackEndServer GetAnyBackEndServer()
 {
     return(BackEndLocator.CallWithExceptionHandling <BackEndServer>(() => HttpProxyBackEndHelper.GetAnyBackEndServer()));
 }