public async Task <IWorldsEndMusicGetResponse> GetWorldsEndMusicAsync(IWorldsEndMusicGetRequest request)
        {
            var   worldsEndMusicGet = client.GetAsync(ChunithmNetUrl.CreateUrl("worldsEnd/worldsEndList"));
            await worldsEndMusicGet;

            var response = new WorldsEndMusicGetResponse(worldsEndMusicGet.Result);

            if (response.Success)
            {
                response.WorldsEndMusic = new WorldsEndMusicParser().Parse(response.DocumentText);
            }
            return(response);
        }
        public async Task <IWorldsEndMusicGetResponse> GetWorldsEndMusicAsync(IWorldsEndMusicGetRequest request)
        {
            if (WebBrowserNavigator.WebBrowser.Url?.AbsoluteUri != ChunithmNetUrl.WorldsEndMusic)
            {
                await WebBrowserNavigator.NavigateAsync(ChunithmNetUrl.WorldsEndMusic);
            }

            var response = new WorldsEndMusicGetResponse(WebBrowserNavigator.WebBrowser);

            if (response.Success)
            {
                var worldsEndMusicParser = new WorldsEndMusicParser();
                response.WorldsEndMusic = worldsEndMusicParser.Parse(WebBrowserNavigator.WebBrowser.DocumentText);
            }
            return(response);
        }
示例#3
0
        public async Task <IWorldsEndMusicGetResponse> GetWorldsEndMusicAsync(IWorldsEndMusicGetRequest request)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }

            if (WebBrowserNavigator.WebBrowser.Address != ChunithmNetUrl.WorldsEndMusic)
            {
                await WebBrowserNavigator.LoadAsync(ChunithmNetUrl.WorldsEndMusic);
            }

            var   responseAsync = WorldsEndMusicGetResponse.CreateResponseAsync(WebBrowserNavigator.WebBrowser);
            await responseAsync;
            var   response = responseAsync.Result;

            if (response.Success)
            {
                var worldsEndMusicParser = new WorldsEndMusicParser();
                response.WorldsEndMusic = worldsEndMusicParser.Parse(response.DocumentText);
            }
            return(response);
        }