-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.cs
56 lines (55 loc) · 1.28 KB
/
page.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace mission_impossible_code_assassin
{
class page
{
#region Attributes
int numlinks;
List<Uri> links_within;
Uri father;
string HTML;
#endregion
#region get info
//get number of links
public int get_nlinks()
{
return numlinks;
}
// get the father node
public Uri get_father()
{
return father;
}
// get the HTML of the page
public string get_page()
{
return HTML;
}
// get the Links within this page
public List<Uri> get_linkswithin()
{
return links_within;
}
#endregion
#region constructors
public page(string pagegiven, List<Uri> linksgiven, Uri fathergiven)
{
HTML = pagegiven;
links_within = linksgiven;
father = fathergiven;
numlinks = linksgiven.Count;
}
public page()
{
numlinks = 0;
links_within = new List<Uri>();
father = null;
HTML = string.Empty;
}
#endregion
}
}