コード例 #1
0
        public void TestFetchPageInfo()
        {
            PageInfo p = DataFetcher.FetchPageInfo(testUrl);

            Assert.IsNotNull(p.PageTitle);
            Assert.IsTrue(p.ImageCount > 0);
        }
コード例 #2
0
        private void CheckButton_Click(object sender, EventArgs e)
        {
            PageInfo info = DataFetcher.FetchPageInfo(UrlBox.Text);

            PageInfoLabel.Text = "";
            foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(info))
            {
                PageInfoLabel.Text += descriptor.Name + ": " + descriptor.GetValue(info) + "\n";
            }
        }