public static IEnumerable <Flavor> ListAllFlavors(IComputeProvider provider, int?blockSize = null, int?minDiskInGB = null, int?minRamInMB = null, string region = null, CloudIdentity identity = null) { if (blockSize <= 0) { throw new ArgumentOutOfRangeException("blockSize"); } Flavor lastFlavor = null; do { string marker = lastFlavor != null ? lastFlavor.Id : null; IEnumerable <Flavor> flavors = provider.ListFlavors(minDiskInGB, minRamInMB, marker, blockSize, region, identity); lastFlavor = null; foreach (Flavor flavor in flavors) { lastFlavor = flavor; yield return(flavor); } } while (lastFlavor != null); }
public static IEnumerable<Flavor> ListAllFlavors(IComputeProvider provider, int? blockSize = null, int? minDiskInGB = null, int? minRamInMB = null, string region = null, CloudIdentity identity = null) { if (blockSize <= 0) throw new ArgumentOutOfRangeException("blockSize"); Flavor lastFlavor = null; do { string marker = lastFlavor != null ? lastFlavor.Id : null; IEnumerable<Flavor> flavors = provider.ListFlavors(minDiskInGB, minRamInMB, marker, blockSize, region, identity); lastFlavor = null; foreach (Flavor flavor in flavors) { lastFlavor = flavor; yield return flavor; } } while (lastFlavor != null); }