コード例 #1
0
        private static void WithoutUsingFacadePattern()
        {
            var zoneFinder        = new ZoneFinder();
            var zone              = zoneFinder.GetZone("12455623");
            var tempratureService = new TempratureService();
            var tempf             = tempratureService.GetTemp(zone);
            var tempConvertor     = new TempConvertor();
            var finalTemp         = tempConvertor.GetS(tempf);

            Console.WriteLine("Final Temp : " + finalTemp);
        }
コード例 #2
0
        public double GetTempByS(string postalCode)
        {
            ZoneFinder        zoneFinder = new ZoneFinder();
            var               zone       = zoneFinder.GetZone("454545");
            TempratureService service    = new TempratureService();
            var               tempF      = service.GetTemp(zone);
            TempConvertor     convertor  = new TempConvertor();
            var               tempS      = convertor.GetS(tempF);

            return(tempS);
        }
コード例 #3
0
        public int GetTemp(string postalCode)
        {
            var zoneFinder        = new ZoneFinder();
            var zone              = zoneFinder.GetZone(postalCode);
            var tempratureService = new TempratureService();
            var tempf             = tempratureService.GetTemp(zone);
            var tempConvertor     = new TempConvertor();
            var finalTemp         = tempConvertor.GetS(tempf);

            return(finalTemp);
        }