开发者

Scan XAP for Files

开发者 https://www.devze.com 2023-01-27 01:20 出处:网络
i\'m working on an Silverlight-Project, where i have some files in my XAP (in this case xml\'s) but the number of files can change and i don\'t even know the name of the files, but i want to read this

i'm working on an Silverlight-Project, where i have some files in my XAP (in this case xml's) but the number of files can change and i don't even know the name of the files, but i want to read this files at runtime.. I know that due to Silverlight-Limitations it's not possible to scan a directory automatically开发者_StackOverflow社区, but maybe someone knows a workaround, any suggestion is appreciated.

(EDIT) Ok, i see my Question is not really clear so here some Background: I'm working on an project that should support Modularity. A Module consists of a XAP and an XML-File, with some Meta-Information (like a Manifest in OSGI). Different developers should be able to build there Module and "deploy" it by putting there XML-Description in the XAP of the Main-Assembly (so Isolated Storage doesn't work). I could use an XML-File to "link" all the other XML-Files, but that seems like an redundant step to me.

thanks in advance olli


(Original Answer) Change the Xap file's extension to *.zip and open it with your favourite zip-program, or even windows file explorer for that matter - you'll be able to extract/see what's inside.

(PS Regarding the XML files) I'd recommend keeping the XML files server-side and download them like it's shown here

This is the "manual" way to do it. If that answer is what you're looking for , mark this post as answer.

Regards


Found this and suddenly I've recalled this question...

http://www.michaelsnow.com/2010/12/28/silverlight-reading-from-a-file-contained-in-your-xap/

PS. If you are looking to support modularity then I'd strongly recommend the Prism library.

It supports modularity and permits usage of ModuleCatalogs in XAML (xml) format.

0

精彩评论

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