Skip to content

Instantly share code, notes, and snippets.

@manuelnelson
Created May 28, 2012 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manuelnelson/2820649 to your computer and use it in GitHub Desktop.
Save manuelnelson/2820649 to your computer and use it in GitHub Desktop.
Temporary fix to Service Stack Mini Profiler
if (profiler != null)
{
// HACK: unviewed ids are added to this list during Storage.Save, but we know we haven't see the current one yet,
// so go ahead and add it to the end - it's usually the only id, but if there was a redirect somewhere, it'll be there, too
Profiler.Settings.EnsureStorageStrategy();
var ids = Profiler.Settings.Storage.GetUnviewedIds(profiler.User);
ids.Add(profiler.Id);
path = @"/" + (path ?? "") + EndpointHost.Config.ServiceStackHandlerFactoryPath;
result = format.Format(new {
path = !string.IsNullOrEmpty(path) ? path + "/" : "", //<-------MY CHANGE HERE
version = Profiler.Settings.Version,
ids = ids.ToJson(),
position = (position ?? Profiler.Settings.PopupRenderPosition).ToString().ToLower(),
showTrivial = showTrivial ?? Profiler.Settings.PopupShowTrivial ? "true" : "false",
showChildren = showTimeWithChildren ?? Profiler.Settings.PopupShowTimeWithChildren ? "true" : "false",
maxTracesToShow = maxTracesToShow ?? Profiler.Settings.PopupMaxTracesToShow,
closeXHTML = xhtml ? "/" : "",
showControls = showControls ?? Profiler.Settings.ShowControls ? "true" : "false"
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment