private InstallItem CreateInstallItem(string aml) { var doc = new XmlDocument(); doc.LoadXml(aml); return(InstallItem.FromScript(doc.DocumentElement)); }
private void GetPatchPackage(InstallScript start, InstallScript dest) { var docs = new List <Tuple <XmlDocument, string> >(); ProgressDialog.Display(this, d => { start.WriteAmlMergeScripts(dest, (path, prog) => { d.SetProgress(prog); var doc = new XmlDocument(); docs.Add(Tuple.Create(doc, path)); return(new XmlNodeWriter(doc)); }); }); var items = docs .Where(d => d.Item1.DocumentElement != null) .SelectMany(d => XmlUtils.RootItems(d.Item1.DocumentElement) .Select(i => InstallItem.FromScript(i, d.Item2))) .ToArray(); _wizard.InstallScript = new InstallScript() { Lines = items }; _wizard.GoToStep(new ExportOptions()); }
private IEnumerable <ItemReference> GetDependencies(InstallItem installItem) { var analyzer = new DependencyAnalyzer(new MockMetadata()); analyzer.AddReferenceAndDependencies(installItem); analyzer.FinishAdding(); return(analyzer.GetDependencies(installItem.Reference)); }
public void Dispose() { // Clearing all of these ensures that the transient APIs // can't be called outside of the appropriate scope. #region dispose-dispatcher service-apis _GetNuGetExePath = null; _GetNuGetDllPath = null; _DownloadFile = null; _AddPinnedItemToTaskbar = null; _RemovePinnedItemFromTaskbar = null; _CreateShortcutLink = null; _UnzipFileIncremental = null; _UnzipFile = null; _AddFileAssociation = null; _RemoveFileAssociation = null; _AddExplorerMenuItem = null; _RemoveExplorerMenuItem = null; _SetEnvironmentVariable = null; _RemoveEnvironmentVariable = null; _AddFolderToPath = null; _RemoveFolderFromPath = null; _InstallMSI = null; _RemoveMSI = null; _StartProcess = null; _InstallVSIX = null; _UninstallVSIX = null; _InstallPowershellScript = null; _UninstallPowershellScript = null; _SearchForExecutable = null; _GetUserBinFolder = null; _GetSystemBinFolder = null; _CopyFile = null; _CopyFolder = null; _Delete = null; _DeleteFolder = null; _CreateFolder = null; _DeleteFile = null; _BeginTransaction = null; _AbortTransaction = null; _EndTransaction = null; _GenerateUninstallScript = null; _GetKnownFolder = null; _IsElevated = null; #endregion #region dispose-dispatcher core-apis _Warning = null; _Message = null; _Error = null; _Debug = null; _Verbose = null; _ExceptionThrown = null; _Progress = null; _ProgressComplete = null; _GetHostDelegate = null; _IsCancelled = null; #endregion #region dispose-dispatcher request-apis _OkToContinue = null; _YieldPackage = null; _YieldPackageDetails = null; _YieldPackageSwidtag = null; _YieldSource = null; _YieldMetadataDefinition = null; _YieldInstallationOptionsDefinition = null; #endregion #region dispose-dispatcher host-apis _GetMetadataKeys = null; _GetMetadataValues = null; _GetInstallationOptionKeys = null; _GetInstallationOptionValues = null; _PackageSources = null; _GetConfiguration = null; _ShouldContinueWithUntrustedPackageSource = null; _ShouldProcessPackageInstall = null; _ShouldProcessPackageUninstall = null; _ShouldContinueAfterPackageInstallFailure = null; _ShouldContinueAfterPackageUninstallFailure = null; _ShouldContinueRunningInstallScript = null; _ShouldContinueRunningUninstallScript = null; _AskPermission = null; _WhatIf = null; #endregion #region dispose-dispatcher protocol-apis _ProtocolGetNames = null; _ProtocolIsValidSource = null; _ProtocolGetItemMetadata = null; _ProtocolDownloadItem = null; _ProtocolUnpackItem = null; _InstallItem = null; #endregion _callback = null; }
public bool InstallItem(string item) { CheckDisposed(); return((_InstallItem ?? (_InstallItem = (_callback.Resolve <InstallItem>() ?? ((pitem) => default(bool)))))(item)); }