コード例 #1
0
 public override bool Execute()
 {
     try
     {
         Log.LogMessageFromText(String.Format("PnPSqlAppConfigGeneratorTask: Reading information for configuration {0} to generate app.config in {1}", Configuration, AppConfigFolder), MessageImportance.Normal);
         PnPAppConfigManager appConfigManager = new PnPAppConfigManager(SQLConnectionString.Replace(""", "\""), Configuration);
         appConfigManager.GenerateAppConfig(AppConfigFolder);
         return true;
     }
     catch (Exception ex)
     {
         Log.LogErrorFromException(ex);
         return false;
     }
 }
コード例 #2
0
 public override bool Execute()
 {
     try
     {
         //Log.LogMessageFromText(String.Format("PnPAppConfigReaderTask: Reading information for configuration {0}", Configuration), MessageImportance.Normal);
         PnPAppConfigManager appConfigManager = new PnPAppConfigManager(SQLConnectionString.Replace(""", "\""), Configuration);
         PnPBuildConfiguration = appConfigManager.GetConfigurationElement("PnPBuild");
         PnPBranch = appConfigManager.GetConfigurationElement("PnPBranch");
         return true;
     }
     catch (Exception ex)
     {
         Log.LogErrorFromException(ex);
         return false;
     }
 }