Ejemplo n.º 1
0
 public static void TerminateSession(IMailboxContext userContext, CacheItemRemovedReason abandonedReason)
 {
     ExTraceGlobals.UserContextTracer.TraceDebug(0L, "UserContextManager.TerminateSession");
     if (userContext == null)
     {
         throw new ArgumentNullException("userContext");
     }
     try
     {
         userContext.LogBreadcrumb("TerminateSession");
         string text = string.Empty;
         if (userContext.LogonIdentity != null && userContext.LogonIdentity.UserSid != null)
         {
             text = userContext.LogonIdentity.UserSid.ToString();
         }
         if (!string.IsNullOrEmpty(text))
         {
             PerformanceCounterManager.UpdatePerfCounteronUserContextDeletion(text, false, false, Globals.ArePerfCountersEnabled);
         }
     }
     finally
     {
         userContext.Dispose();
         userContext = null;
     }
 }
Ejemplo n.º 2
0
        internal static void RecordUserContextDeletion(OwaIdentity logonIdentity, UserContext userContext)
        {
            string userName = logonIdentity.UserSid.ToString();

            PerformanceCounterManager.UpdatePerfCounteronUserContextDeletion(userName, userContext.IsProxy, userContext.IsBasicExperience, Globals.ArePerfCountersEnabled);
        }