Skip to content

Commit

Permalink
fix: capture package solutions no matter if they were installed or not (
Browse files Browse the repository at this point in the history
#59)

move solution capture to `OverrideSolutionImportDecision` #57
  • Loading branch information
tdashworth authored Apr 28, 2021
1 parent efd570c commit a7d078c
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected string LicensedUsername
protected IDictionary<string, string> PowerAppsEnvironmentVariables => this.GetSettings(Constants.Settings.PowerAppsEnvironmentVariablePrefix);

/// <summary>
/// Gets a list of solutions that have been processed (i.e. <see cref="PreSolutionImport(string, bool, bool, out bool, out bool)"/> has been ran for that solution.)
/// Gets a list of solutions that have been processed (i.e. <see cref="OverrideSolutionImportDecision"/> has been ran for that solution.)
/// </summary>
protected IList<string> ProcessedSolutions
{
Expand Down Expand Up @@ -332,14 +332,14 @@ public virtual void BeforePrimaryImport()
}

/// <inheritdoc/>
public override void PreSolutionImport(string solutionName, bool solutionOverwriteUnmanagedCustomizations, bool solutionPublishWorkflowsAndActivatePlugins, out bool overwriteUnmanagedCustomizations, out bool publishWorkflowsAndActivatePlugins)
public override UserRequestedImportAction OverrideSolutionImportDecision(string solutionUniqueName, Version organizationVersion, Version packageSolutionVersion, Version inboundSolutionVersion, Version deployedSolutionVersion, ImportAction systemSelectedImportAction)
{
base.PreSolutionImport(solutionName, solutionOverwriteUnmanagedCustomizations, solutionPublishWorkflowsAndActivatePlugins, out overwriteUnmanagedCustomizations, out publishWorkflowsAndActivatePlugins);

this.ExecuteLifecycleEvent(nameof(this.PreSolutionImport), () =>
this.ExecuteLifecycleEvent($"{nameof(this.OverrideSolutionImportDecision)}({solutionUniqueName})", () =>
{
this.ProcessedSolutions.Add(solutionName);
this.ProcessedSolutions.Add(solutionUniqueName);
});

return base.OverrideSolutionImportDecision(solutionUniqueName, organizationVersion, packageSolutionVersion, inboundSolutionVersion, deployedSolutionVersion, systemSelectedImportAction);
}

/// <inheritdoc/>
Expand Down

0 comments on commit a7d078c

Please sign in to comment.