Beispiel #1
0
        // Token: 0x06001B1F RID: 6943 RVA: 0x00066E90 File Offset: 0x00065090
        private bool ShouldSignIn(UserContext userContext)
        {
            Stopwatch stopwatch = Stopwatch.StartNew();
            bool      result;

            try
            {
                if (this.signedInManually)
                {
                    InstantMessageUtilities.SetSignedOutFlag(base.MailboxIdentityMailboxSession, false);
                }
                else if (InstantMessageUtilities.IsSignedOut(base.MailboxIdentityMailboxSession))
                {
                    InstantMessageNotifier notifier = userContext.InstantMessageManager.Notifier;
                    if (notifier != null)
                    {
                        InstantMessagePayloadUtilities.GenerateUnavailablePayload(notifier, null, "Not signed in because IsSignedOutOfIM was true.", InstantMessageServiceError.ClientSignOut, false);
                    }
                    return(false);
                }
                result = true;
            }
            finally
            {
                stopwatch.Stop();
                OwaApplication.GetRequestDetailsLogger.Set(InstantMessageSignIn.LogMetadata.HandleSignOutFlag, stopwatch.ElapsedMilliseconds);
            }
            return(result);
        }
        public void TerminateProvider(string reason)
        {
            ExTraceGlobals.InstantMessagingTracer.TraceDebug((long)this.GetHashCode(), "InstantMessageManager.TerminateProvider.");
            InstantMessageProvider instantMessageProvider = Interlocked.Exchange <InstantMessageProvider>(ref this.provider, null);

            if (instantMessageProvider != null)
            {
                if (this.notifier != null)
                {
                    InstantMessagePayloadUtilities.GenerateUnavailablePayload(this.notifier, null, "Disconnected from IM by server due to timeout: " + reason, InstantMessageServiceError.ServerTimeout, false);
                }
                instantMessageProvider.Dispose();
            }
        }
        public void SignOut()
        {
            ExTraceGlobals.InstantMessagingTracer.TraceDebug((long)this.GetHashCode(), "InstantMessageManager.SignOut.");
            InstantMessageProvider instantMessageProvider = Interlocked.Exchange <InstantMessageProvider>(ref this.provider, null);

            if (instantMessageProvider != null)
            {
                if (this.notifier != null)
                {
                    InstantMessagePayloadUtilities.GenerateUnavailablePayload(this.notifier, null, "Signed out manually.", InstantMessageServiceError.ClientSignOut, false);
                }
                instantMessageProvider.Dispose();
            }
        }
 // Token: 0x06000B8C RID: 2956 RVA: 0x0002C9F0 File Offset: 0x0002ABF0
 internal static void GenerateUnavailablePayload(InstantMessageNotifier notifier, Exception exception, string errorLocation, InstantMessageServiceError errorCode, bool recurseThroughException)
 {
     InstantMessagePayloadUtilities.GenerateUnavailablePayload(notifier, exception, errorLocation, errorCode, 0, recurseThroughException);
 }