本文整理汇总了C#中Microsoft.Deployment.WindowsInstaller.Session.ShowErrorMessage方法的典型用法代码示例。如果您正苦于以下问题:C# Session.ShowErrorMessage方法的具体用法?C# Session.ShowErrorMessage怎么用?C# Session.ShowErrorMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Deployment.WindowsInstaller.Session
的用法示例。
在下文中一共展示了Session.ShowErrorMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AfterDatabaseDialog
public static ActionResult AfterDatabaseDialog(Session session)
{
try
{
return DatabaseCustomAction.AfterDatabaseDialog(session, true);
}
catch (Exception ex)
{
session.ShowErrorMessage(ex);
throw ex;
}
}
示例2: AfterInstallInitialize_Product
public static ActionResult AfterInstallInitialize_Product(Session session)
{
try
{
return ProductCustomActions.AfterInstallInitialize_Product(session);
}
catch (Exception ex)
{
session.ShowErrorMessage(ex);
throw ex;
}
}
示例3: AfterInstallInitialize_DB
public static ActionResult AfterInstallInitialize_DB(Session session)
{
try
{
return DatabaseCustomAction.AfterInstallInitialize_DB(session);
}
catch (Exception ex)
{
session.ShowErrorMessage(ex);
throw ex;
}
}
示例4: RollbackWebsite
public static ActionResult RollbackWebsite(Session session)
{
try
{
return WebsiteCustomAction.RollbackWebsite(session);
}
catch (Exception ex)
{
session.ShowErrorMessage(ex);
throw ex;
}
}
示例5: PopulateWebsites
public static ActionResult PopulateWebsites(Session session)
{
try
{
return ActionResult.Success;
}
catch (Exception ex)
{
session.ShowErrorMessage(ex);
throw ex;
}
}
示例6: RollbackDatabase
public static ActionResult RollbackDatabase(Session session)
{
try
{
return DatabaseCustomAction.RemoveDatabase(session, false);
}
catch (Exception ex)
{
session.ShowErrorMessage(ex);
throw ex;
}
}
示例7: PatchDatabase
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: PatchWebsite
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: DeployDatabase
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: ForgetOlderVersions
public static ActionResult ForgetOlderVersions(Session session)
{
try
{
return ProductCustomActions.ForgetOlderVersions(session);
}
catch (Exception ex)
{
session.ShowErrorMessage(ex);
throw ex;
}
}
示例11: CreateWebsite
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: AppSearch_WEB
public static ActionResult AppSearch_WEB(Session session)
{
try
{
return WebsiteCustomAction.AppSearch_WEB(session);
}
catch (Exception ex)
{
session.ShowErrorMessage(ex);
throw ex;
}
}
示例13: AppSearch_DB
public static ActionResult AppSearch_DB(Session session)
{
try
{
return DatabaseCustomAction.AppSearch_DB(session, true);
}
catch (Exception ex)
{
session.ShowErrorMessage(ex);
throw ex;
}
}
示例14: AfterWebDialog
public static ActionResult AfterWebDialog(Session session)
{
try
{
return WebsiteCustomAction.AfterWebDialog(session);
}
catch (Exception ex)
{
session.ShowErrorMessage(ex);
throw ex;
}
}
示例15: AfterInstallInitialize_WEB
public static ActionResult AfterInstallInitialize_WEB(Session session)
{
try
{
return WebsiteCustomAction.AfterInstallInitialize_WEB(session, new string[] { "PatchPersonMasterDatabase" });
}
catch (Exception ex)
{
session.ShowErrorMessage(ex);
throw ex;
}
}