static OpalMessageRef MySendCommand(OpalMessageRef command, string errorMessage) { OpalMessageRef response = new OpalMessageRef(); if(!context.SendMessage(command, response)) return null; if (response.GetMessageType() != Opal_API.OpalMessageType.OpalIndCommandError) return response; if (response.GetCommandError() == null || response.GetCommandError() == "\0") Console.WriteLine("{0}.\n", errorMessage); else Console.WriteLine("{0}: {1}\n", errorMessage, response.GetCommandError()); return null; }