Ejemplo n.º 1
0
        public IEnumerable <PSTemplateSpec> ListTemplateSpecsByResourceGroup(string resourceGroupName)
        {
            var list = new List <PSTemplateSpec>();

            var templateSpecs = TemplateSpecsClient.TemplateSpecs.ListByResourceGroup(resourceGroupName);

            list.AddRange(templateSpecs.Select(ts => PSTemplateSpec.FromAzureSDKTemplateSpec(ts)));

            while (templateSpecs.NextPageLink != null)
            {
                templateSpecs =
                    TemplateSpecsClient.TemplateSpecs.ListByResourceGroupNext(templateSpecs.NextPageLink);
                list.AddRange(templateSpecs.Select(ts => PSTemplateSpec.FromAzureSDKTemplateSpec(ts)));
            }

            return(list);
        }
Ejemplo n.º 2
0
        public IEnumerable <PSTemplateSpec> ListTemplateSpecsBySubscription()
        {
            var list = new List <PSTemplateSpec>();

            var templateSpecs = TemplateSpecsClient.TemplateSpecs.ListBySubscription();

            list.AddRange(templateSpecs.Select(ts => PSTemplateSpec.FromAzureSDKTemplateSpec(ts)));

            while (templateSpecs.NextPageLink != null)
            {
                templateSpecs =
                    TemplateSpecsClient.TemplateSpecs.ListBySubscriptionNext(templateSpecs.NextPageLink);

                list.AddRange(templateSpecs.Select(ts => PSTemplateSpec.FromAzureSDKTemplateSpec(ts)));
            }

            return(list);
        }