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

GetTotalsForTestPlan() public method

get totals for a testplan
If a test plan has no executions to it you will still get a list iwth a single item. That item will have zeros in its totals
public GetTotalsForTestPlan ( int testplanid ) : List
testplanid int
return List
        public List<TestPlanTotal> GetTotalsForTestPlan(int testplanid)
        {
            stateIsValid();
            object o = proxy.getTotalsForTestPlan(devkey, testplanid);
            handleErrorMessage(o);
            List<TestPlanTotal> list = new List<TestPlanTotal>();

            XmlRpcStruct[] resultList;
            if (o is XmlRpcStruct[]) {
                resultList = o as XmlRpcStruct[];
                list.Add(new TestPlanTotal(resultList[0]));
            } else {
                XmlRpcStruct or = o as XmlRpcStruct;
                foreach (XmlRpcStruct result in or.Values)
                    list.Add(new TestPlanTotal(result));
            }
            return list;
        }