public static CountryProtocol[] ConvertCollection(CountryCollection countries)
        {
            CountryProtocol[] protoCountries = new CountryProtocol[countries.Count];

            int i = 0;
            foreach(Country country in countries)
            {
                protoCountries[i] = new CountryProtocol( country );
                i++;
            }

            return protoCountries;
        }
Esempio n. 2
0
        public static CountryProtocol[] ConvertCollection(CountryCollection countries)
        {
            CountryProtocol[] protoCountries = new CountryProtocol[countries.Count];

            int i = 0;

            foreach (Country country in countries)
            {
                protoCountries[i] = new CountryProtocol(country);
                i++;
            }

            return(protoCountries);
        }