using Umbraco.Core.ObjectResolution; namespace Umbraco.Core.Logging { /// /// A resolver exposing the current profiler /// /// /// NOTE: This is a 'special' resolver in that it gets initialized before most other things, it cannot use IoC so it cannot implement ContainerObjectResolverBase /// internal class ProfilerResolver : SingleObjectResolverBase { /// /// Constructor /// /// public ProfilerResolver(IProfiler profiler) : base(profiler) { } /// /// Method allowing to change the profiler during startup /// /// internal void SetProfiler(IProfiler profiler) { Value = profiler; } /// /// Gets the current profiler /// public IProfiler Profiler { get { return Value; } } } }