private void StartNamedPipeServer()
 {
     server = new InternalServer(pipeName, NamedPipeServerStream.MaxAllowedServerInstances);
     server.ClientConnectedEvent    += ClientConnectedHandler;
     server.ClientDisconnectedEvent += ClientDisconnectedHandler;
     server.MessageReceivedEvent    += MessageReceivedHandler;
     server.Start();
 }
        private void UnregisterFromServerEvents(InternalServer server)
        {
            Console.WriteLine(">>> EMVConfigPS: UnregisterFromServerEvents");

            server.ClientConnectedEvent    -= ClientConnectedHandler;
            server.ClientDisconnectedEvent -= ClientDisconnectedHandler;
            server.MessageReceivedEvent    -= MessageReceivedHandler;

            Console.WriteLine("<<< EMVConfigPS: UnregisterFromServerEvents");
        }