Exemplo n.º 1
0
        public static IEnumerable<SimpleServer> ListAllServers(IComputeProvider provider, int? blockSize = null, string imageId = null, string flavorId = null, string name = null, ServerState status = null, DateTimeOffset? changesSince = null, string region = null, CloudIdentity identity = null)
        {
            if (blockSize <= 0)
                throw new ArgumentOutOfRangeException("blockSize");

            SimpleServer lastServer = null;

            do
            {
                string marker = lastServer != null ? lastServer.Id : null;
                IEnumerable<SimpleServer> servers = provider.ListServers(imageId, flavorId, name, status, marker, blockSize, changesSince, region, identity);
                lastServer = null;
                foreach (SimpleServer server in servers)
                {
                    lastServer = server;
                    yield return server;
                }
            } while (lastServer != null);
        }
Exemplo n.º 2
0
        public static IEnumerable <SimpleServer> ListAllServers(IComputeProvider provider, int?blockSize = null, string imageId = null, string flavorId = null, string name = null, ServerState status = null, DateTimeOffset?changesSince = null, string region = null, CloudIdentity identity = null)
        {
            if (blockSize <= 0)
            {
                throw new ArgumentOutOfRangeException("blockSize");
            }

            SimpleServer lastServer = null;

            do
            {
                string marker = lastServer != null ? lastServer.Id : null;
                IEnumerable <SimpleServer> servers = provider.ListServers(imageId, flavorId, name, status, marker, blockSize, changesSince, region, identity);
                lastServer = null;
                foreach (SimpleServer server in servers)
                {
                    lastServer = server;
                    yield return(server);
                }
            } while (lastServer != null);
        }