Beispiel #1
0
        public static void TryAddMiniProfilerResultsFromHeader(this MiniProfiler miniProfiler, HttpResponseMessage httpResponseMessage)
        {
            IEnumerable <string> values;

            if (httpResponseMessage.Headers.TryGetValues(MiniProfilerResultsHeaderName, out values))
            {
                string       miniProfilerJsonCompressed = values.First();
                string       miniProfilerJson           = GZipUtils.Unzip(miniProfilerJsonCompressed);
                MiniProfiler remoteMiniProfiler         = JsonConvert.DeserializeObject <MiniProfiler>(miniProfilerJson);

                miniProfiler.AddProfilerResults(remoteMiniProfiler);
            }
        }