private static string GetCallerName()
{
var @this = typeof(MultiNodeSpec).Name;
var trace = new StackTrace();
var frames = trace.GetFrames();
if (frames != null)
{
for (var i = 1; i < frames.Length; i++)
{
var t = frames[i].GetMethod().DeclaringType;
if (t != null && t.Name != @this) return t.Name;
}
}
throw new InvalidOperationException("Unable to find calling type");
}