I'm using this helper to resolve the name of the method that is currently being executed for logging purposes.
[MethodImpl(MethodImplOptions.NoInlining)]
public static string GetCurrentMethod()
{
StackTrace st = new StackTrace();
StackFrame sf = st.GetFrame(1);
return sf.GetMethod().Name;
}
This is the string that is returned <Frequency>b__46
" What does the b__46 mean? And is there a way to just retrieve the word "Frequency?"
This is calling the helper.
return ProxyCallWrapper.Execute<bool, IBackendJob>((backend, header) =>
{
header.CorrelationID = CorrelationID;
logger.LogInfo(string.Format("### BSL CALL from {0} by {1} : CorrelationID: {2}", this.ToString(), GetCurrentMethod() ,header.CorrelationID));
return backend.AddJob(header, jobId);
});