Files
Umbraco-CMS/src/Umbraco.Core/Profiling/ProfilerResolver.cs
Shannon Deminick b6f52bf782 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.
2013-05-13 20:10:28 -10:00

37 lines
950 B
C#

using Umbraco.Core.ObjectResolution;
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; }
}
}
}