Пример #1
0
        public static ActivitySession Create(MailboxSession session)
        {
            Util.ThrowOnNullArgument(session, "session");
            if (!ActivityLogHelper.IsActivityLoggingEnabled(false))
            {
                return(null);
            }
            if (session.LogonType == LogonType.Delegated || session.LogonType == LogonType.DelegatedAdmin)
            {
                ExTraceGlobals.SessionTracer.TraceDebug(0L, "Skipping Activity Logging since session is from delegate.");
                return(null);
            }
            IActivityLogger activityLogger = ActivityLogger.Create(session);

            if (activityLogger == null)
            {
                ExTraceGlobals.SessionTracer.TraceDebug(0L, "Skipping Activity Logging since the activity logger couldn't be created");
                return(null);
            }
            ActivitySession.ClientInfo clientInfo = ActivitySession.ExtractClientInfo(session);
            return(new ActivitySession(session, clientInfo, activityLogger));
        }
Пример #2
0
 public static IActivityLogger Create()
 {
     return(ActivityLogger.Create(null));
 }