Created
May 15, 2020 14:52
-
-
Save mikeacjones/eab0fb22cfd3b26165a3e0dfa2c9fe75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region ServiceBase | |
protected override void OnStart(string[] args) | |
{ | |
base.OnStart(args); | |
_MicrosInterface = new MicrosInterface(MicrosMessageHandler, Properties.Settings.Default.ListenPort, Properties.Settings.Default.InterfaceMessageExpected); | |
_MicrosInterface.Start(); | |
} | |
protected override void OnStop() | |
{ | |
base.OnStop(); | |
_MicrosInterface.Stop(); | |
_MicrosInterface.Dispose(); | |
} | |
protected override void OnContinue() | |
{ | |
base.OnContinue(); | |
_MicrosInterface.Start(); | |
} | |
protected override void OnPause() | |
{ | |
base.OnShutdown(); | |
_MicrosInterface.Stop(); | |
} | |
#endregion | |
#region Online Order Monitor Handlers | |
private MicrosMessage MicrosMessageHandler(MicrosMessage microsMessage) | |
{ | |
return microsMessage.CreateReply("ERROR", "An Unknown Error Has Occured"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment