Beispiel #1
0
 public IAsyncResult BeginGetStateNameStruct(
     StateStructRequest request,
     AsyncCallback callback,
     object asyncState)
 {
     return(BeginInvoke(
                MethodBase.GetCurrentMethod(),
                new object[] { request },
                null,
                null));
 }
 public string GetStateNames(StateStructRequest request)
 {
   if (request.state1 < 1 || request.state1 > m_stateNames.Length)
     throw new XmlRpcFaultException(1, "State number 1 invalid");
   if (request.state2 < 1 || request.state2 > m_stateNames.Length)
     throw new XmlRpcFaultException(1, "State number 1 invalid");
   if (request.state3 < 1 || request.state3 > m_stateNames.Length)
     throw new XmlRpcFaultException(1, "State number 1 invalid");
   string ret = m_stateNames[request.state1-1] + " "
     + m_stateNames[request.state2-1] + " " 
     + m_stateNames[request.state3-1];
   return ret;
 }
Beispiel #3
0
    public string GetStateNames(StateStructRequest request)
    {
        if (request.state1 < 1 || request.state1 > m_stateNames.Length)
        {
            throw new XmlRpcFaultException(1, "State number 1 invalid");
        }
        if (request.state2 < 1 || request.state2 > m_stateNames.Length)
        {
            throw new XmlRpcFaultException(1, "State number 1 invalid");
        }
        if (request.state3 < 1 || request.state3 > m_stateNames.Length)
        {
            throw new XmlRpcFaultException(1, "State number 1 invalid");
        }
        string ret = m_stateNames[request.state1 - 1] + " "
                     + m_stateNames[request.state2 - 1] + " "
                     + m_stateNames[request.state3 - 1];

        return(ret);
    }
    public StateStructResponse GetStateNameStruct(StateStructRequest request)
    {
        StateStructResponse response = new StateStructResponse();

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