public async Task <Microsoft.Azure.Management.ResourceManager.Fluent.Core.IPagedCollection <IBatchAIJob> > ListAsync(bool loadAllPages = true, CancellationToken cancellationToken = default(CancellationToken))
        {
            var innerJobs = await Inner.ListAsync(cancellationToken : cancellationToken);

            var result = innerJobs.Select((innerJob) => WrapModel(innerJob));

            return(PagedCollection <IBatchAIJob, JobInner> .CreateFromEnumerable(result));
        }
示例#2
0
        public async Task <IPagedCollection <INetworkWatcher> > ListAsync(bool loadAllPages = true, CancellationToken cancellationToken = new CancellationToken())
        {
            var innerNetworkWatchers = await Inner.ListAllAsync(cancellationToken);

            var result = innerNetworkWatchers.Select((innerNetworkWatcher) => WrapModel(innerNetworkWatcher));

            return(PagedCollection <INetworkWatcher, NetworkWatcherInner> .CreateFromEnumerable(result));
        }
示例#3
0
        /// <return>An observable emits packet captures in this collection.</return>

        ///GENMHASH:7F5BEBF638B801886F5E13E6CCFF6A4E:D4D129DBA16DC8F826460DF133372FD4
        public async Task <Microsoft.Azure.Management.ResourceManager.Fluent.Core.IPagedCollection <IPacketCapture> > ListAsync(bool loadAllPages = true, CancellationToken cancellationToken = default(CancellationToken))
        {
            var innerPacketCaptures = await Inner.ListAsync(parent.ResourceGroupName, parent.Name, cancellationToken);

            var result = innerPacketCaptures.Select((innerPacketCapture) => WrapModel(innerPacketCapture));

            return(PagedCollection <IPacketCapture, PacketCaptureResultInner> .CreateFromEnumerable(result));
        }
示例#4
0
        ///GENMHASH:9C5B42FF47E71D8582BAB26BBDEC1E0B:D21C20CB4507042130C1D13862BEE143
        public async Task <IPagedCollection <IVirtualNetworkGateway> > ListByResourceGroupAsync(string groupName, bool loadAllPages, CancellationToken cancellationToken = default(CancellationToken))
        {
            var innerVirtualNetworkGateways = await Inner.ListAsync(groupName, cancellationToken);

            var result = innerVirtualNetworkGateways.Select((innerVirtualGateway) => WrapModel(innerVirtualGateway));

            return(PagedCollection <IVirtualNetworkGateway, VirtualNetworkGatewayInner> .CreateFromEnumerable(result));
        }
        public async Task <IPagedCollection <IDeployment> > ListAsync(bool loadAllPages = true, CancellationToken cancellationToken = default(CancellationToken))
        {
            var resourceGroups = await resourceManager.ResourceGroups.ListAsync(true, cancellationToken);

            var taskResult = await Task.WhenAll(resourceGroups.Select(async(rg) => await ListByResourceGroupAsync(rg.Name, true, cancellationToken)));

            return(PagedCollection <IDeployment, DeploymentExtendedInner> .CreateFromEnumerable(taskResult.SelectMany(deployment => deployment)));
        }
示例#6
0
        public async Task <IPagedCollection <Microsoft.Azure.Management.BatchAI.Fluent.IRemoteLoginInformation> > ListRemoteLoginInformationAsync(CancellationToken cancellationToken = default(CancellationToken))
        {
            var files = await workspace.Manager.Inner.Jobs.ListRemoteLoginInformationAsync(workspace.ResourceGroupName, workspace.Name, experiment.Name, this.Name, cancellationToken);

            var result = files.Select((inner) => new RemoteLoginInformationImpl(inner));

            return(PagedCollection <IRemoteLoginInformation, BatchAI.Fluent.Models.RemoteLoginInformation> .CreateFromEnumerable(result));
        }
        ///GENMHASH:1CF7458570EB3183A47A71F08EA5D0DA:9ABE9FDD63D8CCC22EA023A49D808C8A
        public async Task <IPagedCollection <IVirtualNetworkGatewayConnection> > ListConnectionsAsync(CancellationToken cancellationToken = default(CancellationToken))
        {
            var connections = await Manager.Inner.VirtualNetworkGateways.ListConnectionsAsync(this.ResourceGroupName, this.Name);

            var result = connections.Select((inner) => WrapConnection(inner));

            return(PagedCollection <IVirtualNetworkGatewayConnection, VirtualNetworkGatewayConnectionListEntityInner> .CreateFromEnumerable(result));
        }
示例#8
0
        ///GENMHASH:939E8F1032A1B8C0AB96D412B52318E0:B1E6A38821CED79E43B50A3034484B9D
        public async Task <IPagedCollection <IOutputFile> > ListFilesAsync(string outputDirectoryId, CancellationToken cancellationToken = default(CancellationToken))
        {
            var files = await Manager.Inner.Jobs.ListOutputFilesAsync(this.ResourceGroupName, this.Name,
                                                                      new JobsListOutputFilesOptionsInner(outputDirectoryId), cancellationToken);

            var result = files.Select((inner) => new OutputFileImpl(inner));

            return(PagedCollection <IOutputFile, File> .CreateFromEnumerable(result));
        }
示例#9
0
        ///GENMHASH:C49DAA33A6BEC24793DA91B538DFB8F2:67C8DB89B63C9A02758CADAF8DE68104
        public async Task <IPagedCollection <Microsoft.Azure.Management.BatchAI.Fluent.IOutputFile> > ListFilesAsync(string outputDirectoryId, string directory, int linkExpiryMinutes, int maxResults, CancellationToken cancellationToken = default(CancellationToken))
        {
            var files = await Manager.Inner.Jobs.ListOutputFilesAsync(this.ResourceGroupName, this.Name,
                                                                      new JobsListOutputFilesOptionsInner(outputDirectoryId, directory, linkExpiryMinutes, maxResults), cancellationToken);

            var result = files.Select((inner) => new OutputFileImpl(inner));

            return(PagedCollection <IOutputFile, File> .CreateFromEnumerable(result));
        }
        public override async Task <IPagedCollection <IFunctionApp> > ListAsync(bool loadAllPages = true, CancellationToken cancellationToken = default(CancellationToken))
        {
            var collection = await PagedCollection <IFunctionApp, SiteInner> .LoadPageWithWrapModelAsync(
                async (cancellation) => await Inner.ListAsync(cancellation),
                Inner.ListNextAsync,
                async (inner, cancellation) => await PopulateModelAsync(inner, cancellation),
                loadAllPages, cancellationToken);

            return(PagedCollection <IFunctionApp, SiteInner> .CreateFromEnumerable(collection.Where(w => "functionapp".Equals(w.Inner.Kind, StringComparison.OrdinalIgnoreCase))));
        }
示例#11
0
        public override async Task <IPagedCollection <IWebApp> > ListByResourceGroupAsync(string resourceGroupName, bool loadAllPages = true, CancellationToken cancellationToken = default(CancellationToken))
        {
            var collection = await PagedCollection <IWebApp, SiteInner> .LoadPageWithWrapModelAsync(
                async (cancellation) => await Inner.ListByResourceGroupAsync(resourceGroupName, cancellationToken: cancellation),
                Inner.ListByResourceGroupNextAsync,
                async (inner, cancellation) => await PopulateModelAsync(inner, cancellation),
                loadAllPages, cancellationToken);

            return(PagedCollection <IWebApp, SiteInner> .CreateFromEnumerable(collection.Where(this.FilterWebApp)));
        }
        public override async Task <IPagedCollection <IFunctionApp> > ListAsync(bool loadAllPages = true, CancellationToken cancellationToken = default(CancellationToken))
        {
            var collection = await PagedCollection <IFunctionApp, SiteInner> .LoadPageWithWrapModelAsync(
                async (cancellation) => await Inner.ListAsync(cancellation),
                Inner.ListNextAsync,
                async (inner, cancellation) => await PopulateModelAsync(inner, cancellation),
                loadAllPages, cancellationToken);

            return(PagedCollection <IFunctionApp, SiteInner> .CreateFromEnumerable(collection.Where(this.FilterFunctionApp)));
        }
        public async Task <IPagedCollection <IFunctionAppBasic> > ListFunctionAppBasicAsync(bool loadAllPages = true, CancellationToken cancellationToken = default(CancellationToken))
        {
            var collection = await PagedCollection <IFunctionAppBasic, SiteInner> .LoadPage(
                async (cancellation) => await Inner.ListAsync(cancellationToken: cancellation),
                Inner.ListByResourceGroupNextAsync,
                inner => new WebSiteBaseImpl(inner),
                loadAllPages, cancellationToken);

            return(PagedCollection <IFunctionAppBasic, SiteInner> .CreateFromEnumerable(collection.Where(this.FilterFunctionApp)));
        }
示例#14
0
        public override async Task <IPagedCollection <IWebApp> > ListAsync(bool loadAllPages = true, CancellationToken cancellationToken = default(CancellationToken))
        {
            var collection = await PagedCollection <IWebApp, SiteInner> .LoadPageWithWrapModelAsync(
                async (cancellation) => await Inner.ListAsync(cancellation),
                Inner.ListNextAsync,
                async (inner, cancellation) => await PopulateModelAsync(inner, cancellation),
                loadAllPages, cancellationToken);

            return(PagedCollection <IWebApp, SiteInner> .CreateFromEnumerable(collection.Where(w => w.Inner.Kind != null && w.Inner.Kind.Split(new char[] { ',' }).Contains("app"))));
        }
 ///GENMHASH:D37E1E7B14292953A9F1B5EFCE33BA48:69C6AC5876477147A7C1E8E476E33234
 public async Task<IPagedCollection<Microsoft.Azure.Management.Compute.Fluent.IComputeSku>> ListByResourceTypeAsync(ComputeResourceType resourceType, CancellationToken cancellationToken = default(CancellationToken))
 {
     var skus = new List<IComputeSku>();
     foreach (var computeSku in await ListAsync(true, cancellationToken))
     {
         if (computeSku.ResourceType != null && computeSku.ResourceType.Equals(resourceType))
         {
             skus.Add(computeSku);
         }
     }
     return PagedCollection<IComputeSku, ResourceSku>.CreateFromEnumerable(skus);
 }
示例#16
0
        ///GENMHASH:271CC39CE723B6FD3D7CCA7471D4B201:8C5090C004DE7C712DE99F9B8F51B4CA
        public async Task <IPagedCollection <Microsoft.Azure.Management.Compute.Fluent.IComputeSku> > ListByRegionAsync(Region region, CancellationToken cancellationToken = default(CancellationToken))
        {
            var skus = new List <IComputeSku>();

            foreach (var computeSku in await ListAsync(true, cancellationToken))
            {
                if (computeSku.Regions != null && computeSku.Regions.Contains(region))
                {
                    skus.Add(computeSku);
                }
            }
            return(PagedCollection <IComputeSku, ResourceSkuInner> .CreateFromEnumerable(skus));
        }
示例#17
0
        public async Task <IPagedCollection <IVirtualMachineImage> > ListAsync(bool loadAllPages = true, CancellationToken cancellationToken = default(CancellationToken))
        {
            List <IVirtualMachineImage> firstPage = new List <IVirtualMachineImage>();
            var innerImages = await innerCollection.ListAsync(sku.Region.Name, sku.Publisher.Name, sku.Offer.Name, sku.Name, cancellationToken : cancellationToken);

            var getResult = await Task.WhenAll(innerImages.Select(async(innerImage) => new VirtualMachineImageImpl(sku.Region,
                                                                                                                   sku.Publisher.Name,
                                                                                                                   sku.Offer.Name,
                                                                                                                   sku.Name,
                                                                                                                   innerImage.Name,
                                                                                                                   await innerCollection.GetAsync(sku.Region.Name, sku.Publisher.Name, sku.Offer.Name, sku.Name, innerImage.Name, cancellationToken))));

            return(PagedCollection <IVirtualMachineImage, VirtualMachineImageResourceInner> .CreateFromEnumerable(getResult));
        }
 ///GENMHASH:7F5BEBF638B801886F5E13E6CCFF6A4E:653839A0F5B936DE3781953080508EA4
 public async Task <Microsoft.Azure.Management.ResourceManager.Fluent.Core.IPagedCollection <IWebhook> > ListAsync(CancellationToken cancellationToken = default(CancellationToken))
 {
     if (this.containerRegistry != null)
     {
         return(await this.webhooksClient.ListAsync(this.containerRegistry.ResourceGroupName, this.containerRegistry.Name, cancellationToken));
     }
     else
     {
         var task = new Task <Microsoft.Azure.Management.ResourceManager.Fluent.Core.IPagedCollection <IWebhook> >(() =>
         {
             return(PagedCollection <IWebhook, Models.WebhookInner> .CreateFromEnumerable(new List <IWebhook>()));
         });
         task.Start();
         return(await task);
     }
 }