Meyn.TestLink.TestLink.GetLastExecutionResult C# (CSharp) Method

GetLastExecutionResult() public method

get the last execution result
public GetLastExecutionResult ( int testplanid, int testcaseid ) : ExecutionResult
testplanid int id of the test plan
testcaseid int id of test case
return ExecutionResult
        public ExecutionResult GetLastExecutionResult(int testplanid, int testcaseid)
        {
            stateIsValid();
            object[] response = proxy.getLastExecutionResult(devkey, testplanid, testcaseid);

            List<ExecutionResult> result = new List<ExecutionResult>();
            if ((response.Length == 0) || (response[0] is int))
                // that signifies no execution results
                return null;

            handleErrorMessage(response);
            if (response != null) {
                // check if it is a no result indicator

                foreach (XmlRpcStruct data in response) {
                    object id = data["id"];
                    if ((id is int) && ((int)id == -1))
                        return null;
                    // -1 means no result
                    return new ExecutionResult(data);
                }
            }
            return null;
        }