Reflection over namespaces

  • Thread starter Thread starter Daniel Bello
  • Start date Start date
D

Daniel Bello

I need to show a list of all the IDbConnection inheritors
so any new ADO.net driver installed can be selected from a
user interface.

What i was trying to do ca be resumed to:

Type [] types = Type.GetTypes ( "System.Data.*" )

(which ís not valid)

Any solution?
 
Daniel,
I need to show a list of all the IDbConnection inheritors
so any new ADO.net driver installed can be selected from a
user interface.

It won't be that easy. There's no global list of all assemblies
installed on a system. You'll have to find and load the assemblies you
are interested in, and from there find the types that implement
IDbConnection. Also, there's no guarantee that such types are located
in the System.Data namespace.



Mattias
 
GAC?

Mattias Sjögren said:
Daniel,


It won't be that easy. There's no global list of all assemblies
installed on a system. You'll have to find and load the assemblies you
are interested in, and from there find the types that implement
IDbConnection. Also, there's no guarantee that such types are located
in the System.Data namespace.



Mattias
 
GAC?

Contains only global assemblies, not private ones.



Mattias
 
Mattias said:
It won't be that easy. There's no global list of all assemblies
installed on a system. You'll have to find and load the assemblies you
are interested in, and from there find the types that implement
IDbConnection. Also, there's no guarantee that such types are located
in the System.Data namespace.

Sort of like what COM categories used to do.
 

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

Back
Top