Пример #1
0
        public void ExecuteSomething()
        {
            var tracker = _perfLogger.Start("servicea_execute_something");

            tracker.End();
            // Do nothing
        }
Пример #2
0
        public void ExecuteSomething()
        {
            var tracker = _perfLogger.Start("servicea_execute_something");

            // Simulate a long executing operation
            Thread.Sleep(25);

            tracker.End();
        }
        public void Intercept(IInvocation invocation)
        {
            // Start logging
            using (var track = _logger.Start(invocation.TargetType.FullName + "_" + invocation.Method.Name))
            {
                // Execute
                invocation.Proceed();

                // End performance tracking
                track.End();
            }
        }