开发者

Getting Runtime Assemblies in Silverlight 3

开发者 https://www.devze.com 2022-12-27 09:19 出处:网络
I am currently writing a framework dll which has an AssemblyHelper. This helper stores Runtime and UserAdded assemblies to easily instantiate new objects.

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. Cu开发者_StackOverflowrrently 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


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.

0

精彩评论

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

关注公众号