public object Post([FromUri] String id, [FromBody] ProductLoad body) { IList <CTSWriteOperation> operations; String tkmsgout; uint tkresult, tkstatus; RemoteServer server = RemoteServer.Singleton; server.RunCommand(id, body.tkmsg, out tkstatus, out tkresult, out tkmsgout, out operations, body.card); return(new { status = tkstatus, result = tkresult, msg = tkmsgout, card_messages = operations }); }
public override Task OnMessageReceived(ArraySegment <byte> message, System.Net.WebSockets.WebSocketMessageType type) { //if (response to Read command) //{ // BytesRead = message; // mutex.ReleaseMutex; //} //else //new Command //{ Card c = new Card(); RemoteServer server = RemoteServer.Singleton; IList <CTSWriteOperation> operations; string tkmsg; uint status, result; server.RunCommand("id", "", out status, out result, out tkmsg, out operations, c, new ExAPDU(SendRcvMessage)); //} Console.WriteLine(String.Format("Message Received")); return(SendText(message, true)); }