Summary
Performs script caller information.
Syntax
[CakeMethodAlias]
public static ScriptCallerInfo GetCallerInfo(this ICakeContext context, string memberName = "", string sourceFilePath = "", int sourceLineNumber = 0)
Examples
var caller = GetCallerInfo();
Information("Called from {0} at {1}:{2}",
caller.MemberName,
caller.SourceFilePath,
caller.SourceLineNumber);
Attributes
Parameters
| Name |
Type |
Description |
| context |
ICakeContext |
The context. |
| memberName |
string |
The member name. |
| sourceFilePath |
string |
The source file path. |
| sourceLineNumber |
int |
The source line number. |
Return Value