Created
March 15, 2017 20:37
-
-
Save mgravell/bde22f166f1a9ed1938543ac060d4ff5 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) => | |
profiler?.Step($"{memberName} - {Path.GetFileName(sourceFilePath)}:{sourceLineNumber.ToString()}"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment