public IAsyncResult BeginSendGetCommandsRequest(GetCommandsRequest request, AsyncCallback callback, Object state) { this._sendGetCommandEventAsync = new SendGetCommandEventAsync(SendGetCommandsRequest); return this._sendGetCommandEventAsync.BeginInvoke(request, callback, state); }
/// <summary> /// Send a GetCommandsRequest to the Jetstream Device Webserver /// </summary> /// <param name="request">The GetCommandsRequest request</param> public CR.Jetstream SendGetCommandsRequest(GetCommandsRequest request) { if (request == null) throw new ArgumentNullException("request"); String responseXmlString = SendMessageToJetStream("GetCommands", string.Empty); CR.Jetstream getCommandResponse = null; XmlSerializer s = new XmlSerializer(typeof(CR.Jetstream)); getCommandResponse = (CR.Jetstream)s.Deserialize(new StreamReader(new MemoryStream(Encoding.UTF8.GetBytes(responseXmlString)))); return getCommandResponse; }
public IAsyncResult BeginSendGetCommandsRequest(GetCommandsRequest request, AsyncCallback callback, Object state) { _sendGetCommandEventAsync = SendGetCommandsRequest; return _sendGetCommandEventAsync.BeginInvoke(request, callback, state); }