public InstantMessageOperationError StartProvider(MailboxSession session) { ExTraceGlobals.InstantMessagingTracer.TraceDebug((long)this.GetHashCode(), "InstantMessageManager.StartProvider."); if ((this.provider == null || this.provider.IsDisposed) && this.userContext.InstantMessageType == InstantMessagingTypeOptions.Ocs) { this.Subscribe("InstantMessageNotification"); Stopwatch stopwatch = Stopwatch.StartNew(); this.provider = InstantMessageOCSProvider.Create(this.userContext, this.notifier); stopwatch.Stop(); OwaApplication.GetRequestDetailsLogger.Set(InstantMessageSignIn.LogMetadata.CreateProvider, stopwatch.ElapsedMilliseconds); } if (this.provider == null) { return(InstantMessageOperationError.UnableToCreateProvider); } Stopwatch stopwatch2 = Stopwatch.StartNew(); this.Provider.EstablishSession(); stopwatch2.Stop(); OwaApplication.GetRequestDetailsLogger.Set(InstantMessageSignIn.LogMetadata.EstablishSession, stopwatch2.ElapsedMilliseconds); Stopwatch stopwatch3 = Stopwatch.StartNew(); this.Provider.GetExpandedGroups(session); stopwatch3.Stop(); OwaApplication.GetRequestDetailsLogger.Set(InstantMessageSignIn.LogMetadata.GetExpandedGroups, stopwatch3.ElapsedMilliseconds); Stopwatch stopwatch4 = Stopwatch.StartNew(); this.ResetPresence(true); stopwatch4.Stop(); OwaApplication.GetRequestDetailsLogger.Set(InstantMessageSignIn.LogMetadata.ResetPresence, stopwatch4.ElapsedMilliseconds); return(InstantMessageOperationError.Success); }
private void StartOcsProvider() { this.provider = InstantMessageOCSProvider.Create(this.userContext, this.payload); }