protected void ExecuteResourceSkuListMethod(object[] invokeMethodInputParameters)
        {
            var result       = ResourceSkusClient.List();
            var resultList   = result.ToList();
            var nextPageLink = result.NextPageLink;

            while (!string.IsNullOrEmpty(nextPageLink))
            {
                var pageResult = ResourceSkusClient.ListNext(nextPageLink);
                foreach (var pageItem in pageResult)
                {
                    resultList.Add(pageItem);
                }
                nextPageLink = pageResult.NextPageLink;
            }
            WriteObject(resultList, true);
        }
示例#2
0
 protected override void ProcessRecord()
 {
     ExecuteClientAction(() =>
     {
         var result       = ResourceSkusClient.List();
         var resultList   = result.ToList();
         var nextPageLink = result.NextPageLink;
         while (!string.IsNullOrEmpty(nextPageLink))
         {
             var pageResult = ResourceSkusClient.ListNext(nextPageLink);
             foreach (var pageItem in pageResult)
             {
                 resultList.Add(pageItem);
             }
             nextPageLink = pageResult.NextPageLink;
         }
         WriteObject(resultList, true);
     });
 }
示例#3
0
 protected override void ProcessRecord()
 {
     ExecuteClientAction(() =>
     {
         var result       = ResourceSkusClient.List();
         var resultList   = result.ToList();
         var nextPageLink = result.NextPageLink;
         while (!string.IsNullOrEmpty(nextPageLink))
         {
             var pageResult = ResourceSkusClient.ListNext(nextPageLink);
             foreach (var pageItem in pageResult)
             {
                 resultList.Add(pageItem);
             }
             nextPageLink = pageResult.NextPageLink;
         }
         var psObject = new List <PSResourceSku>();
         foreach (var r in resultList)
         {
             psObject.Add(ComputeAutomationAutoMapperProfile.Mapper.Map <ResourceSku, PSResourceSku>(r));
         }
         WriteObject(psObject, true);
     });
 }