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

GetTestPlanPlatforms() public method

get a list of all platforms for a test plan.
Throws an exception of type Testlink Exception
public GetTestPlanPlatforms ( int testplanid ) : List
testplanid int
return List
        public List<TestPlatform> GetTestPlanPlatforms(int testplanid)
        {
            List<TestPlatform> result = new List<TestPlatform>();

            stateIsValid();
            object o = proxy.getTestPlanPlatforms(devkey, testplanid);

            if (handleErrorMessage(o, 3041))
                // 3041 means no platforms are assigned for this testplan
                return result;
            // return an empty list 
            if (o is object[]) {
                object[] responseList = o as object[];
                foreach (XmlRpcStruct item in responseList) {
                    TestPlatform id = new TestPlatform(item);
                    result.Add(id);
                }
            }
            return result;
        }