Skip to content

Comment about dynamic members for the DotNetAdapter 'GetMember' and 'GetMembers' - #7087

Merged
Dongbo Wang (daxian-dbw) merged 1 commit into
PowerShell:masterfrom
daxian-dbw:updatecomment
Jun 20, 2018
Merged

Comment about dynamic members for the DotNetAdapter 'GetMember' and 'GetMembers'#7087
Dongbo Wang (daxian-dbw) merged 1 commit into
PowerShell:masterfrom
daxian-dbw:updatecomment

Conversation

@daxian-dbw

@daxian-dbw Dongbo Wang (daxian-dbw) commented Jun 15, 2018

Copy link
Copy Markdown
Member

PR Summary

DotNetAdapter.GetMembers<T>(object obj) returns dynamic members for an object that implements IDynamicMetaObjectProvider, however, DotNetAdapter.GetMember<T>(object obj, string memberName) doesn't include dynamic members. I believe this makes sense and thus update the comment to clarify it in the code.

Be noted that, GetMember<T>(object obj, string memberName) doesn't return Event members either, while GetMembers<T>(object obj) does.

Background

The question about this was raised in #6898 (comment). After investigation, I found it's because DotNetAdapter.GetMember<T>(object obj, string memberName) doesn't return dynamic members, and thus submit this PR to call it out in the code comments.

PR Checklist

@iSazonov

Copy link
Copy Markdown
Collaborator

/cc Michael Klement (@mklement0) Maybe you will be interested.

@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit f591f4d into PowerShell:master Jun 20, 2018
@daxian-dbw
Dongbo Wang (daxian-dbw) deleted the updatecomment branch June 20, 2018 07:24
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants