예제 #1
0
 public static ActionResult AfterDatabaseDialog(Session session)
 {
     try
     {
         return DatabaseCustomAction.AfterDatabaseDialog(session, true);
     }
     catch (Exception ex)
     {
         session.ShowErrorMessage(ex);
         throw ex;
     }
 }
예제 #2
0
 public static ActionResult AfterInstallInitialize_Product(Session session)
 {
     try
     {
         return ProductCustomActions.AfterInstallInitialize_Product(session);
     }
     catch (Exception ex)
     {
         session.ShowErrorMessage(ex);
         throw ex;
     }
 }
예제 #3
0
 public static ActionResult AfterInstallInitialize_DB(Session session)
 {
     try
     {
         return DatabaseCustomAction.AfterInstallInitialize_DB(session);
     }
     catch (Exception ex)
     {
         session.ShowErrorMessage(ex);
         throw ex;
     }
 }
예제 #4
0
 public static ActionResult RollbackWebsite(Session session)
 {
     try
     {
         return WebsiteCustomAction.RollbackWebsite(session);
     }
     catch (Exception ex)
     {
         session.ShowErrorMessage(ex);
         throw ex;
     }
 }
예제 #5
0
 public static ActionResult PopulateWebsites(Session session)
 {
     try
     {
         return ActionResult.Success;
     }
     catch (Exception ex)
     {
         session.ShowErrorMessage(ex);
         throw ex;
     }
 }
예제 #6
0
 public static ActionResult RollbackDatabase(Session session)
 {
     try
     {
         return DatabaseCustomAction.RemoveDatabase(session, false);
     }
     catch (Exception ex)
     {
         session.ShowErrorMessage(ex);
         throw ex;
     }
 }
예제 #7
0
 public static ActionResult PatchDatabase(Session session)
 {
     try
     {
         var patchInfos = new Dictionary<string, DatabasePatchInfo[]>();
         patchInfos["PM"] = new DatabasePatchInfo[]{
             new DatabasePatchInfo(new Version(1,2), Properties.Resources.patchbas_1_2, null),
             new DatabasePatchInfo(new Version(2,0), Properties.Resources.patchbas_2_0, null)
         };
         return DatabaseCustomAction.PatchDatabase(session, patchInfos);
     }
     catch (Exception ex)
     {
         session.ShowErrorMessage(ex);
         throw ex;
     }
 }
예제 #8
0
        public static ActionResult PatchWebsite(Session session)
        {
            try
            {
                Action patch_2_0 = () =>
                {
                    var webInstallationInfo = WebInstallationInfo.CreateFromFeature(session, "PM");
                    var webInstallationOptions = GetWebInstallationOptions(session);
                    var configFilePath = webInstallationInfo.GetWebConfigFilePath(webInstallationOptions["PM"]);
                    var dic = new Dictionary<string, string>();
                    dic["multipleSiteBindingsEnabled"] = "true";
                    CprBroker.Installers.Installation.AddSectionNode("serviceHostingEnvironment", dic, configFilePath, "system.serviceModel");
                };

                var infos = new Dictionary<string, WebPatchInfo[]>();
                infos["PM"] = new WebPatchInfo[]{
                    new WebPatchInfo() { Version = new Version(2, 0), PatchAction = patch_2_0 }
                };

                return WebsiteCustomAction.PatchWebsite(session, infos);
            }
            catch (Exception ex)
            {
                session.ShowErrorMessage(ex);
                throw ex;
            }
        }
예제 #9
0
        public static ActionResult DeployDatabase(Session session)
        {
            try
            {
                DatabaseSetupInfo databaseSetupInfo = DatabaseSetupInfo.CreateFromFeature(session, "PM");
                string sql = Properties.Resources.crebas;
                sql = sql.Replace("<pm-cryptpassword>", databaseSetupInfo.EncryptionKey);
                sql = sql.Replace("<pm-namespace>", databaseSetupInfo.Domain);

                var sqlDictionary = new Dictionary<string, string>();
                sqlDictionary["PM"] = sql;

                var lookupDictinary = new Dictionary<string, KeyValuePair<string, string>[]>();
                lookupDictinary["PM"] = new KeyValuePair<string, string>[0];

                return DatabaseCustomAction.DeployDatabase(session, sqlDictionary, lookupDictinary);
            }
            catch (Exception ex)
            {
                session.ShowErrorMessage(ex);
                throw ex;
            }
        }
예제 #10
0
 public static ActionResult ForgetOlderVersions(Session session)
 {
     try
     {
         return ProductCustomActions.ForgetOlderVersions(session);
     }
     catch (Exception ex)
     {
         session.ShowErrorMessage(ex);
         throw ex;
     }
 }
예제 #11
0
 public static ActionResult CreateWebsite(Session session)
 {
     try
     {
         var webInstallationOptions = GetWebInstallationOptions(session);
         return WebsiteCustomAction.DeployWebsite(session, webInstallationOptions);
     }
     catch (Exception ex)
     {
         session.ShowErrorMessage(ex);
         throw ex;
     }
 }
예제 #12
0
 public static ActionResult AppSearch_WEB(Session session)
 {
     try
     {
         return WebsiteCustomAction.AppSearch_WEB(session);
     }
     catch (Exception ex)
     {
         session.ShowErrorMessage(ex);
         throw ex;
     }
 }
예제 #13
0
 public static ActionResult AppSearch_DB(Session session)
 {
     try
     {
         return DatabaseCustomAction.AppSearch_DB(session, true);
     }
     catch (Exception ex)
     {
         session.ShowErrorMessage(ex);
         throw ex;
     }
 }
예제 #14
0
 public static ActionResult AfterWebDialog(Session session)
 {
     try
     {
         return WebsiteCustomAction.AfterWebDialog(session);
     }
     catch (Exception ex)
     {
         session.ShowErrorMessage(ex);
         throw ex;
     }
 }
예제 #15
0
 public static ActionResult AfterInstallInitialize_WEB(Session session)
 {
     try
     {
         return WebsiteCustomAction.AfterInstallInitialize_WEB(session, new string[] { "PatchPersonMasterDatabase" });
     }
     catch (Exception ex)
     {
         session.ShowErrorMessage(ex);
         throw ex;
     }
 }