Beispiel #1
0
        /// <summary>
        /// view 컨트롤에 동작에 필요한 클래스들을 di개념으로 설정
        /// <see cref="MovieManDtoFactory"/>
        /// <see cref="YunWebRequest"/>
        /// </summary>
        /// <param name="view"></param>
        public static void SetUpDi(this MovieManSearchModelView view)
        {
            var cvfactory = new MovieManDtoFactory() as IDtoFactory <MovieManDto>;

            view.IDtoFactory = cvfactory;
            view.MovieManSearchGetQueryUrl = new MovieManSearchGetQueryUrl();
            view.IYunWebRequest            = new YunWebRequest();
        }
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            YunWebRequest          webRequest             = new YunWebRequest();
            MovieSearchGetQueryUrl MovieSearchGetQueryUrl = new MovieSearchGetQueryUrl();
            var url = MovieSearchGetQueryUrl.MakeQueryUrl();
            var ret = await webRequest.Request(url);

            MovieDtoFactory movieDtoFactory = new MovieDtoFactory();

            movieDtoFactory.Convert(movieDtoFactory.StringConvert(ret));

            MovieManSearchGetQueryUrl movieManSearchGetQueryUrl = new MovieManSearchGetQueryUrl();
            var url2 = movieManSearchGetQueryUrl.MakeQueryUrl();
            var ret2 = await webRequest.Request(url2);


            MovieManDtoFactory movieManDtoFactory = new MovieManDtoFactory();

            movieManDtoFactory.Convert(movieManDtoFactory.StringConvert(ret2));
            string rres = "ef";
        }