예제 #1
0
        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);
        }
예제 #2
0
        public override StepResult Probe()
        {
            PreviousItemState prevState = PackageManager.GetPreviousContentState(this);

            LogStep(prevState, true);
            return(CreateResult());
        }
예제 #3
0
        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);
        }