Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Tevya
Starting Member
3 Posts |
Posted - 2010-01-27 : 14:55:38
|
I would like to write a CLR assembly which could discover and use other CLR assemblies registered in the same database which met certain requirements.My thought was that I could use reflection to look at the assembly and find its public procedures and functions. I cannot find any documentation on how to use reflection to determine the public methods of a CLR assembly from another CLR assembly.So, how does one CLR assembly inspect the other loaded CLR assemblies? |
|
Tevya
Starting Member
3 Posts |
Posted - 2010-01-29 : 13:16:18
|
I have discovered the solution to this issue myself. The key is to use the sys.assemblies view.In a SQLCLR assembly, one can load any of the assemblies listed via Assembly.Load() giving as the parameter an AssemblyName object created using the clr_name column from sys.assemblies. Once each assembly is loaded, it is a cinch to examine it for the types, classes, etc., that you are looking for. == Tevya == |
|
|
|
|
|