Exemplo n.º 1
0
        public static async Task Main()
        {
            BuildDependencies();

            // For a real world application, we would want this file path configurable.
            // For now, this file is added to the project and copied to the output
            // directory for simplicity.

            var seasonResultService = new SeasonResultService(_seasonGoalsResultFileParser, _loggingService);

            var programRunner = new ConsoleDifferentiableDisplayer <int>(seasonResultService);

            await programRunner.DisplayMinDifferential <ISeasonGoalsResult>(
                (result) => $"Team with smallest point differential: { result.Team }",
                "Unable to determine team with smallest point differential. See logs.",
                SeasonGoalsResult.EmptySeasonResult).ConfigureAwait(false);
        }
Exemplo n.º 2
0
        public static async Task Main()
        {
            BuildDependencies();

            // For a real world application, we would want this file path configurable.
            // For now, this file is added to the project and copied to the output
            // directory for simplicity._dailyWeatherFileParser

            var dailyWeatherService = new DailyWeatherService(_dailyWeatherFileParser, _loggingService);

            var programRunner = new ConsoleDifferentiableDisplayer <int>(dailyWeatherService);

            await programRunner.DisplayMinDifferential <IDailyTemperature>(
                (result) => $"Day number with minimum temperature spread: { result.DayOfMonth }",
                "Unable to determine day number with minimum temperature spread. See logs.",
                DailyTemperature.EmptyDailyWeather).ConfigureAwait(false);
        }