Skip to content

Commit 5647d8f

Browse files
committed
Updating .NET online documentation to new presentation style and updating tools for documentation generation
1 parent 2e46b1b commit 5647d8f

File tree

2,404 files changed

+57549
-41620
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,404 files changed

+57549
-41620
lines changed

copyiedriver.bat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
copy /y build\cpp\Win32\Release\IEDriverServer.exe cpp\prebuilt\Win32\Release
3+
copy /y build\cpp\x64\Release\IEDriverServer.exe cpp\prebuilt\x64\Release

docs/api/dotnet/FillNode.php

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?
2+
// Contributed to the Sandcastle Help File Builder project by Thomas Levesque
3+
4+
header("Content-Type: text/html; charset=utf-8");
5+
$toc = new DOMDocument();
6+
$toc->load('WebTOC.xml');
7+
$xpath = new DOMXPath($toc);
8+
$id = $_GET["Id"];
9+
$nodes = $xpath->query("//HelpTOCNode[@Id='$id']/*");
10+
if ($nodes->length == 0)
11+
{
12+
?>
13+
<b>TOC node not found!</b>
14+
<?
15+
die();
16+
}
17+
foreach($nodes as $node)
18+
{
19+
$id = $node->getAttribute("Id");
20+
$url = $node->getAttribute("Url");
21+
$title = $node->getAttribute("Title");
22+
if (empty($url))
23+
{
24+
$url = "#";
25+
$target = "";
26+
}
27+
else
28+
{
29+
$target = " target=\"TopicContent\"";
30+
}
31+
32+
if ($node->hasChildNodes())
33+
{
34+
?>
35+
<div class="TreeNode">
36+
<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/>
37+
<a class="UnselectedNode" onclick="javascript: Expand(this);" href="<?= $url ?>"<?= $target ?>><?= $title ?></a>
38+
<div id="<?= $id ?>" class="Hidden"></div>
39+
</div>
40+
<?
41+
}
42+
else
43+
{
44+
?>
45+
<div class="TreeItem">
46+
<img src="Item.gif"/>
47+
<a class="UnselectedNode" onclick="javascript: SelectNode(this);" href="<?= $url ?>"<?= $target ?>><?= $title ?></a>
48+
</div>
49+
<?
50+
}
51+
}
52+
?>

docs/api/dotnet/Index.aspx

+9-5
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
44
<html>
55

6-
<head>
6+
<head runat="server">
77
<title>WebDriver - Table of Content</title>
8-
<link rel="stylesheet" href="TOC.css">
8+
<link rel="stylesheet" href="TOC.css" />
99
<link rel="shortcut icon" href="favicon.ico"/>
1010
<script type="text/javascript" src="TOC.js"></script>
1111
</head>
1212

13-
<body onload="javascript: Initialize();" onresize="javascript: ResizeTree();">
13+
<body onload="javascript: Initialize('.aspx');" onresize="javascript: ResizeTree();">
1414
<form id="IndexForm" runat="server">
1515

1616
<div id="TOCDiv" class="TOCDiv">
@@ -42,6 +42,9 @@ Keyword Index
4242
src="Index.gif" height="16" width="16" alt="Index" />
4343
<img class="TOCLink" onclick="javascript: ShowHideSearch(true);"
4444
src="Search.gif" height="16" width="16" alt="Search" />
45+
<a href="#" title="Click to obtain a direct link to the displayed topic"
46+
style="margin-left: 10px; vertical-align: top;"
47+
onclick="javascript: ShowDirectLink();">Direct Link</a>
4548
</div>
4649

4750
<div class="Tree" id="divSearchResults" style="display: none;"
@@ -75,8 +78,8 @@ This page uses an IFRAME but your browser does not support it.
7578
// System : Sandcastle Help File Builder
7679
// File : Index.aspx
7780
// Author : Eric Woodruff ([email protected])
78-
// Updated : 04/10/2008
79-
// Note : Copyright 2007-2008, Eric Woodruff, All rights reserved
81+
// Updated : 02/18/2012
82+
// Note : Copyright 2007-2012, Eric Woodruff, All rights reserved
8083
// Compiler: Microsoft C#
8184
//
8285
// This file contains the code used to display the index page for a website
@@ -93,6 +96,7 @@ This page uses an IFRAME but your browser does not support it.
9396
// Version Date Who Comments
9497
// ============================================================================
9598
// 1.5.0.0 06/21/2007 EFW Created the code
99+
// 1.9.4.0 02/18/2012 EFW Merged code from tom103 to show direct link
96100
//=============================================================================
97101
98102
protected void Page_Load(object sender, EventArgs e)

docs/api/dotnet/LastBuild.log

+530-5,252
Large diffs are not rendered by default.

docs/api/dotnet/LoadIndexKeywords.php

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?
2+
// Contributed to the Sandcastle Help File Builder project by Thomas Levesque
3+
4+
$ki = new DOMDocument();
5+
$ki->load("WebKI.xml");
6+
$xpath = new DOMXPath($ki);
7+
$nodes = $xpath->query("/HelpKI/*");
8+
$startIndexParam = $_GET["StartIndex"];
9+
$startIndex = 0;
10+
if (!empty($startIndexParam))
11+
$startIndex = intval($startIndexParam) * 128;
12+
$endIndex = $startIndex + 128;
13+
14+
if ($endIndex > $nodes->length)
15+
$endIndex = $nodes->length;
16+
17+
if($startIndex > 0)
18+
{
19+
?>
20+
<div class="IndexItem">
21+
<span>&nbsp;</span><a class="UnselectedNode" onclick="javascript: return ChangeIndexPage(-1);" href="#"><b><< Previous page</b></a>
22+
</div>
23+
<?
24+
}
25+
26+
while($startIndex < $endIndex)
27+
{
28+
$node = $nodes->item($startIndex);
29+
$url = $node->getAttribute("Url");
30+
$title = $node->getAttribute("Title");
31+
$target = " target=\"TopicContent\"";
32+
33+
if (empty($url))
34+
{
35+
$url = "#";
36+
$target = "";
37+
}
38+
?>
39+
<div class="IndexItem">
40+
<span>&nbsp;</span><a class="UnselectedNode" onclick="javascript: return SelectIndexNode(this);" href="<?= $url ?>"<?= $target ?>><?= $title ?></a>
41+
<?
42+
$subNodes = $xpath->query("./HelpKINode", $node);
43+
foreach($subNodes as $subNode)
44+
{
45+
$subUrl = $subNode->getAttribute("Url");
46+
$subTitle = $subNode->getAttribute("Title");
47+
?>
48+
<div class="IndexSubItem">
49+
<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectIndexNode(this);" href="<?= $subUrl ?>" target="TopicContent"><?= $subTitle ?></a>
50+
</div>
51+
52+
<?
53+
}
54+
?>
55+
</div>
56+
<?
57+
$startIndex++;
58+
}
59+
60+
if($startIndex < $nodes->length)
61+
{
62+
?>
63+
<div class="IndexItem">
64+
<span>&nbsp;</span><a class="UnselectedNode" onclick="javascript: return ChangeIndexPage(1);" href="#"><b>Next page >></b></a>
65+
</div>
66+
<?
67+
}
68+
?>

docs/api/dotnet/SearchHelp.aspx

+36-42
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// System : Sandcastle Help File Builder
66
// File : SearchHelp.aspx
77
// Author : Eric Woodruff ([email protected])
8-
// Updated : 07/03/2007
9-
// Note : Copyright 2007, Eric Woodruff, All rights reserved
8+
// Updated : 04/27/2012
9+
// Note : Copyright 2007-2012, Eric Woodruff, All rights reserved
1010
// Compiler: Microsoft C#
1111
//
1212
// This file contains the code used to search for keywords within the help
@@ -21,33 +21,36 @@
2121
// Version Date Who Comments
2222
// ============================================================================
2323
// 1.5.0.0 06/24/2007 EFW Created the code
24+
// 1.9.4.0 02/17/2012 EFW Switched to JSON serialization to support websites
25+
// that use something other than ASP.NET such as PHP.
2426
//=============================================================================
2527
2628
private class Ranking
2729
{
2830
public string Filename, PageTitle;
2931
public int Rank;
30-
32+
3133
public Ranking(string file, string title, int rank)
3234
{
3335
Filename = file;
3436
PageTitle = title;
3537
Rank = rank;
3638
}
37-
}
39+
}
3840
3941
/// <summary>
4042
/// Render the search results
4143
/// </summary>
4244
/// <param name="writer">The writer to which the results are written</param>
4345
protected override void Render(HtmlTextWriter writer)
4446
{
45-
FileStream fs = null;
46-
BinaryFormatter bf;
47+
JavaScriptSerializer jss = new JavaScriptSerializer();
4748
string searchText, ftiFile;
4849
char letter;
4950
bool sortByTitle = false;
5051
52+
jss.MaxJsonLength = Int32.MaxValue;
53+
5154
// The keywords for which to search should be passed in the query string
5255
searchText = this.Request.QueryString["Keywords"];
5356
@@ -67,43 +70,35 @@ protected override void Render(HtmlTextWriter writer)
6770
Dictionary<string, List<long>> ftiWords, wordDictionary =
6871
new Dictionary<string,List<long>>();
6972
70-
try
73+
// Load the file index
74+
using(StreamReader sr = new StreamReader(Server.MapPath("fti/FTI_Files.json")))
7175
{
72-
// Load the file index
73-
fs = new FileStream(Server.MapPath("fti/FTI_Files.bin"), FileMode.Open,
74-
FileAccess.Read);
75-
bf = new BinaryFormatter();
76-
fileList = (List<string>)bf.Deserialize(fs);
77-
fs.Close();
78-
79-
// Load the required word index files
80-
foreach(string word in keywords)
76+
fileList = jss.Deserialize<List<string>>(sr.ReadToEnd());
77+
}
78+
79+
// Load the required word index files
80+
foreach(string word in keywords)
81+
{
82+
letter = word[0];
83+
84+
if(!letters.Contains(letter))
8185
{
82-
letter = word[0];
83-
84-
if(!letters.Contains(letter))
85-
{
86-
letters.Add(letter);
87-
ftiFile = Server.MapPath(String.Format(
88-
CultureInfo.InvariantCulture, "fti/FTI_{0}.bin", (int)letter));
86+
letters.Add(letter);
87+
ftiFile = Server.MapPath(String.Format(CultureInfo.InvariantCulture,
88+
"fti/FTI_{0}.json", (int)letter));
8989
90-
if(File.Exists(ftiFile))
90+
if(File.Exists(ftiFile))
91+
{
92+
using(StreamReader sr = new StreamReader(ftiFile))
9193
{
92-
fs = new FileStream(ftiFile, FileMode.Open, FileAccess.Read);
93-
ftiWords = (Dictionary<string, List<long>>)bf.Deserialize(fs);
94-
fs.Close();
95-
96-
foreach(string ftiWord in ftiWords.Keys)
97-
wordDictionary.Add(ftiWord, ftiWords[ftiWord]);
94+
ftiWords = jss.Deserialize<Dictionary<string, List<long>>>(sr.ReadToEnd());
9895
}
96+
97+
foreach(string ftiWord in ftiWords.Keys)
98+
wordDictionary.Add(ftiWord, ftiWords[ftiWord]);
9999
}
100100
}
101101
}
102-
finally
103-
{
104-
if(fs != null && fs.CanRead)
105-
fs.Close();
106-
}
107102
108103
// Perform the search and return the results as a block of HTML
109104
writer.Write(this.Search(keywords, fileList, wordDictionary, sortByTitle));
@@ -216,14 +211,13 @@ private string Search(List<string> keywords, List<string> fileInfo,
216211
}
217212
218213
// Sort by rank in descending order or by page title in ascending order
219-
rankings.Sort(
220-
delegate(Ranking x, Ranking y)
221-
{
222-
if(!sortByTitle)
223-
return y.Rank - x.Rank;
214+
rankings.Sort(delegate (Ranking x, Ranking y)
215+
{
216+
if(!sortByTitle)
217+
return y.Rank - x.Rank;
224218
225-
return x.PageTitle.CompareTo(y.PageTitle);
226-
});
219+
return x.PageTitle.CompareTo(y.PageTitle);
220+
});
227221
228222
// Format the file list and return the results
229223
foreach(Ranking r in rankings)

0 commit comments

Comments
 (0)