/// <summary> /// Performs steps (if needed) to be performed after service host startup. The base implementation /// will work, we are overriding here simply becuase for OPS, we want /// to display a custom message after startup with the Order Processing Behavior. /// </summary> /// <param name="message">Message to display on main tab of service host console.</param> public override void PostInitProcedure(string message) { if (message.StartsWith("EXCEPTION")) { base.PostInitProcedure(message); return; } if (Initialize.InvokeRequired == false) { Initialize.Text = "Order Processing Behavior is: Standard"; ConfigUtility.writeConsoleMessage("\nMaster Host Initialization is Now Complete!\n", EventLogEntryType.Warning, true, settingsInstance); } else { // Show message asynchronously PostInitProcedureDelegate showdoneinit = new PostInitProcedureDelegate(PostInitProcedure); this.BeginInvoke(showdoneinit, new object[] { message }); } }
/// <summary> /// Performs steps (if needed) to be performed after service host startup. The base implementation /// will work, we are overriding here simply becuase for BSL, we want /// to init OPS in-process as a special step, and display a custom message after startup with the Order Processing Mode /// for the BSL. /// </summary> /// <param name="message">Message to display on main tab of service host console.</param> public override void PostInitProcedure(string message) { if (message.StartsWith("EXCEPTION") || Settings.ORDER_PROCESSING_MODE ==null) { base.PostInitProcedure(message); return; } if (Initialize.InvokeRequired == false) { Initialize.Text = "Order Mode is: " + Settings.ORDER_PROCESSING_MODE; ConfigUtility.writeConsoleMessage("\nMaster Host Initialization is Now Complete!\n", EventLogEntryType.Information,true,settingsInstance); } else { // Show message asynchronously PostInitProcedureDelegate showdoneinit = new PostInitProcedureDelegate(PostInitProcedure); this.BeginInvoke(showdoneinit, new object[] { message }); } }