public static NativeMessagingMessage sendMessageResult(NativeMessagingMessage message, bool throwError, TimeSpan timeout) { NativeMessagingMessage result = null; if (message.browser == "ff") { if (ffconnected) { result = ffpipe.Message(message, throwError, timeout); } } else { if (chromeconnected) { result = chromepipe.Message(message, throwError, timeout); } } return(result); }
public static NativeMessagingMessage sendMessageResult(NativeMessagingMessage message, bool throwError, TimeSpan timeout) { NativeMessagingMessage result = null; if (message.browser == "ff") { if (ffconnected) { // Log.Debug("Send and queue message " + message.functionName); result = ffpipe.Message(message, throwError, timeout); } } else if (message.browser == "edge") { if (edgeconnected) { // Log.Debug("Send and queue message " + message.functionName); result = edgepipe.Message(message, throwError, timeout); } } else { if (chromeconnected) { // Log.Debug("Send and queue message " + message.functionName); result = chromepipe.Message(message, throwError, timeout); } } return(result); }