protected virtual void LogStep(PreviousItemState prevState, bool probe) { bool overwrite, userModified; switch (prevState) { case PreviousItemState.Installed: overwrite = true; userModified = false; break; case PreviousItemState.UserCreated: case PreviousItemState.UserModified: overwrite = true; userModified = true; break; case PreviousItemState.NotInstalled: default: overwrite = false; userModified = false; break; } var targetPath = ContentManager.Path.Combine(ContainerPath, ContentName); Logger.LogInstallStep(InstallStepCategory.Content, StepShortName, ResourceName, targetPath, probe, overwrite, userModified, null); }
public override StepResult Probe() { PreviousItemState prevState = PackageManager.GetPreviousContentState(this); LogStep(prevState, true); return(CreateResult()); }
public override StepResult Install() { PreviousItemState prevState = PackageManager.GetPreviousContentState(this); LogStep(prevState, false); var result = ContentManager.InstallContent(this.Content); result.NeedSetReferencePhase = this.Content.HasReference; return(result); }