Changed the profiler over to use resolvers again. We no longer will call MiniProfiler directly.
Added an HtmlHelper extension which is used to render the profiler html output. Added an HtmlHelper property to the new base page too.
This commit is contained in:
@@ -1,37 +1,37 @@
|
||||
//using Umbraco.Core.ObjectResolution;
|
||||
using Umbraco.Core.ObjectResolution;
|
||||
|
||||
//namespace Umbraco.Core.Profiling
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// A resolver exposing the current profiler
|
||||
// /// </summary>
|
||||
// public class ProfilerResolver : SingleObjectResolverBase<ProfilerResolver, IProfiler>
|
||||
// {
|
||||
// /// <summary>
|
||||
// /// Constructor
|
||||
// /// </summary>
|
||||
// /// <param name="profiler"></param>
|
||||
// public ProfilerResolver(IProfiler profiler)
|
||||
// : base(profiler)
|
||||
// {
|
||||
|
||||
// }
|
||||
namespace Umbraco.Core.Profiling
|
||||
{
|
||||
/// <summary>
|
||||
/// A resolver exposing the current profiler
|
||||
/// </summary>
|
||||
internal class ProfilerResolver : SingleObjectResolverBase<ProfilerResolver, IProfiler>
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="profiler"></param>
|
||||
public ProfilerResolver(IProfiler profiler)
|
||||
: base(profiler)
|
||||
{
|
||||
|
||||
// /// <summary>
|
||||
// /// Method allowing to change the profiler during startup
|
||||
// /// </summary>
|
||||
// /// <param name="profiler"></param>
|
||||
// internal void SetProfiler(IProfiler profiler)
|
||||
// {
|
||||
// Value = profiler;
|
||||
// }
|
||||
}
|
||||
|
||||
// /// <summary>
|
||||
// /// Gets the current profiler
|
||||
// /// </summary>
|
||||
// public IProfiler Profiler
|
||||
// {
|
||||
// get { return Value; }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
/// <summary>
|
||||
/// Method allowing to change the profiler during startup
|
||||
/// </summary>
|
||||
/// <param name="profiler"></param>
|
||||
internal void SetProfiler(IProfiler profiler)
|
||||
{
|
||||
Value = profiler;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current profiler
|
||||
/// </summary>
|
||||
public IProfiler Profiler
|
||||
{
|
||||
get { return Value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user