Getting Runtime Assemblies in Silverlight 3

谁说我不能喝 提交于 2019-12-04 03:31:14

问题


I am currently writing a framework dll which has an AssemblyHelper. This helper stores Runtime and UserAdded assemblies to easily instantiate new objects.

The .NET part of the framework uses:

AppDomain MyDomain = AppDomain.CurrentDomain;
Assembly[] AssembliesLoaded = MyDomain.GetAssemblies();
_runtimeAssemblies = AssembliesLoaded;

This gets me all the assemblies I need.

But the problem is I can't use this with Silverlight and I have no idea what to use now. Currently I am using:

Assembly[] AssembliesLoaded = {Assembly.GetCallingAssembly()};

But this only adds the Assembly of my framework and not the one of the application or any other runtime assembly.

What should I use? please help!

Thanks in advance,

Wouter


回答1:


The System.Windows.Deployment class is the closest you are going to get to the list of assemblies in the application.

The Deployment.Current.Parts collection is a list the AssemblyPart object that specify the name and source uri of the individual dlls packaged in the Xap.

I'm not sure that is much of a help to you though.



来源:https://stackoverflow.com/questions/2637549/getting-runtime-assemblies-in-silverlight-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!