public static bool IsAnyAsyncMethod(StackFrame[] methods) { bool isAsync = false; foreach (var item in methods) { if (UtilMethods.IsAsyncMethod(item.GetMethod())) { isAsync = true; } } return(isAsync); }