Example #1
0
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonDeviceFarmConfig config = new AmazonDeviceFarmConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonDeviceFarmClient client = new AmazonDeviceFarmClient(creds, config);

            ListTestGridProjectsResponse resp = new ListTestGridProjectsResponse();

            do
            {
                ListTestGridProjectsRequest req = new ListTestGridProjectsRequest
                {
                    NextToken = resp.NextToken
                    ,
                    MaxResult = maxItems
                };

                resp = client.ListTestGridProjects(req);
                CheckError(resp.HttpStatusCode, "200");

                foreach (var obj in resp.TestGridProjects)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }