/// <summary> /// Creates the task execution context for use in the Package installation actions /// </summary> /// <param name="nugetPackage"></param> /// <param name="packageFolderName"></param> /// <param name="state"></param> /// <param name="controller"></param> /// <returns></returns> internal TaskExecutionContext GetTaskExecutionContext( IPackage nugetPackage, string packageFolderName, PackageInstallationState state, Controller controller) { var package = new PackageFolder { IsNugetInstalled = nugetPackage.IsInstalled(_backOfficeRequestContext.PackageContext.LocalPackageManager.LocalRepository), Name = packageFolderName }; return new TaskExecutionContext { EventSource = controller, EventArgs = new TaskEventArgs(_backOfficeRequestContext.Application.FrameworkContext, new PackageInstallEventArgs(nugetPackage.Id, package, state)) }; }
public PackageInstallEventArgs(string nugetPackageId, PackageFolder packageFolder, PackageInstallationState state) { NugetPackageId = nugetPackageId; PackageFolder = packageFolder; State = state; }