Created
April 30, 2013 19:30
-
-
Save dixon/5491269 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Does a Step with the location of caller as the label. | |
/// </summary> | |
public static IDisposable StepHere( | |
this MiniProfiler profiler, | |
[CallerMemberName] string memberName = "", | |
[CallerFilePath] string sourceFilePath = "", | |
[CallerLineNumber] int sourceLineNumber = 0) | |
{ | |
if (profiler == null) return null; | |
return profiler.Step(string.Format("{0} - {1}:{2}", | |
memberName, | |
Path.GetFileName(sourceFilePath), | |
sourceLineNumber)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment