The HtmlPageWrapper class is used to provide a wrapper for the DynamicHtmlPage to avoid code duplication.
상속: HtmlPage
예제 #1
0
        /// <inheritdoc />
        /// <exception cref="System.ArgumentNullException">
        ///     The <paramref name="page" /> parameter is <c>null</c>.
        /// </exception>
        public void Initialize(IHtmlPage page)
        {
            if (page == null)
            {
                throw new ArgumentNullException("page");
            }

            var location = page.Result.Outcomes.Last().Location;

            _wrapperPage = new HtmlPageWrapper(location);

            _wrapperPage.Initialize(page);
        }
예제 #2
0
        /// <inheritdoc />
        /// <exception cref="System.ArgumentNullException">
        ///     The <paramref name="browser" /> parameter is <c>null</c>.
        /// </exception>
        /// <exception cref="System.ArgumentNullException">
        ///     The <paramref name="response" /> parameter is <c>null</c>.
        /// </exception>
        /// <exception cref="System.ArgumentNullException">
        ///     The <paramref name="result" /> parameter is <c>null</c>.
        /// </exception>
        public void Initialize(IBrowser browser, HttpResponseMessage response, HttpResult result)
        {
            if (browser == null)
            {
                throw new ArgumentNullException("browser");
            }

            if (response == null)
            {
                throw new ArgumentNullException("response");
            }

            if (result == null)
            {
                throw new ArgumentNullException("result");
            }

            var location = result.Outcomes.Last().Location;

            _wrapperPage = new HtmlPageWrapper(location);

            _wrapperPage.Initialize(browser, response, result);
        }