Beispiel #1
0
        static void Main(string[] args)
        {
            ILogger           logger            = new TimeLogger();
            IWeatherClient    client            = new FlurlWeatherClient();
            SalutationBuilder salutationBuilder = new SalutationBuilder();
            Greeter           greeter           = new Greeter(logger, salutationBuilder);

            logger.Print("Calling OpenWeatherMap");

            Weather weather = client.getWeather("Oberhausen");

            logger.Print(weather.name);

            Console.ReadLine();
        }
Beispiel #2
0
 public Greeter(ILogger logger, SalutationBuilder salutationBuilder)
 {
     mLogger            = logger;
     mSalutationBuilder = salutationBuilder;
 }