示例#1
0
        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
        public static LoggingTime PerformanceTimeStart(
            string commandName
            )
        {
            var log = new LoggingTime();

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

            return(log);
        }