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 }); }
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); } }
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 }; }
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); } }