示例#1
0
        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.payload != null)
                {
                    InstantMessagePayloadUtilities.GenerateUnavailablePayload(this.payload, null, "Signed out manually.", InstantMessageFailure.ClientSignOut, false);
                }
                instantMessageProvider.Dispose();
            }
        }
示例#2
0
        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.payload != null)
                {
                    InstantMessagePayloadUtilities.GenerateUnavailablePayload(this.payload, null, "Disconnected from IM by server due to timeout: " + reason, InstantMessageFailure.ServerTimeout, false);
                }
                instantMessageProvider.Dispose();
            }
        }
示例#3
0
 public void StartProvider()
 {
     ExTraceGlobals.InstantMessagingTracer.TraceDebug((long)this.GetHashCode(), "InstantMessageManager.StartProvider.");
     if (this.userContext.IsSignedOutOfIM())
     {
         if (this.payload != null)
         {
             InstantMessagePayloadUtilities.GenerateUnavailablePayload(this.payload, null, "Not signed in because IsSignedOutOfIM was true.", InstantMessageFailure.ClientSignOut, false);
         }
     }
     else if ((this.provider == null || this.provider.IsDisposed) && this.userContext.InstantMessagingType == InstantMessagingTypeOptions.Ocs)
     {
         this.StartOcsProvider();
     }
     if (this.provider != null)
     {
         this.Provider.EstablishSession();
     }
 }
示例#4
0
 // Token: 0x06000AFB RID: 2811 RVA: 0x0004DB30 File Offset: 0x0004BD30
 internal static void GenerateUnavailablePayload(InstantMessagePayload payload, Exception exception, string errorLocation, InstantMessageFailure errorCode, bool recurseThroughException)
 {
     InstantMessagePayloadUtilities.GenerateUnavailablePayload(payload, exception, errorLocation, errorCode, 0, recurseThroughException);
 }