Ejemplo n.º 1
0
 private void InstantiateLogger()
 {
     var kernel = Utilities.CreateKernel();
     var loggerFactory = kernel.Get<ILoggerFactory>();
     var logger = loggerFactory.GetCurrentClassLogger();
     var context = new MonitoredScopeContext(string.Format("Provider Scope {0}", this.GetType()));
     MonitoredScope = new MonitoredScope(logger, context);
 }
Ejemplo n.º 2
0
        public MonitoredScope(ILogger log, MonitoredScopeContext monitoredScopeContext)
        {
            if (log == null)
                throw new ArgumentNullException("log");

            if (monitoredScopeContext == null)
                throw new ArgumentNullException("monitoredScopeContext");

            Logger = log;
            Context = monitoredScopeContext;

            LogScopeStart();
        }