コード例 #1
0
ファイル: OwaIdentity.cs プロジェクト: YHZX2013/exchange_diff
        internal static OwaIdentity CreateOwaIdentityFromExplicitLogonAddress(string smtpAddress)
        {
            OwaIdentity result = OwaMiniRecipientIdentity.CreateFromProxyAddress(smtpAddress);

            ExTraceGlobals.CoreTracer.TraceDebug <string>(0L, "The request is under explicit logon: {0}", smtpAddress);
            return(result);
        }
コード例 #2
0
        // Token: 0x06000693 RID: 1683 RVA: 0x00013B28 File Offset: 0x00011D28
        public override bool IsEqualsTo(OwaIdentity otherIdentity)
        {
            if (otherIdentity == null)
            {
                return(false);
            }
            OwaMiniRecipientIdentity owaMiniRecipientIdentity = otherIdentity as OwaMiniRecipientIdentity;

            if (owaMiniRecipientIdentity == null)
            {
                throw new OwaInvalidOperationException("Comparing OwaMiniRecipientIdentity with identities of another type is not supported");
            }
            return(owaMiniRecipientIdentity.ProxyAddress == this.proxyAddress);
        }
コード例 #3
0
        protected virtual void DoLoad(OwaIdentity logonIdentity, OwaIdentity mailboxIdentity, UserContextStatistics stats)
        {
            if (logonIdentity == null)
            {
                throw new ArgumentNullException("logonIdentity");
            }
            this.logonIdentity = logonIdentity;
            if (mailboxIdentity != null)
            {
                this.isExplicitLogon = true;
                this.mailboxIdentity = mailboxIdentity;
            }
            else
            {
                this.mailboxIdentity = logonIdentity;
            }
            if (this.IsExplicitLogon)
            {
                ExTraceGlobals.CoreTracer.TraceDebug <string>(0L, "Created partial mailbox identity from SMTP address={0}", mailboxIdentity.SafeGetRenderableName());
                OwaMiniRecipientIdentity owaMiniRecipientIdentity = this.mailboxIdentity as OwaMiniRecipientIdentity;
                try
                {
                    owaMiniRecipientIdentity.UpgradePartialIdentity();
                }
                catch (DataValidationException ex)
                {
                    PropertyValidationError propertyValidationError = ex.Error as PropertyValidationError;
                    if (propertyValidationError == null || propertyValidationError.PropertyDefinition != MiniRecipientSchema.Languages)
                    {
                        throw;
                    }
                    OWAMiniRecipient owaminiRecipient = this.MailboxIdentity.FixCorruptOWAMiniRecipientCultureEntry();
                    if (owaminiRecipient != null)
                    {
                        this.mailboxIdentity = OwaMiniRecipientIdentity.CreateFromOWAMiniRecipient(owaminiRecipient);
                    }
                }
            }
            Stopwatch stopwatch = Stopwatch.StartNew();

            this.exchangePrincipal = this.mailboxIdentity.CreateExchangePrincipal();
            stats.ExchangePrincipalCreationTime = (int)stopwatch.ElapsedMilliseconds;
            this.LogTrace("UserContextBase.Load", "CreateExchangePrincipal finished");
            this.pendingRequestManager = new PendingRequestManager(this, ListenerChannelsManager.Instance);
        }