コード例 #1
0
 /// <summary>
 /// Executes the task.
 /// </summary>
 /// <returns>Indicating if the task was successful.</returns>
 public override bool Execute()
 {
     BizTalkApplication bizTalkApplication = new BizTalkApplication(ManagementDatabaseConnectionString, ApplicationName);
     Log.LogMessage("Disabling all Receive Locations for BizTalk application '{0}'.", ApplicationName);
     bizTalkApplication.DisableAllReceiveLocations();
     return true;
 }
コード例 #2
0
        /// <summary>
        /// Executes the task.
        /// </summary>
        /// <returns>Indicating if the task was successful.</returns>
        public override bool Execute()
        {
            BizTalkCatalogExplorer bizTalkCatalogExplorer = new BizTalkCatalogExplorer(ManagementDatabaseConnectionString);
            if (bizTalkCatalogExplorer.ApplicationExists(ApplicationName))
            {
                BizTalkApplication bizTalkApplication = new BizTalkApplication(
                    ManagementDatabaseConnectionString, ApplicationName);
                if (this.TerminateOrchestrations)
                {
                    Log.LogMessage("Disabling all Receive Locations for BizTalk application '{0}'.", ApplicationName);
                    bizTalkApplication.DisableAllReceiveLocations();
                    Log.LogMessage("Terminating all Orchestrations for BizTalk application '{0}'.", ApplicationName);
                    bizTalkApplication.TerminateAllOrchestrations();
                }

                Log.LogMessage("Bringing BizTalk application '{0}' to a complete stop.", ApplicationName);
                bizTalkApplication.StopAll();
            }
            else
            {
                Log.LogMessage("Skipping stopping of BizTalk application '{0}' as none exist matching that name.", ApplicationName);
            }

            return true;
        }