Esempio n. 1
0
        private static CustomTiming CustomTimingPocoToCustomTiming(CustomTimingPoco customTimingPoco)
        {
#pragma warning disable 618
            return(new CustomTiming
#pragma warning restore 618
            {
                CommandString = customTimingPoco.CommandString,
                DurationMilliseconds = customTimingPoco.DurationMilliseconds,
                FirstFetchDurationMilliseconds = customTimingPoco.FirstFetchDurationMilliseconds,
                StartMilliseconds = customTimingPoco.StartMilliseconds,
                ExecuteType = customTimingPoco.ExecuteType,
                StackTraceSnippet = customTimingPoco.StackTraceSnippet
            });
        }
Esempio n. 2
0
        private void SaveCustomTimings(Timing timing, KeyValuePair <string, List <CustomTiming> > customTimingsKV)
        {
            var key   = customTimingsKV.Key;
            var value = customTimingsKV.Value;

            foreach (var customTiming in value)
            {
                var customTimingPoco = new CustomTimingPoco
                {
                    Id                             = customTiming.Id,
                    Key                            = key,
                    TimingId                       = timing.Id,
                    CommandString                  = customTiming.CommandString,
                    ExecuteType                    = customTiming.ExecuteType,
                    StackTraceSnippet              = customTiming.StackTraceSnippet,
                    StartMilliseconds              = customTiming.StartMilliseconds,
                    DurationMilliseconds           = customTiming.DurationMilliseconds,
                    FirstFetchDurationMilliseconds = customTiming.FirstFetchDurationMilliseconds
                };

                CustomTimings.Insert(customTimingPoco);
            }
        }
Esempio n. 3
0
        private static CustomTiming CustomTimingPocoToCustomTiming(CustomTimingPoco customTimingPoco)
        {
#pragma warning disable 618
            return new CustomTiming
#pragma warning restore 618
            {
                CommandString = customTimingPoco.CommandString,
                DurationMilliseconds = customTimingPoco.DurationMilliseconds,
                FirstFetchDurationMilliseconds = customTimingPoco.FirstFetchDurationMilliseconds,
                StartMilliseconds = customTimingPoco.StartMilliseconds,
                ExecuteType = customTimingPoco.ExecuteType,
                StackTraceSnippet = customTimingPoco.StackTraceSnippet
            };
        }
Esempio n. 4
0
        private void SaveCustomTimings(Timing timing, KeyValuePair<string, List<CustomTiming>> customTimingsKV)
        {
            var key = customTimingsKV.Key;
            var value = customTimingsKV.Value;

            foreach (var customTiming in value)
            {
                var customTimingPoco = new CustomTimingPoco
                {
                    Id = customTiming.Id,
                    Key = key,
                    TimingId = timing.Id,
                    CommandString = customTiming.CommandString,
                    ExecuteType = customTiming.ExecuteType,
                    StackTraceSnippet = customTiming.StackTraceSnippet,
                    StartMilliseconds = customTiming.StartMilliseconds,
                    DurationMilliseconds = customTiming.DurationMilliseconds,
                    FirstFetchDurationMilliseconds = customTiming.FirstFetchDurationMilliseconds
                };

                CustomTimings.Insert(customTimingPoco);
            }
        }