Interface....who implements ?

M

Michael Soza

How can I know what classes implements a specific Interface.
I'm interested in the Microsoft.VisualStudio.Shell.Interop.IVsSolution
interface, because Im making a extension for Visual Studio and I need
information for the actual Solution.
 
P

Peter Duniho

Michael said:
How can I know what classes implements a specific Interface.

Taken literally, the answer to your question is "you can't".
I'm interested in the Microsoft.VisualStudio.Shell.Interop.IVsSolution
interface, because Im making a extension for Visual Studio and I need
information for the actual Solution.

If you have the assemblies available to inspect, you can use reflection,
loading each assembly of interest, enumerating the types and checking
each to see if they implement the interface.

Other than that, there's no way to enumerate all classes that implement
a specific interface.

Pete
 
N

not_a_commie

Both Resharper and VS2010 allow you to view the hierarchy for types.
Reflector also has a derived types analysis. In all cases they can
only look for derived types in referenced DLLs.
 
B

Ben Voigt [C++ MVP]

not_a_commie said:
Both Resharper and VS2010 allow you to view the hierarchy for types.
Reflector also has a derived types analysis. In all cases they can
only look for derived types in referenced DLLs.

Reflector looks in any set of files you ask it to inspect (via opening them
first)
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4512 (20091015) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4512 (20091015) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top