コード例 #1
0
ファイル: mvcHelper.cs プロジェクト: jacov/nor-port
        public static LoggingTime PerformanceTimeStart(
            string domainName,
            string layerName,
            string className,
            string methodName,
            Guid?userId = null
            )
        {
            var log = new LoggingTime();

            log.DomainName = domainName;
            log.LayerName  = layerName;
            log.ClassName  = className;
            log.MethodName = methodName;

            if (userId != null)
            {
                log.UserId = ( Guid )userId;
            }

            log.StopWatch = new Stopwatch();
            log.StopWatch.Start();

            return(log);
        }
コード例 #2
0
ファイル: mvcHelper.cs プロジェクト: jacov/nor-port
        public static LoggingTime PerformanceTimeStart(
            string commandName
            )
        {
            var log = new LoggingTime();

            log.MethodName = commandName;
            log.StopWatch  = new Stopwatch();
            log.StopWatch.Start();

            return(log);
        }
コード例 #3
0
ファイル: BookingController.cs プロジェクト: jacov/nor-port
        public ActionResult BookingTest()
        {
            LoggingTime log = LoggingTime.PerformanceTimeStart("BookingListIndex");

            BookingListIndex();
            new BookingController().BookingListIndex();
            new BookieController().BookieIndex(new BookieContract(), null);

            log.PerformanceTimeStop();
            ViewBag.Result = "Elapsed: " + log.StopWatch.ElapsedMilliseconds;

            return(View());
        }