Ejemplo n.º 1
0
        public IActionResult LoadLawmakers()
        {
            // loads lawmaker data from a third party site into Astra
            Astra.LoadLawmakers(_host, _config);

            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public void AddFlowerToFlowerCollection(string className, int count, string flowername)
        {
            Flower fl;

            for (int i = 0; i < count; i++)
            {
                switch (className)
                {
                case "Astra":
                    fl = new Astra(flowername);
                    break;

                case "Tulip":
                    fl = new Tulip(flowername);
                    break;

                case "Violet":
                    fl = new Violet(flowername);
                    break;

                default:
                    throw new Exception("Flower type not found.");
                }

                this.FlowerCollection.Add(fl);
            }
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            //new flower
            Astra Astra1 = new Astra("Astra", 3.00, 10);

            //Astra1.DisplayFlower();

            //do not delete, useful line
            Console.ReadLine();
        }