Esempio n. 1
0
        private MailboxSession CreateMailboxSession()
        {
            ExTraceGlobals.SharingTracer.TraceDebug <SecurityIdentifier>((long)this.GetHashCode(), "Create mailbox session as SystemService for sid {0}.", this.sid);
            MailboxSession mailboxSession = MailboxSession.OpenAsSystemService(ExchangePrincipal.FromUserSid(this.RecipientSession, this.sid), Thread.CurrentThread.CurrentCulture, "Client=AS;Action=PublishedFolder");

            if (this.budget != null)
            {
                mailboxSession.AccountingObject = this.budget;
            }
            mailboxSession.ExTimeZone = (TimeZoneHelper.GetUserTimeZone(mailboxSession) ?? ExTimeZone.CurrentTimeZone);
            return(mailboxSession);
        }
Esempio n. 2
0
 public ExchangePrincipal CreateExchangePrincipal()
 {
     this.CheckDisposed("CreateExchangePrincipal");
     return(ExchangePrincipal.FromUserSid(this.RecipientSession, this.sid, RemotingOptions.AllowCrossSite));
 }