开发者

Finding the assembly to go with the namespace

开发者 https://www.devze.com 2022-12-29 05:12 出处:网络
I have a C# script executor, which execute an arbitary chunk of c#, by wrap开发者_C百科ping it, and

I have a C# script executor, which execute an arbitary chunk of c#, by wrap开发者_C百科ping it, and executing it in its own appdomain. To compile it correctly, I need to know what assemblies it needs.

Is it the case that I need to extract the namespaces for the script and iterate through every assembly I can find, to find a match, or is their a simpler way to do it?

Thanks. Bob.


If you need to do this then that is pretty much what you will have to do. Also, remember that namespaces can span assemblies so make sure you grab all assemblies that have types with that namespace, not just the first one you find.

0

精彩评论

暂无评论...
验证码 换一张
取 消