示例#1
0
 /// <summary>
 /// Searches a syntax tree to identify all method declarations with the public accessor
 /// </summary>
 /// <param name="node">Syntax tree node to start searching from</param>
 /// <returns>Collection of method declarations with the public accessor</returns>
 public static IEnumerable <UstNode> GetPublicMethodDeclarations(this UstNode node)
 => node.AllMethods().Where(m => m.IsPublic());
示例#2
0
 /// <summary>
 /// Get all method declarations for a given node
 /// </summary>
 /// <param name="node">Node to query</param>
 /// <returns>Collection of all Method Declarations within the node</returns>
 public static IEnumerable <UstNode> GetMethodDeclarations(this UstNode node)
 => node.AllMethods();