I have a byte array for Silverlight XAP. I need to extract all the DLLs in the XAp from the byte array. Once I get the DLL, I need to get rid of it. Silverlight XAP is stored in a repository and the repository always returns me the XAP byte array. Is there a standard API available in C # to achieve this functionality? this?
Regards, Abhishek
Create a memory stream from your byte array and make a call This function:
public list & lt; Assembly & gt; Extract asymbolphrampap (stream stream) {list & lt; Assembly & gt; Assemblies = New List & amp; Assembly & gt; (); String app manifame = new streamminder (application.greatsourcestream (new StreamersSourceInfo (Stream, blank), New Uri ("Appananified. XML", Urikhind.Relative)). StreamToEnd (); XElement deployed = XDocument.Parse (appManifest) .Root; & Lt; XElement & gt; Parts = (Straps in assembly in assembly. Elements (.) Element () Select Assembly Paintings) .Oolist (); Fourte (Excellent XE Parts) {string source = xe.Attribute ("source"). Values; AssemblyPart asmPart = New AssemblyPart (); StreamResourceInfo streamInfo = Application.GetResourceStream (new StreamResourceInfo (stream, "app / binary"), new Uri (source, Uricund .relative)); Assemblies.Add (asmPart.Load (streamInfo.Stream)); } Return Assemblies; }
Comments
Post a Comment