コード例 #1
0
        public static IEnumerable <FlavorDetails> ListAllFlavorsWithDetails(IComputeProvider provider, int?blockSize = null, int?minDiskInGB = null, int?minRamInMB = null, string region = null, CloudIdentity identity = null)
        {
            if (blockSize <= 0)
            {
                throw new ArgumentOutOfRangeException("blockSize");
            }

            FlavorDetails lastFlavor = null;

            do
            {
                string marker = lastFlavor != null ? lastFlavor.Id : null;
                IEnumerable <FlavorDetails> flavors = provider.ListFlavorsWithDetails(minDiskInGB, minRamInMB, marker, blockSize, region, identity);
                lastFlavor = null;
                foreach (FlavorDetails flavor in flavors)
                {
                    lastFlavor = flavor;
                    yield return(flavor);
                }
            } while (lastFlavor != null);
        }
コード例 #2
0
        public static IEnumerable<FlavorDetails> ListAllFlavorsWithDetails(IComputeProvider provider, int? blockSize = null, int? minDiskInGB = null, int? minRamInMB = null, string region = null, CloudIdentity identity = null)
        {
            if (blockSize <= 0)
                throw new ArgumentOutOfRangeException("blockSize");

            FlavorDetails lastFlavor = null;

            do
            {
                string marker = lastFlavor != null ? lastFlavor.Id : null;
                IEnumerable<FlavorDetails> flavors = provider.ListFlavorsWithDetails(minDiskInGB, minRamInMB, marker, blockSize, region, identity);
                lastFlavor = null;
                foreach (FlavorDetails flavor in flavors)
                {
                    lastFlavor = flavor;
                    yield return flavor;
                }
            } while (lastFlavor != null);
        }