Files
Umbraco-CMS/src/Umbraco.Core/Profiling/ProfilerExtensions.cs
2013-05-12 18:17:53 -10:00

19 lines
572 B
C#

using System;
namespace Umbraco.Core.Profiling
{
public static class ProfilerExtensions
{
/// <summary>
/// Writes out a step prefixed with the type
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="profiler"></param>
/// <param name="name"></param>
/// <returns></returns>
public static IDisposable Step<T>(this IProfiler profiler, string name)
{
return profiler.Step(string.Format("[" + typeof (T).Name + "] " + name));
}
}
}