public bool IsUnder(ICSharpTreeNode node) { var store = node.GetSettingsStore(); var customTypes = store.EnumIndexedValues(AsyncConverterSettingsAccessor.ConfigureAwaitIgnoreAttributeTypes).ToArray(); if (customTypes.IsNullOrEmpty()) { return(false); } var containingFunctionLikeDeclarationOrClosure = node.GetContainingFunctionDeclarationIgnoringClosures(); if (containingFunctionLikeDeclarationOrClosure?.ContainsAttribute(customTypes) == true) { return(true); } return(false); }