//---------------------------------------------------------- // DoManualDownload //---------------------------------------------------------- static void DoManualDownload(ApplicationMoniker am, string manifestUrl) { DoDownload(new Uri(manifestUrl)); DependentFileInfo dfi; DependentAssemblyInfo dai; ApplicationManifestImport ami = am.GetApplicationManifestImport(); while ((dfi = ami.GetNextDependentFileInfo()) != null) { Uri httpSite = new Uri(new Uri(am.AppBase), (string)dfi["name"]); Console.WriteLine((string)dfi["name"]); DoDownload(httpSite); } while ((dai = ami.GetNextDependentAssemblyInfo()) != null) { Uri httpSite = new Uri(new Uri(am.AppBase), (string)dai["codeBase"]); Console.WriteLine(dai.assemblyIdentity.GetDirectoryName() + " " + (string)dai["codeBase"]); DoDownload(httpSite); } // If you want to re-iterate, you need to reset these. This sucks and I need // to find a way to control the xpath iterator class better. // am.ResetIterators(); }