Beispiel #1
0
        private static MiniProfiler ProfilerPocoToProfiler(MiniProfilerPoco profilerPoco)
        {
            if (profilerPoco == null)
            {
                return(null);
            }

#pragma warning disable 618
            var miniProfiler = new MiniProfiler
#pragma warning restore 618
            {
                Id                   = profilerPoco.Id,
                MachineName          = profilerPoco.MachineName,
                UserName             = profilerPoco.User,
                HasUserViewed        = profilerPoco.HasUserViewed,
                Name                 = profilerPoco.Name,
                Started              = profilerPoco.Started,
                RootTimingId         = profilerPoco.RootTimingId,
                DurationMilliseconds = (decimal)profilerPoco.DurationMilliseconds
            };

            return(miniProfiler);
        }
Beispiel #2
0
        private static MiniProfiler ProfilerPocoToProfiler(MiniProfilerPoco profilerPoco)
        {
            if (profilerPoco == null)
                return null;

#pragma warning disable 618
            var miniProfiler = new MiniProfiler
#pragma warning restore 618
            {
                Id = profilerPoco.Id,
                MachineName = profilerPoco.MachineName,
                User = profilerPoco.User,
                HasUserViewed = profilerPoco.HasUserViewed,
                Name = profilerPoco.Name,
                Started = profilerPoco.Started,
                RootTimingId = profilerPoco.RootTimingId,
                DurationMilliseconds = (decimal) profilerPoco.DurationMilliseconds
            };

            return miniProfiler;
        }