示例#1
0
        /// <summary>
        /// Creates an instance of Context
        /// </summary>
        public LoggingContext(Guid activityId, string loggerComponentInfo, SessionInfo session, LoggingContext parent = null, ILoggingQueue loggingQueue = null)
        {
            // TODO: we want to always have a component info for debugging purposes.
            // However right now, PerformanceMeasurement and TimedBlock allow nulls and their behavior depends on whether this vaslue is null.
            // Fix these classes and enable this contract check.
            // Contract.Requires(loggerComponentInfo != null);
            Contract.Requires(session != null);

            ActivityId          = activityId;
            LoggerComponentInfo = loggerComponentInfo;
            Session             = session;
            Parent         = parent;
            m_loggingQueue = loggingQueue ?? parent?.m_loggingQueue;
        }
示例#2
0
 public LoggingTask(ILoggingQueue loggingQueue)
 {
     _loggingQueue = loggingQueue;
 }