Skip to content

Get-Member should show extension methods #11798

@SteveL-MSFT

Description

@SteveL-MSFT

Summary of the new feature/enhancement

PowerShell engine adds .Where and .ForEach extension methods to IEnumerable collections. There is code to support tab completion, but when a user inspects an object via Get-Member, they don't show up.

Proposed technical implementation details (optional)

Since we know these extension methods are available on IEnumerable collections, we should just expose them via Get-Member and call the MemberType ExtensionMethod. Formatting would need to increase the column width by 1 to accommodate.

Also return the overload definitions like other methods:

PS> @(1).GetType

OverloadDefinitions
-------------------
type GetType()

PS> @(1).ForEach
PS>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or moreWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions