Interface....who implements ?

  • Thread starter Thread starter Michael Soza
  • Start date Start date
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.
 
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
 
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.
 
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
 
Back
Top