Discussion of the Rotor Shared Source CLI implementation wrote:
> IMDInternalImport::GetParentToken() is what you need.

No, that seems to give me the mdTypeDef corresponding to the enclosing
type. I.E:

public class Foo
{
   public Bar Field;
}

If I have a mdFieldDef for Field here, calling GetParentToken gives me
the mdTypeDef for Foo, not Bar.

Any other ideas?

>
> -----Original Message-----
> From: Discussion of the Rotor Shared Source CLI implementation
> [mailto:[EMAIL PROTECTED] On Behalf Of Arild Fines
> Sent: Tuesday, May 10, 2005 10:53 AM
> To: DOTNET-ROTOR@DISCUSS.DEVELOP.COM
> Subject: [DOTNET-ROTOR] Getting an mdTypeDef for the type of a field
>
> Given an mdFieldDef, is there a way to get an mdTypeDef for the type
> of
> the field the mdFieldDef represents? IMetaDataImport defines a
> GetFieldProps method, which seems to be able to do what I want, but
> internally in the EE you only seem to have access to the
> IMDInternalImport interface, which seems vaguely different.
>
> IMDInternalImport defines the method GetSigOfFieldDef(), which
> returns a
> PCOR_SIGNATURE, but I don't seem to be able to find a way to get a
> metadata token from that either.



--
Arild

AnkhSVN: http://ankhsvn.tigris.org
Blog: http://ankhsvn.com/blog
IRC: irc://irc.freenode.net/ankhsvn

"The problem in the world today is communication. Too much
communication." -- Homer Simpson

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to