public string GetStateNames(StateStructRequest request) { if (request.state1 < 1 || request.state1 > _stateNames.Length) throw new XmlRpcFaultException(1, "State number 1 invalid"); if (request.state2 < 1 || request.state2 > _stateNames.Length) throw new XmlRpcFaultException(1, "State number 1 invalid"); if (request.state3 < 1 || request.state3 > _stateNames.Length) throw new XmlRpcFaultException(1, "State number 1 invalid"); string ret = _stateNames[request.state1 - 1] + " " + _stateNames[request.state2 - 1] + " " + _stateNames[request.state3 - 1]; return ret; }
public string GetStateNames(StateStructRequest request) { if (request.state1 < 1 || request.state1 > _stateNames.Length) { throw new XmlRpcFaultException(1, "State number 1 invalid"); } if (request.state2 < 1 || request.state2 > _stateNames.Length) { throw new XmlRpcFaultException(1, "State number 1 invalid"); } if (request.state3 < 1 || request.state3 > _stateNames.Length) { throw new XmlRpcFaultException(1, "State number 1 invalid"); } string ret = _stateNames[request.state1 - 1] + " " + _stateNames[request.state2 - 1] + " " + _stateNames[request.state3 - 1]; return(ret); }
public StateStructResponse GetStateNameStruct(StateStructRequest request) { var response = new StateStructResponse(); if (request.state1 < 1 || request.state1 > _stateNames.Length) { throw new XmlRpcFaultException(1, "State number 1 invalid"); } if (request.state2 < 1 || request.state2 > _stateNames.Length) { throw new XmlRpcFaultException(1, "State number 1 invalid"); } if (request.state3 < 1 || request.state3 > _stateNames.Length) { throw new XmlRpcFaultException(1, "State number 1 invalid"); } response.stateName1 = _stateNames[request.state1 - 1]; response.stateName2 = _stateNames[request.state2 - 1]; response.stateName3 = _stateNames[request.state3 - 1]; return(response); }
public IAsyncResult BeginGetStateNameStruct( StateStructRequest request, AsyncCallback callback, object asyncState) { return BeginInvoke( MethodBase.GetCurrentMethod(), new object[] { request }, null, null); }
public StateStructResponse GetStateNameStruct(StateStructRequest request) { var response = new StateStructResponse(); if (request.state1 < 1 || request.state1 > _stateNames.Length) throw new XmlRpcFaultException(1, "State number 1 invalid"); if (request.state2 < 1 || request.state2 > _stateNames.Length) throw new XmlRpcFaultException(1, "State number 1 invalid"); if (request.state3 < 1 || request.state3 > _stateNames.Length) throw new XmlRpcFaultException(1, "State number 1 invalid"); response.stateName1 = _stateNames[request.state1 - 1]; response.stateName2 = _stateNames[request.state2 - 1]; response.stateName3 = _stateNames[request.state3 - 1]; return response; }