示例#1
0
 internal static void LogInstallStep(InstallStepCategory category, string stepName, string resourceName, string targetName, bool probe, bool overwrite, bool userModified, object previousState)
 {
     foreach (var logger in Loggers)
     {
         logger.WriteInstallStep(category, stepName, resourceName, targetName, probe, overwrite, userModified, previousState);
     }
 }
示例#2
0
        public static string GetVerb(InstallStepCategory category, string stepName, bool probe, bool overwrite, bool userModified)
        {
            switch (category)
            {
                case InstallStepCategory.Assembly:
                    return probe ?
                        stepName + (overwrite ? " will be upgraded" : " will be installed") :
                        (overwrite ? "UPGRADE " : "INSTALL ") + stepName;
                case InstallStepCategory.DbScript:
                    return (probe ? "CHECK " : "EXECUTE ") + stepName;
                case InstallStepCategory.None:
                case InstallStepCategory.ContentType:
                case InstallStepCategory.Content:
                default:
                    switch ((probe ? 4 : 0) + (overwrite ? 2 : 0) + (userModified ? 1 : 0))
                    {
                        case 0: return "INSTALL " + stepName;
                        case 1: return "OVERWRITE " + stepName; //"BACKUP AND OVERWRITE " + stepName;
                        case 2: return "UPGRADE " + stepName;
                        case 3: return "UPGRADE " + stepName; //"BACKUP AND UPGRADE " + stepName;
                        case 4: return stepName + " will be installed";
                        case 5: return stepName + " will be overwritten"; //" will be backed up and overwritten";
                        case 6: return stepName + " will be upgraded";
                        case 7: return stepName + " will be upgraded"; //will be backed up and upgraded";
                    }
                    throw new NotImplementedException();
            }

        }
示例#3
0
        public static string GetVerb(InstallStepCategory category, string stepName, bool probe, bool overwrite, bool userModified)
        {
            switch (category)
            {
            case InstallStepCategory.Assembly:
                return(probe ?
                       stepName + (overwrite ? " will be upgraded" : " will be installed") :
                       (overwrite ? "UPGRADE " : "INSTALL ") + stepName);

            case InstallStepCategory.DbScript:
                return((probe ? "CHECK " : "EXECUTE ") + stepName);

            case InstallStepCategory.None:
            case InstallStepCategory.ContentType:
            case InstallStepCategory.Content:
            default:
                switch ((probe ? 4 : 0) + (overwrite ? 2 : 0) + (userModified ? 1 : 0))
                {
                case 0: return("INSTALL " + stepName);

                case 1: return("OVERWRITE " + stepName);        //"BACKUP AND OVERWRITE " + stepName;

                case 2: return("UPGRADE " + stepName);

                case 3: return("UPGRADE " + stepName);        //"BACKUP AND UPGRADE " + stepName;

                case 4: return(stepName + " will be installed");

                case 5: return(stepName + " will be overwritten");        //" will be backed up and overwritten";

                case 6: return(stepName + " will be upgraded");

                case 7: return(stepName + " will be upgraded");        //will be backed up and upgraded";
                }
                throw new NotImplementedException();
            }
        }
示例#4
0
        public void WriteInstallStep(InstallStepCategory category, string stepName, string resourceName, string targetName, bool probe, bool overwrite, bool userModified, object previousState)
        {
            var msg = String.Concat(Logger.GetVerb(category, stepName, probe, overwrite, userModified), ": ", probe ? resourceName : targetName);

            Console.WriteLine(msg);
        }
示例#5
0
 public void WriteInstallStep(InstallStepCategory category, string stepName, string resourceName, string targetName, bool probe, bool overwrite, bool userModified, object previousState)
 {
     var msg = String.Concat(Logger.GetVerb(category, stepName, probe, overwrite, userModified), ": ", probe ? resourceName : targetName);
     Console.WriteLine(msg);
 }
示例#6
0
 internal static void LogInstallStep(InstallStepCategory category, string stepName, string resourceName, string targetName, bool probe, bool overwrite, bool userModified, object previousState)
 {
     foreach (var logger in Loggers)
         logger.WriteInstallStep(category, stepName, resourceName, targetName, probe, overwrite, userModified, previousState);
 }