Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2017-04-22 11:25:38 +0300
committerMarek Safar <marek.safar@gmail.com>2017-04-23 14:50:48 +0300
commit2cb98cb8edac01f54ce4fb393b293aa1a60d0d72 (patch)
tree944c983e5dc4165c25bbcb59dfb8c15e5e1efbf1 /mcs/class/monodoc
parentb21c70ff49e2821b49fff4e30c26e0c03f262c63 (diff)
[mdoc] Integrate api-doc-tools version
Diffstat (limited to 'mcs/class/monodoc')
-rw-r--r--mcs/class/monodoc/Makefile62
-rw-r--r--mcs/class/monodoc/Mono.Documentation/ManifestResourceResolver.cs42
-rw-r--r--mcs/class/monodoc/Mono.Documentation/XmlDocUtils.cs200
-rw-r--r--mcs/class/monodoc/Mono.Utilities/LRUCache.cs92
-rw-r--r--mcs/class/monodoc/Mono.Utilities/MemoryLRU.cs92
-rw-r--r--mcs/class/monodoc/Mono.Utilities/colorizer.cs171
-rw-r--r--mcs/class/monodoc/Monodoc.Ecma/.gitignore1
-rw-r--r--mcs/class/monodoc/Monodoc.Ecma/EcmaDesc.cs419
-rw-r--r--mcs/class/monodoc/Monodoc.Ecma/EcmaUrlParser.jay263
-rw-r--r--mcs/class/monodoc/Monodoc.Ecma/EcmaUrlParserDriver.cs17
-rw-r--r--mcs/class/monodoc/Monodoc.Ecma/EcmaUrlTokenizer.cs171
-rw-r--r--mcs/class/monodoc/Monodoc/HelpSource.cs357
-rw-r--r--mcs/class/monodoc/Monodoc/HelpSource_Legacy.cs52
-rw-r--r--mcs/class/monodoc/Monodoc/Node.cs382
-rw-r--r--mcs/class/monodoc/Monodoc/Node_Legacy.cs31
-rw-r--r--mcs/class/monodoc/Monodoc/Provider.cs27
-rw-r--r--mcs/class/monodoc/Monodoc/RootTree.cs545
-rw-r--r--mcs/class/monodoc/Monodoc/RootTree_Legacy.cs53
-rw-r--r--mcs/class/monodoc/Monodoc/SearchableDocument.cs66
-rw-r--r--mcs/class/monodoc/Monodoc/SearchableIndex.cs179
-rw-r--r--mcs/class/monodoc/Monodoc/Tree.cs225
-rw-r--r--mcs/class/monodoc/Monodoc/TypeUtils.cs40
-rw-r--r--mcs/class/monodoc/Monodoc/cache.cs55
-rw-r--r--mcs/class/monodoc/Monodoc/caches/FileCache.cs75
-rw-r--r--mcs/class/monodoc/Monodoc/caches/NullCache.cs54
-rw-r--r--mcs/class/monodoc/Monodoc/generator.cs31
-rw-r--r--mcs/class/monodoc/Monodoc/generators/HtmlGenerator.cs156
-rw-r--r--mcs/class/monodoc/Monodoc/generators/RawGenerator.cs41
-rw-r--r--mcs/class/monodoc/Monodoc/generators/html/Addin2Html.cs197
-rw-r--r--mcs/class/monodoc/Monodoc/generators/html/Ecma2Html.cs333
-rw-r--r--mcs/class/monodoc/Monodoc/generators/html/Ecmaspec2Html.cs66
-rw-r--r--mcs/class/monodoc/Monodoc/generators/html/Error2Html.cs110
-rw-r--r--mcs/class/monodoc/Monodoc/generators/html/Idem.cs34
-rw-r--r--mcs/class/monodoc/Monodoc/generators/html/Man2Html.cs316
-rw-r--r--mcs/class/monodoc/Monodoc/generators/html/MonoBook2Html.cs87
-rw-r--r--mcs/class/monodoc/Monodoc/generators/html/Toc2Html.cs44
-rw-r--r--mcs/class/monodoc/Monodoc/index.cs310
-rw-r--r--mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs595
-rw-r--r--mcs/class/monodoc/Monodoc/providers/addins-provider.cs130
-rw-r--r--mcs/class/monodoc/Monodoc/providers/ecma-provider.cs858
-rw-r--r--mcs/class/monodoc/Monodoc/providers/ecmaspec-provider.cs193
-rw-r--r--mcs/class/monodoc/Monodoc/providers/ecmauncompiled-provider.cs68
-rw-r--r--mcs/class/monodoc/Monodoc/providers/error-provider.cs200
-rwxr-xr-xmcs/class/monodoc/Monodoc/providers/man-provider.cs106
-rw-r--r--mcs/class/monodoc/Monodoc/providers/simple-provider.cs153
-rw-r--r--mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs242
-rw-r--r--mcs/class/monodoc/Monodoc/settings.cs48
-rw-r--r--mcs/class/monodoc/Monodoc/settings_Legacy.cs110
-rw-r--r--mcs/class/monodoc/Monodoc/storage.cs67
-rw-r--r--mcs/class/monodoc/Monodoc/storage/NullStorage.cs63
-rw-r--r--mcs/class/monodoc/Monodoc/storage/UncompiledDocStorage.cs69
-rw-r--r--mcs/class/monodoc/Monodoc/storage/ZipStorage.cs131
-rw-r--r--mcs/class/monodoc/Resources/.gitattributes1
-rw-r--r--mcs/class/monodoc/Resources/Lminus.gifbin337 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/Lplus.gifbin333 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/base.css45
-rw-r--r--mcs/class/monodoc/Resources/creativecommons.pngbin4404 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/ecmaspec-html-css.xsl98
-rw-r--r--mcs/class/monodoc/Resources/ecmaspec-html.xsl96
-rw-r--r--mcs/class/monodoc/Resources/ecmaspec.css68
-rwxr-xr-xmcs/class/monodoc/Resources/helper.js12
-rw-r--r--mcs/class/monodoc/Resources/home.html17
-rw-r--r--mcs/class/monodoc/Resources/images/bc_bg.pngbin171 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/bc_separator.pngbin517 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/error.pngbin666 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/hatch.pngbin642 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/headerbg.pngbin8169 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/help.pngbin786 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/house.pngbin806 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/members.pngbin344 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/namespace.pngbin679 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/privclass.pngbin723 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/privdelegate.pngbin887 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/privenumeration.pngbin737 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/privevent.pngbin757 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/privextension.pngbin855 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/privfield.pngbin707 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/privinterface.pngbin734 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/privmethod.pngbin808 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/privproperty.pngbin968 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/privstructure.pngbin860 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/protclass.pngbin755 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/protdelegate.pngbin878 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/protenumeration.pngbin697 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/protevent.pngbin735 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/protextension.pngbin801 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/protfield.pngbin666 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/protinterface.pngbin683 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/protmethod.pngbin525 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/protproperty.pngbin925 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/protstructure.pngbin847 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/pubclass.pngbin628 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/pubdelegate.pngbin836 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/pubenumeration.pngbin516 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/pubevent.pngbin520 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/pubextension.pngbin679 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/pubfield.pngbin469 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/pubinterface.pngbin492 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/pubmethod.pngbin545 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/pubproperty.pngbin766 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/pubstructure.pngbin743 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/reference.pngbin448 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/images/treebg.pngbin134 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Resources/mdoc-html-format.xsl24
-rw-r--r--mcs/class/monodoc/Resources/mdoc-html-utils.xsl2808
-rw-r--r--mcs/class/monodoc/Resources/mdoc-sections-css.xsl137
-rw-r--r--mcs/class/monodoc/Resources/mdoc-sections.xsl127
-rw-r--r--mcs/class/monodoc/Resources/mono-ecma-css.xsl47
-rw-r--r--mcs/class/monodoc/Resources/mono-ecma-impl.xsl539
-rw-r--r--mcs/class/monodoc/Resources/mono-ecma.css607
-rw-r--r--mcs/class/monodoc/Resources/mono-ecma.xsl42
-rw-r--r--mcs/class/monodoc/Resources/toc-html.xsl32
-rw-r--r--mcs/class/monodoc/Test/Monodoc.Ecma/EcmaUrlTests.cs839
-rw-r--r--mcs/class/monodoc/Test/Monodoc.Generators/RawGeneratorTests.cs65
-rw-r--r--mcs/class/monodoc/Test/Monodoc/EcmaDocTests.cs66
-rw-r--r--mcs/class/monodoc/Test/Monodoc/HelpSourceTests.cs227
-rw-r--r--mcs/class/monodoc/Test/Monodoc/NodeTest.cs42
-rw-r--r--mcs/class/monodoc/Test/Monodoc/RootTreeTest.cs56
-rw-r--r--mcs/class/monodoc/Test/Monodoc/SettingsTest.cs23
-rw-r--r--mcs/class/monodoc/Test/Monodoc/TreeTest.cs44
-rw-r--r--mcs/class/monodoc/Test/monodoc_test/.gitignore1
-rw-r--r--mcs/class/monodoc/Test/monodoc_test/monodoc.xml7
-rw-r--r--mcs/class/monodoc/Test/monodoc_test/trees/tree-from-2-10.treebin69 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Test/monodoc_test/trees/tree-from-3-0-old.treebin81 -> 0 bytes
-rw-r--r--mcs/class/monodoc/Test/monodoc_test/trees/tree-from-3-0.treebin81 -> 0 bytes
-rwxr-xr-xmcs/class/monodoc/jay.sh10
-rw-r--r--mcs/class/monodoc/monodoc.dll.sources949
-rw-r--r--mcs/class/monodoc/monodoc_test.dll.sources16
128 files changed, 493 insertions, 14981 deletions
diff --git a/mcs/class/monodoc/Makefile b/mcs/class/monodoc/Makefile
index d7b9717c7fa..d84f7a1ac3e 100644
--- a/mcs/class/monodoc/Makefile
+++ b/mcs/class/monodoc/Makefile
@@ -8,8 +8,6 @@ LIBRARY_PACKAGE = monodoc
# also activate legacy mode to compile old monodoc.dll api
LOCAL_MCS_FLAGS = /nowarn:618,612,672,809,414,649 /define:LEGACY_MODE
-JAY_FLAGS = -ct
-
IMAGES = \
Resources/images/bc_bg.png \
Resources/images/bc_separator.png \
@@ -53,10 +51,9 @@ IMAGES = \
Resources/images/reference.png \
Resources/images/treebg.png
-IMAGE_RESOURCE_COMMAND = $(foreach file,$(IMAGES),/resource:$(file),$(notdir $(file)))
+IMAGE_RESOURCE_COMMAND = $(foreach file,$(IMAGES),/resource:../../../external/api-doc-tools/monodoc/$(file),$(notdir $(file)))
RESOURCE_FILES = \
- ../../docs/monodoc.xml \
Resources/base.css \
Resources/ecmaspec-html-css.xsl \
Resources/ecmaspec-html.xsl \
@@ -74,42 +71,20 @@ RESOURCE_FILES = \
Resources/mono-ecma-impl.xsl \
Resources/mono-ecma.css \
Resources/mono-ecma.xsl \
- Resources/toc-html.xsl \
- $(IMAGES)
+ Resources/toc-html.xsl
+
+RESOURCE_COMMAND = $(foreach file,$(RESOURCE_FILES),/resource:../../../external/api-doc-tools/monodoc/$(file),$(notdir $(file)))
+
EXTRA_DISTFILES = \
- jay.sh \
monodoc.dll.config.in \
- $(RESOURCE_FILES) \
- Monodoc.Ecma/EcmaUrlParser.jay \
- Test/monodoc_test/monodoc.xml \
- Test/monodoc_test/trees/tree-from-2-10.tree \
- Test/monodoc_test/trees/tree-from-3-0-old.tree \
- Test/monodoc_test/trees/tree-from-3-0.tree
LIB_REFS = ICSharpCode.SharpZipLib System System.Core System.Xml System.Xml.Linq System.Configuration
LIB_MCS_FLAGS = \
/unsafe \
/nowarn:169,164,162,168,219,618,612 \
/resource:../../docs/monodoc.xml,monodoc.xml \
- /resource:Resources/base.css,base.css \
- /resource:Resources/ecmaspec-html-css.xsl,ecmaspec-html-css.xsl \
- /resource:Resources/ecmaspec-html.xsl,ecmaspec-html.xsl \
- /resource:Resources/ecmaspec.css,ecmaspec.css \
- /resource:Resources/helper.js,helper.js \
- /resource:Resources/home.html,home.html \
- /resource:Resources/Lminus.gif,Lminus.gif \
- /resource:Resources/Lplus.gif,Lplus.gif \
- /resource:Resources/creativecommons.png,creativecommons.png \
- /resource:Resources/mdoc-html-format.xsl,mdoc-html-format.xsl \
- /resource:Resources/mdoc-html-utils.xsl,mdoc-html-utils.xsl \
- /resource:Resources/mdoc-sections-css.xsl,mdoc-sections-css.xsl \
- /resource:Resources/mdoc-sections.xsl,mdoc-sections.xsl \
- /resource:Resources/mono-ecma-css.xsl,mono-ecma-css.xsl \
- /resource:Resources/mono-ecma-impl.xsl,mono-ecma-impl.xsl \
- /resource:Resources/mono-ecma.css,mono-ecma.css \
- /resource:Resources/mono-ecma.xsl,mono-ecma.xsl \
- /resource:Resources/toc-html.xsl,toc-html.xsl \
+ $(RESOURCE_COMMAND) \
$(IMAGE_RESOURCE_COMMAND)
CLEAN_FILES += $(the_lib).config
@@ -117,31 +92,10 @@ CLEAN_FILES += $(the_lib).config
TEST_MCS_FLAGS =
TEST_LIB_REFS = System System.Core System.Xml
-DOC_SOURCE_DIRS = \
- ../../docs \
- ../../../docs
-
-DOC_SOURCES = $(foreach dir,$(DOC_SOURCE_DIRS),$(wildcard $(dir)/*.source $(dir)/*.tree $(dir)/*.zip))
-
include ../../build/library.make
-$(the_lib): Makefile $(RESOURCE_FILES)
+all-local: $(the_lib).config
-all-local: $(the_lib).config Monodoc.Ecma/EcmaUrlParser.cs
-
-test-local: setup-doc-sources
-
-dist-local: Monodoc.Ecma/EcmaUrlParser.cs
-
-$(the_lib).config: Makefile monodoc.dll.config.in
+$(the_lib).config: monodoc.dll.config.in
sed 's,@monodoc_refdir@,$(mono_libdir)/monodoc,g' monodoc.dll.config.in > $@
-Monodoc.Ecma/EcmaUrlParser.cs: Monodoc.Ecma/EcmaUrlParser.jay $(topdir)/jay/skeleton.cs jay.sh
- $(topdir)/$(thisdir)/jay.sh $(topdir) $< $@ $(JAY_FLAGS)
-
-parser.exe: Monodoc.Ecma/EcmaUrlParser.cs Monodoc.Ecma/EcmaUrlTokenizer.cs Monodoc.Ecma/EcmaUrlParserDriver.cs Monodoc.Ecma/EcmaDesc.cs
- mcs /out:$@ /debug $^
-
-setup-doc-sources: $(DOC_SOURCES)
- mkdir -p ./Test/monodoc_test/sources/
- cp $(DOC_SOURCES) ./Test/monodoc_test/sources/
diff --git a/mcs/class/monodoc/Mono.Documentation/ManifestResourceResolver.cs b/mcs/class/monodoc/Mono.Documentation/ManifestResourceResolver.cs
deleted file mode 100644
index 402d137e06f..00000000000
--- a/mcs/class/monodoc/Mono.Documentation/ManifestResourceResolver.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using System;
-using System.IO;
-using System.Reflection;
-using System.Xml;
-
-namespace Mono.Documentation {
- public class ManifestResourceResolver : XmlUrlResolver {
- private string[] dirs;
-
- public ManifestResourceResolver (params string[] dirs)
- {
- this.dirs = (string[]) dirs.Clone ();
- }
-
- public override Uri ResolveUri (Uri baseUri, string relativeUri)
- {
- if (Array.IndexOf (
- Assembly.GetExecutingAssembly ().GetManifestResourceNames (),
- relativeUri) >= 0)
- return new Uri ("x-resource:///" + relativeUri);
- foreach (var dir in dirs) {
- if (File.Exists (Path.Combine (dir, relativeUri)))
- return base.ResolveUri (new Uri ("file://" + new DirectoryInfo (dir).FullName + "/"),
- relativeUri);
- }
- return base.ResolveUri (baseUri, relativeUri);
- }
-
- public override object GetEntity (Uri absoluteUri, string role, Type ofObjectToReturn)
- {
- if (ofObjectToReturn == null)
- ofObjectToReturn = typeof(Stream);
- if (ofObjectToReturn != typeof(Stream))
- throw new XmlException ("This object type is not supported.");
- if (absoluteUri.Scheme != "x-resource")
- return base.GetEntity (absoluteUri, role, ofObjectToReturn);
- return Assembly.GetExecutingAssembly().GetManifestResourceStream (
- absoluteUri.Segments [1]);
- }
- }
-}
-
diff --git a/mcs/class/monodoc/Mono.Documentation/XmlDocUtils.cs b/mcs/class/monodoc/Mono.Documentation/XmlDocUtils.cs
deleted file mode 100644
index 2f4cd08f11a..00000000000
--- a/mcs/class/monodoc/Mono.Documentation/XmlDocUtils.cs
+++ /dev/null
@@ -1,200 +0,0 @@
-using System;
-using System.Collections;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Web;
-using System.Xml;
-
-namespace Mono.Documentation {
-
- public delegate XmlDocument DocLoader (string escapedTypeName);
-
- public static class XmlDocUtils
- {
- public static XmlNodeList GetMemberGenericParameters (XmlNode member)
- {
- return member.SelectNodes ("Docs/typeparam");
- }
-
- public static XmlNodeList GetTypeGenericParameters (XmlNode member)
- {
- return member.SelectNodes ("/Type/TypeParameters/TypeParameter");
- }
-
- public static string ToTypeName (string type, XmlNode member)
- {
- return ToTypeName (type, GetTypeGenericParameters (member),
- GetMemberGenericParameters (member));
- }
-
- public static string ToTypeName (string type, XmlNodeList typeGenParams, XmlNodeList memberGenParams)
- {
- type = type.Replace ("&", "@").Replace ("<", "{").Replace (">", "}");
- for (int i = 0; i < typeGenParams.Count; ++i) {
- string name = typeGenParams [i].InnerText;
- type = Regex.Replace (type, @"\b" + name + @"\b", "`" + i);
- }
- for (int i = 0; i < memberGenParams.Count; ++i) {
- string name = memberGenParams [i].Attributes ["name"].Value;
- type = Regex.Replace (type, @"\b" + name + @"\b", "``" + i);
- }
- return type;
- }
-
- public static string ToEscapedTypeName (string name)
- {
- return GetCountedName (name, "`");
- }
-
- private static string GetCountedName (string name, string escape)
- {
- int lt = name.IndexOf ("<");
- if (lt == -1)
- return name;
- StringBuilder type = new StringBuilder (name.Length);
- int start = 0;
- do {
- type.Append (name.Substring (start, lt - start));
- type.Append (escape);
- type.Append (GetGenericCount (name, lt, out start));
- } while ((lt = name.IndexOf ('<', start)) >= 0);
- if (start < name.Length)
- type.Append (name.Substring (start));
- return type.ToString ().Replace ("+", ".");
- }
-
- private static int GetGenericCount (string name, int start, out int end)
- {
- int n = 1;
- bool r = true;
- int i = start;
- int depth = 1;
- for ( ++i; r && i < name.Length; ++i) {
- switch (name [i]) {
- case ',': if (depth == 1) ++n; break;
- case '<': ++depth; break;
- case '>': --depth; if (depth == 0) r = false; break;
- }
- }
- end = i;
- return n;
- }
-
- public static string ToEscapedMemberName (string member)
- {
- // Explicitly implemented interface members contain '.'s in the member
- // name, e.g. System.Collections.Generic.IEnumerable<A>.GetEnumerator.
- // CSC does a s/\./#/g for these.
- member = member.Replace (".", "#");
- if (member [member.Length-1] == '>') {
- int i = member.LastIndexOf ("<");
- int ignore;
- return member.Substring (0, i).Replace ("<", "{").Replace (">", "}") +
- "``" + GetGenericCount (member, i, out ignore);
- }
- return member.Replace ("<", "{").Replace (">", "}");
- }
-
- public static void AddExtensionMethods (XmlDocument typexml, ArrayList/*<XmlNode>*/ extensions, DocLoader loader)
- {
- // if no members (enum, delegate) don't add extensions
- XmlNode m = typexml.SelectSingleNode ("/Type/Members");
- if (m == null)
- return;
-
- // static classes can't be targets:
- if (typexml.SelectSingleNode (
- "/Type/TypeSignature[@Language='C#']/@Value")
- .Value.IndexOf (" static ") >= 0)
- return;
-
- foreach (string s in GetSupportedTypes (typexml, loader)) {
- foreach (XmlNode extension in extensions) {
- bool add = false;
- foreach (XmlNode target in extension.SelectNodes ("Targets/Target")) {
- if (target.Attributes ["Type"].Value == s) {
- add = true;
- break;
- }
- }
- if (!add) {
- continue;
- }
- foreach (XmlNode c in extension.SelectNodes ("Member")) {
- XmlNode cm = typexml.ImportNode (c, true);
- m.AppendChild (cm);
- }
- }
- }
- }
-
- private static IEnumerable GetSupportedTypes (XmlDocument type, DocLoader loader)
- {
- yield return "System.Object";
- yield return GetEscapedPath (type, "Type/@FullName");
-
- Hashtable h = new Hashtable ();
- GetInterfaces (h, type, loader);
-
- string s = GetEscapedPath (type, "Type/Base/BaseTypeName");
- if (s != null) {
- yield return s;
- XmlDocument d;
- string p = s;
- while (s != null && (d = loader (s)) != null) {
- GetInterfaces (h, d, loader);
- s = GetEscapedPath (d, "Type/Base/BaseTypeName");
- if (p == s)
- break;
- yield return s;
- }
- }
-
- foreach (object o in h.Keys)
- yield return o.ToString ();
- }
-
- private static string GetEscapedPath (XmlDocument d, string path)
- {
- XmlNode n = d.SelectSingleNode (path);
- if (n == null)
- return null;
- return "T:" + ToEscapedTypeName (n.InnerText);
- }
-
- private static void GetInterfaces (Hashtable ifaces, XmlDocument doc, DocLoader loader)
- {
- foreach (XmlNode n in doc.SelectNodes ("Type/Interfaces/Interface/InterfaceName")) {
- string t = ToEscapedTypeName (n.InnerText);
- string tk = "T:" + t;
- if (!ifaces.ContainsKey (tk)) {
- ifaces.Add (tk, null);
- try {
- XmlDocument d = loader (t);
- if (d != null)
- GetInterfaces (ifaces, d, loader);
- }
- catch (FileNotFoundException e) {
- // ignore; interface documentation couldn't be found.
- }
- }
- }
- }
-
- // Turns e.g. sources/netdocs into sources/cache/netdocs
- public static string GetCacheDirectory (string assembledBase)
- {
- return Path.Combine (
- Path.Combine (Path.GetDirectoryName (assembledBase), "cache"),
- Path.GetFileName (assembledBase));
- }
-
- public static string GetCachedFileName (string cacheDir, string url)
- {
- return Path.Combine (cacheDir,
- Uri.EscapeUriString (url).Replace ('/', '+').Replace ("*", "%2a"));
- }
- }
-}
-
diff --git a/mcs/class/monodoc/Mono.Utilities/LRUCache.cs b/mcs/class/monodoc/Mono.Utilities/LRUCache.cs
deleted file mode 100644
index e479a9621ad..00000000000
--- a/mcs/class/monodoc/Mono.Utilities/LRUCache.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Collections.Generic;
-
-namespace Mono.Utilities
-{
- public class LRUCache<TKey, TValue>
- {
- [ThreadStatic]
- static LRUCache<TKey, TValue> deflt;
-
- public static LRUCache<TKey, TValue> Default {
- get {
- return deflt != null ? deflt : (deflt = new LRUCache<TKey, TValue> (5));
- }
- }
-
- int capacity;
- LinkedList<ListValueEntry<TKey, TValue>> list;
- Dictionary<TKey, LinkedListNode<ListValueEntry<TKey, TValue>>> lookup;
- LinkedListNode<ListValueEntry<TKey, TValue>> openNode;
-
- public LRUCache (int capacity)
- {
- this.capacity = capacity;
- this.list = new LinkedList<ListValueEntry<TKey, TValue>>();
- this.lookup = new Dictionary<TKey, LinkedListNode<ListValueEntry<TKey, TValue>>> (capacity + 1);
- this.openNode = new LinkedListNode<ListValueEntry<TKey, TValue>>(new ListValueEntry<TKey, TValue> (default(TKey), default(TValue)));
- }
-
- public void Put (TKey key, TValue value)
- {
- if (Get(key) == null) {
- this.openNode.Value.ItemKey = key;
- this.openNode.Value.ItemValue = value;
- this.list.AddFirst (this.openNode);
- this.lookup.Add (key, this.openNode);
-
- if (this.list.Count > this.capacity) {
- // last node is to be removed and saved for the next addition to the cache
- this.openNode = this.list.Last;
-
- // remove from list & dictionary
- this.list.RemoveLast();
- this.lookup.Remove(this.openNode.Value.ItemKey);
- } else {
- // still filling the cache, create a new open node for the next time
- this.openNode = new LinkedListNode<ListValueEntry<TKey, TValue>>(new ListValueEntry<TKey, TValue>(default(TKey), default(TValue)));
- }
- }
- }
-
- public TValue Get (TKey key)
- {
- LinkedListNode<ListValueEntry<TKey, TValue>> node = null;
- if (!this.lookup.TryGetValue (key, out node))
- return default (TValue);
- this.list.Remove (node);
- this.list.AddFirst (node);
- return node.Value.ItemValue;
- }
-
- class ListValueEntry<K, V> where K : TKey
- where V : TValue
- {
- internal V ItemValue;
- internal K ItemKey;
-
- internal ListValueEntry(K key, V value)
- {
- this.ItemKey = key;
- this.ItemValue = value;
- }
- }
- }
-}
diff --git a/mcs/class/monodoc/Mono.Utilities/MemoryLRU.cs b/mcs/class/monodoc/Mono.Utilities/MemoryLRU.cs
deleted file mode 100644
index 8b7486149d8..00000000000
--- a/mcs/class/monodoc/Mono.Utilities/MemoryLRU.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Collections.Generic;
-
-namespace Mono.Utilities
-{
- public class LRUCache<TKey, TValue>
- {
- [ThreadStatic]
- static LRUCache<TKey, TValue> deflt;
-
- public static LRUCache<TKey, TValue> Default {
- get {
- return deflt != null ? deflt : (deflt = new LRUCache<TKey, TValue> (5));
- }
- }
-
- int capacity;
- LinkedList<ListValueEntry<TKey, TValue>> list;
- Dictionary<TKey, LinkedListNode<ListValueEntry<TKey, TValue>>> lookup;
- LinkedListNode<ListValueEntry<TKey, TValue>> openNode;
-
- public LRUCache (int capacity)
- {
- this.capacity = capacity;
- this.list = new LinkedList<ListValueEntry<TKey, TValue>>();
- this.lookup = new Dictionary<TKey, LinkedListNode<ListValueEntry<TKey, TValue>>> (capacity + 1);
- this.openNode = new LinkedListNode<ListValueEntry<TKey, TValue>>(new ListValueEntry<TKey, TValue> (default(TKey), default(TValue)));
- }
-
- public void Put (TKey key, TValue value)
- {
- if (Get(key) == null) {
- this.openNode.Value.Itemkey = key;
- this.openNode.Value.Itemvalue = value;
- this.list.AddFirst (this.openNode);
- this.lookup.Add (key, this.openNode);
-
- if (this.list.Count > this.capacity) {
- // last node is to be removed and saved for the next addition to the cache
- this.openNode = this.list.Last;
-
- // remove from list & dictionary
- this.list.RemoveLast();
- this.lookup.Remove(this.openNode.Value.Itemkey);
- } else {
- // still filling the cache, create a new open node for the next time
- this.openNode = new LinkedListNode<ListValueEntry<Tkey, Tvalue>>(new ListValueEntry<Tkey, Tvalue>(default(Tkey), default(Tvalue)));
- }
- }
- }
-
- public TValue Get (TKey key)
- {
- LinkedListNode<ListValueEntry<TKey, TValue>> node = null;
- if (!this.lookup.TryGetValue (key, out node))
- return default (TValue);
- this.list.Remove (node);
- this.list.AddFirst (node);
- return node.Value.ItemValue;
- }
-
- class ListValueEntry<K, V> where K : TKey
- where V : TValue
- {
- internal V ItemValue;
- internal K ItemKey;
-
- internal ListValueEntry(K key, V value)
- {
- this.ItemKey = key;
- this.ItemValue = value;
- }
- }
- }
-}
diff --git a/mcs/class/monodoc/Mono.Utilities/colorizer.cs b/mcs/class/monodoc/Mono.Utilities/colorizer.cs
deleted file mode 100644
index 74446241920..00000000000
--- a/mcs/class/monodoc/Mono.Utilities/colorizer.cs
+++ /dev/null
@@ -1,171 +0,0 @@
-using System;
-using System.Text.RegularExpressions;
-using System.Collections;
-
-namespace Mono.Utilities {
- public class Colorizer {
- //
- // Syntax coloring
- //
-
- static string keywords_cs =
- "(\\babstract\\b|\\bevent\\b|\\bnew\\b|\\bstruct\\b|\\bas\\b|\\bexplicit\\b|\\bnull\\b|\\bswitch\\b|\\bbase\\b|\\bextern\\b|"
- +
- "\\bobject\\b|\\bthis\\b|\\bbool\\b|\\bfalse\\b|\\boperator\\b|\\bthrow\\b|\\bbreak\\b|\\bfinally\\b|\\bout\\b|\\btrue\\b|"
- +
- "\\bbyte\\b|\\bfixed\\b|\\boverride\\b|\\btry\\b|\\bcase\\b|\\bfloat\\b|\\bparams\\b|\\btypeof\\b|\\bcatch\\b|\\bfor\\b|"
- +
- "\\bprivate\\b|\\buint\\b|\\bchar\\b|\\bforeach\\b|\\bprotected\\b|\\bulong\\b|\\bchecked\\b|\\bgoto\\b|\\bpublic\\b|"
- +
- "\\bunchecked\\b|\\bclass\\b|\\bif\\b|\\breadonly\\b|\\bunsafe\\b|\\bconst\\b|\\bimplicit\\b|\\bref\\b|\\bushort\\b|"
- +
- "\\bcontinue\\b|\\bin\\b|\\breturn\\b|\\busing\\b|\\bdecimal\\b|\\bint\\b|\\bsbyte\\b|\\bvirtual\\b|\\bdefault\\b|"
- +
- "\\binterface\\b|\\bsealed\\b|\\bvolatile\\b|\\bdelegate\\b|\\binternal\\b|\\bshort\\b|\\bvoid\\b|\\bdo\\b|\\bis\\b|"
- +
- "\\bsizeof\\b|\\bwhile\\b|\\bdouble\\b|\\block\\b|\\bstackalloc\\b|\\belse\\b|\\blong\\b|\\bstatic\\b|\\benum\\b|"
- + "\\bnamespace\\b|\\bstring\\b)";
-
-#if false
-// currently not in use
- static string keywords_vb =
- "(\\bAddHandler\\b|\\bAddressOf\\b|\\bAlias\\b|\\bAnd\\b|\\bAndAlso\\b|\\bAnsi\\b|\\bAs\\b|\\bAssembly\\b|"
- +
- "\\bAuto\\b|\\bBoolean\\b|\\bByRef\\b|\\bByte\\b|\\bByVal\\b|\\bCall\\b|\\bCase\\b|\\bCatch\\b|"
- +
- "\\bCBool\\b|\\bCByte\\b|\\bCChar\\b|\\bCDate\\b|\\bCDec\\b|\\bCDbl\\b|\\bChar\\b|\\bCInt\\b|"
- +
- "\\bClass\\b|\\bCLng\\b|\\bCObj\\b|\\bConst\\b|\\bCShort\\b|\\bCSng\\b|\\bCStr\\b|\\bCType\\b|"
- +
- "\\bDate\\b|\\bDecimal\\b|\\bDeclare\\b|\\bDefault\\b|\\bDelegate\\b|\\bDim\\b|\\bDirectCast\\b|\\bDo\\b|"
- +
- "\\bDouble\\b|\\bEach\\b|\\bElse\\b|\\bElseIf\\b|\\bEnd\\b|\\bEnum\\b|\\bErase\\b|\\bError\\b|"
- +
- "\\bEvent\\b|\\bExit\\b|\\bFalse\\b|\\bFinally\\b|\\bFor\\b|\\bFriend\\b|\\bFunction\\b|\\bGet\\b|"
- +
- "\\bGetType\\b|\\bGoSub\\b|\\bGoTo\\b|\\bHandles\\b|\\bIf\\b|\\bImplements\\b|\\bImports\\b|\\bIn\\b|"
- +
- "\\bInherits\\b|\\bInteger\\b|\\bInterface\\b|\\bIs\\b|\\bLet\\b|\\bLib\\b|\\bLike\\b|\\bLong\\b|"
- +
- "\\bLoop\\b|\\bMe\\b|\\bMod\\b|\\bModule\\b|\\bMustInherit\\b|\\bMustOverride\\b|\\bMyBase\\b|\\bMyClass\\b|"
- +
- "\\bNamespace\\b|\\bNew\\b|\\bNext\\b|\\bNot\\b|\\bNothing\\b|\\bNotInheritable\\b|\\bNotOverridable\\b|\\bObject\\b|"
- +
- "\\bOn\\b|\\bOption\\b|\\bOptional\\b|\\bOr\\b|\\bOrElse\\b|\\bOverloads\\b|\\bOverridable\\b|\\bOverrides\\b|"
- +
- "\\bParamArray\\b|\\bPreserve\\b|\\bPrivate\\b|\\bProperty\\b|\\bProtected\\b|\\bPublic\\b|\\bRaiseEvent\\b|\\bReadOnly\\b|"
- +
- "\\bReDim\\b|\\bREM\\b|\\bRemoveHandler\\b|\\bResume\\b|\\bReturn\\b|\\bSelect\\b|\\bSet\\b|\\bShadows\\b|"
- +
- "\\bShared\\b|\\bShort\\b|\\bSingle\\b|\\bStatic\\b|\\bStep\\b|\\bStop\\b|\\bString\\b|\\bStructure\\b|"
- +
- "\\bSub\\b|\\bSyncLock\\b|\\bThen\\b|\\bThrow\\b|\\bTo\\b|\\bTrue\\b|\\bTry\\b|\\bTypeOf\\b|"
- +
- "\\bUnicode\\b|\\bUntil\\b|\\bVariant\\b|\\bWhen\\b|\\bWhile\\b|\\bWith\\b|\\bWithEvents\\b|\\bWriteOnly\\b|\\bXor\\b)";
-#endif
-
- public static string Colorize(string text, string lang)
- {
- lang = lang.Trim().ToLower();
- switch (lang) {
- case "xml":
- return ColorizeXml(text);
- case "cs": case "c#": case "csharp":
- return ColorizeCs(text);
- case "vb":
- return ColorizeVb(text);
- }
- return Escape (text);
- }
-
- static string ColorizeXml(string text)
- {
- // Order is highly important.
-
- // s/ /&nbsp;/g must be first, as later substitutions add required spaces
- text = text.Replace(" ", "&nbsp;");
-
- // Find & mark XML elements
- Regex re = new Regex("<\\s*(\\/?)\\s*([\\s\\S]*?)\\s*(\\/?)\\s*>");
- text = re.Replace(text, "{blue:&lt;$1}{maroon:$2}{blue:$3&gt;}");
-
- // Colorize attribute strings; must be done before colorizing marked XML
- // elements so that we don't clobber the colorized XML tags.
- re = new Regex ("([\"'])(.*?)\\1");
- text = re.Replace (text,
- "$1<font color=\"purple\">$2</font>$1");
-
- // Colorize marked XML elements
- re = new Regex("\\{(\\w*):([\\s\\S]*?)\\}");
- //text = re.Replace(text, "<span style='color:$1'>$2</span>");
- text = re.Replace(text, "<font color=\"$1\">$2</font>");
-
- // Standard Structure
- text = text.Replace("\t", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
- re = new Regex("\r\n|\r|\n");
- text = re.Replace(text, "<br/>");
-
- return text;
- }
-
- static string ColorizeCs(string text)
- {
- text = text.Replace(" ", "&nbsp;");
-
- text = text.Replace("<", "&lt;");
- text = text.Replace(">", "&gt;");
-
- Regex re = new Regex("\"((((?!\").)|\\\")*?)\"");
-
- text =
- re.Replace(text,
- "<font color=\"purple\">\"$1\"</font>");
- //"<span style='color:purple'>\"$1\"</span>");
-
- re = new
- Regex
- ("//(((.(?!\"</font>))|\"(((?!\").)*)\"</font>)*)(\r|\n|\r\n)");
- //("//(((.(?!\"</span>))|\"(((?!\").)*)\"</span>)*)(\r|\n|\r\n)");
- text =
- re.Replace(text,
- "<font color=\"green\">//$1</font><br/>");
- // "<span style='color:green'>//$1</span><br/>");
-
- re = new Regex(keywords_cs);
- text = re.Replace(text, "<font color=\"blue\">$1</font>");
- //text = re.Replace(text, "<span style='color:blue'>$1</span>");
-
- text = text.Replace("\t", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
- text = text.Replace("\n", "<br/>");
-
- return text;
- }
-
- static string ColorizeVb(string text) {
- text = text.Replace(" ", "&nbsp;");
-
- /* Regex re = new Regex ("\"((((?!\").)|\\\")*?)\"");
- text = re.Replace (text,"<span style='color:purple'>\"$1\"</span>");
-
- re = new Regex ("'(((.(?!\"\\<\\/span\\>))|\"(((?!\").)*)\"\\<\\/span\\>)*)(\r|\n|\r\n)");
- text = re.Replace (text,"<span style='color:green'>//$1</span><br/>");
-
- re = new Regex (keywords_vb);
- text = re.Replace (text,"<span style='color:blue'>$1</span>");
- */
- text = text.Replace("\t", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
- text = text.Replace("\n", "<br/>");
- return text;
- }
-
- static string Escape(string text)
- {
- text = text.Replace("&", "&amp;");
- text = text.Replace(" ", "&nbsp;");
- text = text.Replace("<", "&lt;");
- text = text.Replace(">", "&gt;");
- text = text.Replace("\n", "<br/>");
- return text;
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc.Ecma/.gitignore b/mcs/class/monodoc/Monodoc.Ecma/.gitignore
deleted file mode 100644
index d698948fcab..00000000000
--- a/mcs/class/monodoc/Monodoc.Ecma/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/EcmaUrlParser.cs
diff --git a/mcs/class/monodoc/Monodoc.Ecma/EcmaDesc.cs b/mcs/class/monodoc/Monodoc.Ecma/EcmaDesc.cs
deleted file mode 100644
index 2f46c6cc0fd..00000000000
--- a/mcs/class/monodoc/Monodoc.Ecma/EcmaDesc.cs
+++ /dev/null
@@ -1,419 +0,0 @@
-using System;
-using System.Linq;
-using System.Text;
-using System.Collections.Generic;
-
-namespace Monodoc.Ecma
-{
- /* Some properties might not be filled/meaningful depending on kind
- * like a namespace EcmaUrl won't have a valid TypeName
- */
- public class EcmaDesc : IEquatable<EcmaDesc>
- {
- public enum Kind
- {
- Type,
- Constructor,
- Method,
- Namespace,
- Field,
- Property,
- Event,
- Operator
- }
-
- public enum Mod
- {
- Normal,
- Pointer,
- Ref,
- Out
- }
-
- public enum Format
- {
- WithArgs,
- WithoutArgs
- }
-
- public Kind DescKind {
- get;
- set;
- }
-
- public Mod DescModifier {
- get;
- set;
- }
-
- public string Namespace {
- get;
- set;
- }
-
- public string TypeName {
- get;
- set;
- }
-
- public string MemberName {
- get;
- set;
- }
-
- public EcmaDesc NestedType {
- get;
- set;
- }
-
- /* A list of the array dimensions attached to this type.
- * The list count corresponds to the number of recursive
- * array definition (jagged arrays) the value of the
- * corresponding list item is the number of dimension
- * attached to that array definition instance
- */
- public IList<int> ArrayDimensions {
- get;
- set;
- }
-
- /* Depending on the form of the url, we might not have the type
- * of the argument but only how many the type/member has i.e.
- * when such number is specified with a backtick
- */
- public IList<EcmaDesc> GenericTypeArguments {
- get;
- set;
- }
-
- /* The GenericTypeArguments list may be null, in which case, this
- * is an easier/safer way to check the count.
- */
- public int GenericTypeArgumentsCount {
- get { return GenericTypeArguments != null ? GenericTypeArguments.Count : 0; }
- }
-
- /* This property tells if the above collections only correct value
- * is the number of item in it to represent generic arguments
- */
- public bool GenericTypeArgumentsIsNumeric {
- get {
- return GenericTypeArguments != null && GenericTypeArguments.FirstOrDefault () == null;
- }
- }
-
- public IList<EcmaDesc> GenericMemberArguments {
- get;
- set;
- }
-
- /* The GenericMemberArguments list may be null, in which case, this
- * is an easier/safer way to check the count.
- */
- public int GenericMemberArgumentsCount {
- get { return GenericMemberArguments != null ? GenericMemberArguments.Count : 0; }
- }
-
- public bool GenericMemberArgumentsIsNumeric {
- get {
- return GenericMemberArguments != null && GenericMemberArguments.FirstOrDefault () == null;
- }
- }
-
- public IList<EcmaDesc> MemberArguments {
- get;
- set;
- }
-
- /* The GenericTypeArguments list may be null, in which case, this
- * is an easier/safer way to check the count.
- */
- public int MemberArgumentsCount {
- get { return MemberArguments != null ? MemberArguments.Count : 0; }
- }
-
- /* This indicates that we actually want an inner part of the ecmadesc
- * i.e. in case of T: we could want the members (*), ctor (C), methods (M), ...
- */
- public char Etc {
- get;
- set;
- }
-
- public bool IsEtc {
- get {
- return Etc != (char)0;
- }
- }
-
- /* EtcFilter is only valid in some case of IsEtc when the inner part needs
- * to be further filtered e.g. in case we want a listing of the type overloads
- * Equals
- */
- public string EtcFilter {
- get;
- set;
- }
-
- /* When a member is an explicit implementation of an interface member, we register
- * the member EcmaDesc with its interface parent here
- */
- public EcmaDesc ExplicitImplMember {
- get;
- set;
- }
-
- // Returns the TypeName and the generic/inner type information if existing
- public string ToCompleteTypeName (char innerTypeSeparator = '.')
- {
- var result = TypeName;
- if (GenericTypeArguments != null)
- result += FormatGenericArgs (GenericTypeArguments);
- if (NestedType != null)
- result += innerTypeSeparator + NestedType.ToCompleteTypeName ();
- if (ArrayDimensions != null && ArrayDimensions.Count > 0)
- result += ArrayDimensions.Select (dim => "[" + new string (',', dim - 1) + "]").Aggregate (string.Concat);
-
- return result;
- }
-
- // Returns the member name with its generic types if existing
- public string ToCompleteMemberName (Format format)
- {
- /* We special process two cases:
- * - Explicit member implementation which append a full type specification
- * - Conversion operator which are exposed as normal method but have specific captioning in the end
- */
- if (ExplicitImplMember != null) {
- var impl = ExplicitImplMember;
- return impl.FormattedNamespace + impl.ToCompleteTypeName () + "." + impl.ToCompleteMemberName (format);
- } else if (format == Format.WithArgs && DescKind == Kind.Operator && MemberName.EndsWith ("Conversion")) {
- var type1 = MemberArguments[0].FormattedNamespace + MemberArguments[0].ToCompleteTypeName () + ModToString (MemberArguments[0]);
- var type2 = MemberArguments[1].FormattedNamespace + MemberArguments[1].ToCompleteTypeName () + ModToString (MemberArguments[1]);
- return type1 + " to " + type2;
- }
-
- var result = IsEtc && !string.IsNullOrEmpty (EtcFilter) ? EtcFilter : MemberName;
-
- // Temporary hack for monodoc produced inner type ctor
- //if (DescKind == Kind.Constructor && NestedType != null)
- //result = ToCompleteTypeName ();
-
- if (GenericMemberArguments != null)
- result += FormatGenericArgs (GenericMemberArguments);
-
- if (format == Format.WithArgs) {
- result += '(';
- if (MemberArguments != null && MemberArguments.Count > 0) {
- var args = MemberArguments.Select (a => FormatNamespace (a) + a.ToCompleteTypeName ('+') + ModToString (a));
- result += string.Join (",", args);
- }
- result += ')';
- }
-
- return result;
- }
-
- public string ToEcmaCref ()
- {
- var sb = new StringBuilder ();
- // Cref type
- sb.Append (DescKind.ToString ()[0]);
- sb.Append (":");
- // Create the rest
- ConstructCRef (sb);
-
- return sb.ToString ();
- }
-
- void ConstructCRef (StringBuilder sb, bool skipLeadingDot = false)
- {
- if (string.IsNullOrEmpty (Namespace))
- skipLeadingDot = true;
-
- sb.Append (Namespace);
- if (DescKind == Kind.Namespace)
- return;
-
- if (!skipLeadingDot)
- sb.Append ('.');
-
- sb.Append (TypeName);
- AppendGenericArguments (sb, GenericTypeArguments, GenericTypeArgumentsIsNumeric, GenericTypeArgumentsCount);
-
- if (NestedType != null) {
- sb.Append ('+');
- NestedType.ConstructCRef (sb, skipLeadingDot: true);
- }
- if (ArrayDimensions != null && ArrayDimensions.Count > 0) {
- for (int i = 0; i < ArrayDimensions.Count; i++) {
- sb.Append ('[');
- sb.Append (new string (',', ArrayDimensions[i] - 1));
- sb.Append (']');
- }
- }
- if (DescKind == Kind.Type)
- return;
-
- if (ExplicitImplMember != null) {
- sb.Append ('$');
- ExplicitImplMember.DescKind = this.DescKind;
- ExplicitImplMember.ConstructCRef (sb, skipLeadingDot: false);
- return;
- }
-
- sb.Append (".");
- sb.Append (MemberName);
-
- AppendGenericArguments (sb, GenericMemberArguments, GenericMemberArgumentsIsNumeric, GenericMemberArgumentsCount);
-
- if (MemberArguments != null && MemberArgumentsCount > 0) {
- sb.Append ("(");
- int i=0;
- foreach (var a in MemberArguments) {
- if (i > 0) {
- sb.Append(",");
- }
- a.ConstructCRef (sb);
- i++;
- }
- sb.Append (")");
- }
- }
-
- void AppendGenericArguments (StringBuilder sb, IEnumerable<EcmaDesc> arguments, bool isNumeric, int argumentsCount)
- {
- if (arguments != null && isNumeric) {
- sb.AppendFormat ("`{0}", argumentsCount);
- } else if (arguments != null) {
- sb.Append ('<');
- int i=0;
- foreach (var t in arguments) {
- if (i > 0) {
- sb.Append (",");
- }
- t.ConstructCRef (sb);
-
- i++;
- }
- sb.Append ('>');
- }
- }
-
- public override string ToString ()
- {
- return string.Format ("({8}) {0}::{1}{2}{3}{7} {4}{5}{6} {9} {10}",
- Namespace,
- TypeName,
- FormatGenericArgsFull (GenericTypeArguments),
- NestedType != null ? "+" + NestedType.ToString () : string.Empty,
- MemberName ?? string.Empty,
- FormatGenericArgsFull (GenericMemberArguments),
- MemberArguments != null ? "(" + string.Join (",", MemberArguments.Select (m => m.ToString ())) + ")" : string.Empty,
- ArrayDimensions != null && ArrayDimensions.Count > 0 ? ArrayDimensions.Select (dim => "[" + new string (',', dim - 1) + "]").Aggregate (string.Concat) : string.Empty,
- DescKind.ToString ()[0],
- Etc != 0 ? '(' + Etc.ToString () + ')' : string.Empty,
- ExplicitImplMember != null ? "$" + ExplicitImplMember.ToString () : string.Empty);
-
- }
-
- public override bool Equals (object other)
- {
- var otherDesc = other as EcmaDesc;
- return otherDesc != null && Equals (otherDesc);
- }
-
- public bool Equals (EcmaDesc other)
- {
- if (other == null)
- return false;
-
- if (NestedType == null ^ other.NestedType == null
- || ArrayDimensions == null ^ other.ArrayDimensions == null
- || GenericTypeArguments == null ^ other.GenericTypeArguments == null
- || GenericMemberArguments == null ^ other.GenericMemberArguments == null
- || MemberArguments == null ^ other.MemberArguments == null
- || ExplicitImplMember == null ^ other.ExplicitImplMember == null)
- return false;
-
- return other != null
- && DescKind == other.DescKind
- && TypeName == other.TypeName
- && Namespace == other.Namespace
- && MemberName == other.MemberName
- && (NestedType == null || NestedType.Equals (other.NestedType))
- && (ArrayDimensions == null || ArrayDimensions.SequenceEqual (other.ArrayDimensions))
- && (GenericTypeArguments == null || GenericTypeArguments.SequenceEqual (other.GenericTypeArguments))
- && (GenericMemberArguments == null || GenericMemberArguments.SequenceEqual (other.GenericMemberArguments))
- && (MemberArguments == null || MemberArguments.SequenceEqual (other.MemberArguments))
- && Etc == other.Etc
- && EtcFilter == other.EtcFilter
- && (ExplicitImplMember == null || ExplicitImplMember.Equals (other.ExplicitImplMember));
- }
-
- public override int GetHashCode ()
- {
- return DescKind.GetHashCode ()
- ^ TypeName.GetHashCode ()
- ^ Namespace.GetHashCode ()
- ^ MemberName.GetHashCode ();
- }
-
- bool What (bool input)
- {
- if (!input)
- throw new Exception ("Not equal");
- return input;
- }
-
- bool WhatT (bool input)
- {
- if (input)
- throw new Exception ("Not equal");
- return input;
- }
-
- string FormatNamespace (EcmaDesc desc)
- {
- return string.IsNullOrEmpty (desc.Namespace) ? string.Empty : desc.Namespace + ".";
- }
-
- string FormatGenericArgs (IEnumerable<EcmaDesc> args)
- {
- if (args == null || !args.Any ())
- return string.Empty;
- // If we only have the number of generic arguments, use ` notation
- if (args.First () == null)
- return "`" + args.Count ();
-
- IEnumerable<string> argsList = args.Select (t => FormatNamespace (t) + t.ToCompleteTypeName ());
-
- return "<" + string.Join (",", argsList) + ">";
- }
-
- string FormatGenericArgsFull (IEnumerable<EcmaDesc> genericArgs)
- {
- return genericArgs != null ? "<" + string.Join (",", genericArgs.Select (t => t.ToString ())) + ">" : string.Empty;
- }
-
- string ModToString (EcmaDesc desc)
- {
- switch (desc.DescModifier) {
- case Mod.Pointer:
- return "*";
- case Mod.Ref:
- return "&";
- case Mod.Out:
- return "@";
- default:
- return string.Empty;
- }
- }
-
- string FormattedNamespace {
- get {
- return !string.IsNullOrEmpty (Namespace) ? Namespace + "." : string.Empty;
- }
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc.Ecma/EcmaUrlParser.jay b/mcs/class/monodoc/Monodoc.Ecma/EcmaUrlParser.jay
deleted file mode 100644
index 0dafab39701..00000000000
--- a/mcs/class/monodoc/Monodoc.Ecma/EcmaUrlParser.jay
+++ /dev/null
@@ -1,263 +0,0 @@
-%{
-using System.Text;
-using System.IO;
-using System;
-using System.Linq;
-using System.Collections.Generic;
-
-namespace Monodoc.Ecma
-{
- public class EcmaUrlParser
- {
- int yacc_verbose_flag = 0;
-
- public void IsValid (string input)
- {
- var lexer = new EcmaUrlTokenizer (input);
- this.yyparse (lexer);
- }
-
- public EcmaDesc Parse (string input)
- {
- var lexer = new EcmaUrlTokenizer (input);
- return (EcmaDesc)this.yyparse (lexer);
- }
-
- public bool TryParse (string input, out EcmaDesc desc)
- {
- desc = null;
- try {
- desc = Parse (input);
- } catch {
- return false;
- }
- return true;
- }
-
- EcmaDesc SetEcmaDescType (object result, EcmaDesc.Kind kind)
- {
- var desc = result as EcmaDesc;
- desc.DescKind = kind;
- return desc;
- }
-
- List<T> SafeReverse<T> (List<T> input)
- {
- if (input == null)
- return null;
- input.Reverse ();
- return input;
- }
-%}
-
-%token ERROR
-%token IDENTIFIER
-%token DIGIT
-%token DOT
-%token COMMA
-%token COLON
-%token INNER_TYPE_SEPARATOR
-%token OP_GENERICS_LT
-%token OP_GENERICS_GT
-%token OP_GENERICS_BACKTICK
-%token OP_OPEN_PAREN
-%token OP_CLOSE_PAREN
-%token OP_ARRAY_OPEN
-%token OP_ARRAY_CLOSE
-%token SLASH_SEPARATOR
-%token STAR
-%token REF_ARG
-%token OUT_ARG
-%token EXPLICIT_IMPL_SEP
-
-%start expression
-
-%%
-
-expression
- : 'T' COLON type_expression { $$ = SetEcmaDescType ($3, EcmaDesc.Kind.Type); }
- | 'N' COLON namespace_expression { $$ = SetEcmaDescType ($3, EcmaDesc.Kind.Namespace); }
- | 'M' COLON method_expression { $$ = SetEcmaDescType ($3, EcmaDesc.Kind.Method); }
- | 'F' COLON simple_member_expression { $$ = SetEcmaDescType ($3, EcmaDesc.Kind.Field); }
- | 'C' COLON constructor_expression { $$ = SetEcmaDescType ($3, EcmaDesc.Kind.Constructor); }
- | 'P' COLON property_expression { $$ = SetEcmaDescType ($3, EcmaDesc.Kind.Property); }
- | 'E' COLON simple_member_expression { $$ = SetEcmaDescType ($3, EcmaDesc.Kind.Event); }
- | 'O' COLON operator_expression { $$ = SetEcmaDescType ($3, EcmaDesc.Kind.Operator); }
-
-/* i.e. id.id.id or id */
-dot_expression
- : IDENTIFIER { $$ = new List<string> { (string)$1 }; }
- | IDENTIFIER DOT dot_expression { ((ICollection<string>)$3).Add ((string)$1); $$ = $3; }
-
-namespace_expression
- : dot_expression { $$ = new EcmaDesc { Namespace = string.Join (".", ((IEnumerable<string>)$1).Reverse ()) }; }
-
-type_expression
- : dot_expression type_expression_suffix {
- var dotExpr = ((List<string>)$1);
- dotExpr.Reverse ();
- var desc = $2 as EcmaDesc;
- desc.DescKind = EcmaDesc.Kind.Type;
- desc.Namespace = string.Join (".", dotExpr.Take (dotExpr.Count - 1));
- desc.TypeName = dotExpr.Last ();
- $$ = desc;
- }
-
-/* To be used in types with no namespaces attached to them like an inner type*/
-reduced_type_expression
- : IDENTIFIER type_expression_suffix {
- var desc = $2 as EcmaDesc;
- desc.DescKind = EcmaDesc.Kind.Type;
- desc.TypeName = $1 as string;
- $$ = desc;
- }
-
-type_expression_suffix
- : opt_generic_type_suffix opt_inner_type_description opt_array_definition opt_etc {
- bool nestedDescHasEtc = $2 != null && ((EcmaDesc)$2).IsEtc;
- EcmaDesc nestedType = (EcmaDesc)$2;
- $$ = new EcmaDesc {
- GenericTypeArguments = $1 as List<EcmaDesc>,
- NestedType = nestedType,
- ArrayDimensions = SafeReverse ($3 as List<int>),
- Etc = $4 != null ? ((Tuple<char, string>)$4).Item1 : nestedDescHasEtc ? nestedType.Etc : (char)0,
- EtcFilter = $4 != null ? ((Tuple<char, string>)$4).Item2 : nestedDescHasEtc ? nestedType.EtcFilter : null
- };
- if (nestedDescHasEtc) {
- nestedType.Etc = (char)0;
- nestedType.EtcFilter = null;
- }
- }
-
-opt_inner_type_description
- : /* empty */ { $$ = null; }
- | INNER_TYPE_SEPARATOR reduced_type_expression { $$ = $2; }
-
-opt_generic_type_suffix
- : /* empty */ { $$ = null; }
- | OP_GENERICS_BACKTICK DIGIT { $$ = Enumerable.Repeat<EcmaDesc> (null, (int)$2).ToList (); }
- | OP_GENERICS_LT generic_type_arg_list OP_GENERICS_GT { $$ = $2; }
-
-generic_type_arg_list
- : type_expression { $$ = new List<EcmaDesc> () { (EcmaDesc)$1 }; }
- | generic_type_arg_list COMMA type_expression { ((List<EcmaDesc>)$1).Add ((EcmaDesc)$3); $$ = $1; }
-
-opt_array_definition
- : /* empty */ { $$ = null; }
- | OP_ARRAY_OPEN opt_array_definition_list OP_ARRAY_CLOSE opt_array_definition {
- var dims = ((IList<int>)$4) ?? new List<int> (2);
- dims.Add ((int)$2);
- $$ = dims;
- }
-
-opt_array_definition_list
- : /* empty */ { $$ = 1; }
- | COMMA opt_array_definition_list { $$ = ((int)$2) + 1; }
-
-opt_etc
- : /* empty */ { $$ = null; }
- | SLASH_SEPARATOR etc_identifier { $$ = Tuple.Create<char, string> (((string)$2)[0], null); }
- | SLASH_SEPARATOR etc_identifier SLASH_SEPARATOR reduced_member_expression { $$ = Tuple.Create<char, string> (((string)$2)[0], (string)$4); }
-/* | SLASH_SEPARATOR etc_identifier SLASH_SEPARATOR IDENTIFIER opt_generic_type_suffix { $$ = Tuple.Create<char, string> (((string)$2)[0], (string)$4 + ($5 == null ? string.Empty : "<" + string.Join (",", ((IEnumerable<EcmaDesc>)$5).Select (t => t.ToCompleteTypeName ())) + ">")); } */
-
-etc_identifier
- : STAR { $$ = "*"; }
- | IDENTIFIER { $$ = $1; }
-
-method_expression
- : type_expression DOT IDENTIFIER opt_generic_type_suffix opt_arg_list_suffix {
- var desc = $1 as EcmaDesc;
- desc.MemberName = $3 as string;
- desc.GenericMemberArguments = $4 as List<EcmaDesc>;
- desc.MemberArguments = SafeReverse ($5 as List<EcmaDesc>);
- $$ = desc;
- }
- | dot_expression opt_generic_type_suffix opt_arg_list_suffix {
- var dotExpr = ((List<string>)$1);
- $$ = new EcmaDesc {
- Namespace = string.Join (".", dotExpr.Skip (2).DefaultIfEmpty (string.Empty).Reverse ()),
- TypeName = dotExpr.Skip (1).First (),
- MemberName = dotExpr.First (),
- GenericMemberArguments = $2 as List<EcmaDesc>,
- MemberArguments = SafeReverse ($3 as List<EcmaDesc>)
- };
- }
- | type_expression EXPLICIT_IMPL_SEP method_expression {
- var desc = $1 as EcmaDesc;
- desc.ExplicitImplMember = $3 as EcmaDesc;
- $$ = desc;
- }
-
-/* To be used with members that may have no type/namespace attached */
-reduced_member_expression
- : IDENTIFIER opt_generic_type_suffix { $$ = (string)$1 + ($2 == null ? string.Empty : "<" + string.Join (",", ((IEnumerable<EcmaDesc>)$2).Select (t => t.ToCompleteTypeName ())) + ">"); }
- | IDENTIFIER opt_generic_type_suffix DOT reduced_member_expression {
- var existing = $4 as string;
- var expr = (string)$1 + ($2 == null ? string.Empty : "<" + string.Join (",", ((IEnumerable<EcmaDesc>)$2).Select (t => t.ToCompleteTypeName ())) + ">");
- $$ = expr + "." + existing;
- }
-
-arg_type_expression
- : type_expression opt_arg_type_suffix { var desc = (EcmaDesc)$1; desc.DescModifier = (EcmaDesc.Mod)$2; $$ = desc; }
-
-opt_arg_type_suffix
- : /* empty */ { $$ = EcmaDesc.Mod.Normal; }
- | STAR { $$ = EcmaDesc.Mod.Pointer; }
- | REF_ARG { $$ = EcmaDesc.Mod.Ref; }
- | OUT_ARG { $$ = EcmaDesc.Mod.Out; }
-
-type_expression_list
- : /* empty */ { $$ = null; }
- | arg_type_expression { $$ = new List<EcmaDesc> () { (EcmaDesc)$1 }; }
- | arg_type_expression COMMA type_expression_list { ((List<EcmaDesc>)$3).Add ((EcmaDesc)$1); $$ = $3; }
-
-simple_member_expression
- : dot_expression {
- var dotExpr = ((List<string>)$1);
- dotExpr.Reverse ();
-
- $$ = new EcmaDesc {
- Namespace = dotExpr.Count > 2 ? string.Join (".", dotExpr.Take (dotExpr.Count - 2)) : string.Empty,
- TypeName = dotExpr.Count > 1 ? dotExpr[dotExpr.Count - 2] : string.Empty,
- MemberName = dotExpr[dotExpr.Count - 1]
- };
- }
- | type_expression DOT IDENTIFIER {
- var desc = $1 as EcmaDesc;
- desc.MemberName = $3 as string;
- $$ = desc;
- }
- | type_expression EXPLICIT_IMPL_SEP simple_member_expression {
- var desc = $1 as EcmaDesc;
- desc.ExplicitImplMember = $3 as EcmaDesc;
- $$ = desc;
- }
-
-constructor_expression
- : method_expression { $$ = $1; }
-
-operator_expression
- : method_expression { $$ = $1; }
-
-property_expression
- : simple_member_expression opt_property_indexer {
- var desc = $1 as EcmaDesc;
- (desc.ExplicitImplMember ?? desc).MemberArguments = SafeReverse ($2 as List<EcmaDesc>);
- $$ = desc;
- }
-
-opt_property_indexer
- : opt_arg_list_suffix { $$ = $1; }
-
-/*simple_member_expression opt_arg_list_suffix { $$ = CopyFromEcmaDesc (new EcmaDesc {
- MemberArguments = SafeReverse ($2 as List<EcmaDesc>)
- }, (EcmaDesc)$1);
- }*/
-
-opt_arg_list_suffix
- : /* empty */ { $$ = null; }
- | OP_OPEN_PAREN type_expression_list OP_CLOSE_PAREN { $$ = $2; }
-
-%%
-
-} \ No newline at end of file
diff --git a/mcs/class/monodoc/Monodoc.Ecma/EcmaUrlParserDriver.cs b/mcs/class/monodoc/Monodoc.Ecma/EcmaUrlParserDriver.cs
deleted file mode 100644
index 8a938255122..00000000000
--- a/mcs/class/monodoc/Monodoc.Ecma/EcmaUrlParserDriver.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.IO;
-
-namespace Monodoc.Ecma
-{
- public class EcmaUrlParserDriver
- {
- public static void Main (string[] args)
- {
- var input = new StringReader (args[0]);
- var lexer = new EcmaUrlTokenizer (input);
- var parser = new EcmaUrlParser ();
-
- Console.WriteLine (parser.yyparse (lexer));
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc.Ecma/EcmaUrlTokenizer.cs b/mcs/class/monodoc/Monodoc.Ecma/EcmaUrlTokenizer.cs
deleted file mode 100644
index a4d726718a3..00000000000
--- a/mcs/class/monodoc/Monodoc.Ecma/EcmaUrlTokenizer.cs
+++ /dev/null
@@ -1,171 +0,0 @@
-using System;
-using System.Text;
-using System.Globalization;
-
-namespace Monodoc.Ecma
-{
- public class EcmaUrlTokenizer : yyParser.yyInput
- {
- const char EndOfStream = (char)0;
- string input;
- object val;
- int current_token;
- int current_pos;
- int real_current_pos;
- int identCount = 0;
-
- public EcmaUrlTokenizer (string input)
- {
- this.input = input;
- }
-
- static bool is_identifier_start_character (char c)
- {
- return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' || Char.IsLetter (c);
- }
-
- static bool is_identifier_part_character (char c)
- {
- if (c >= 'a' && c <= 'z')
- return true;
-
- if (c >= 'A' && c <= 'Z')
- return true;
-
- if (c == '_' || (c >= '0' && c <= '9'))
- return true;
-
- if (c < 0x80)
- return false;
-
- return Char.IsLetter (c) || Char.GetUnicodeCategory (c) == UnicodeCategory.ConnectorPunctuation;
- }
-
- public bool advance ()
- {
- return Peek () != EndOfStream;
- }
-
- public Object Value {
- get {
- return val;
- }
- }
-
- public Object value ()
- {
- return val;
- }
-
- public int token ()
- {
- int token = xtoken ();
- //Console.WriteLine ("Current token {0} with value {1}", token, val == null ? "(none)" : val.ToString ());
- if (token == Token.ERROR) {
- throw new Exception (string.Format ("Error at position {0} parsing url '{0}'", current_pos, input));
- }
- current_token = token;
- return token;
- }
-
- int xtoken ()
- {
- char next = Read ();
- while (char.IsWhiteSpace (next))
- next = Read ();
- current_pos++;
- val = null;
-
- switch (next) {
- case ',':
- return Token.COMMA;
- case '.':
- return Token.DOT;
- case '{':
- case '<':
- return Token.OP_GENERICS_LT;
- case '}':
- case '>':
- return Token.OP_GENERICS_GT;
- case '`':
- return Token.OP_GENERICS_BACKTICK;
- case '(':
- return Token.OP_OPEN_PAREN;
- case ')':
- return Token.OP_CLOSE_PAREN;
- case '+':
- return Token.INNER_TYPE_SEPARATOR;
- case ':':
- return Token.COLON;
- case '/':
- return Token.SLASH_SEPARATOR;
- case '[':
- return Token.OP_ARRAY_OPEN;
- case ']':
- return Token.OP_ARRAY_CLOSE;
- case '*':
- return Token.STAR;
- case '&':
- return Token.REF_ARG;
- case '@':
- return Token.OUT_ARG;
- case '$':
- return Token.EXPLICIT_IMPL_SEP;
- default:
- return TokenizeIdentifierOrNumber (next);
- }
- }
-
- int TokenizeIdentifierOrNumber (char current)
- {
- // We must first return the expression type which is a uppercase letter and a colon
- if (current_pos < 2) {
- val = null;
- return (int)current;
- }
-
- if (is_identifier_start_character (current) || current == '*') {
- unsafe {
- // identifier length is artificially limited to 1024 bytes by implementations
- char* pIdent = stackalloc char[512];
- *pIdent = current;
- identCount = 1;
-
- char peek;
- while ((peek = Peek ()) != EndOfStream && is_identifier_part_character (peek)) {
- *(pIdent + identCount) = Read ();
- ++current_pos;
- ++identCount;
- }
-
- val = new string ((char*)pIdent, 0, identCount);
- return Token.IDENTIFIER;
- }
- } else if (char.IsDigit (current)) {
- val = current - '0';
- return Token.DIGIT;
- } else {
- val = null;
- return Token.ERROR;
- }
- }
-
- char Read ()
- {
- try {
- return input[real_current_pos++];
- } catch {
- return EndOfStream;
- }
- }
-
- char Peek ()
- {
- try {
- return input[real_current_pos];
- } catch {
- return EndOfStream;
- }
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/HelpSource.cs b/mcs/class/monodoc/Monodoc/HelpSource.cs
deleted file mode 100644
index 2c6257d409c..00000000000
--- a/mcs/class/monodoc/Monodoc/HelpSource.cs
+++ /dev/null
@@ -1,357 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Xml;
-using System.Diagnostics;
-using System.Collections.Generic;
-
-using Mono.Utilities;
-using Lucene.Net.Index;
-
-namespace Monodoc
-{
- public enum SortType {
- Caption,
- Element
- }
-
- //
- // The HelpSource class keeps track of the archived data, and its
- // tree
- //
- public
-#if LEGACY_MODE
- partial
-#endif
- class HelpSource
- {
- static int id;
-
- //
- // The unique ID for this HelpSource.
- //
- int source_id;
-
- // The name of the HelpSource, used by all the file (.tree, .zip, ...) used by it
- string name;
- // The full directory path where the HelpSource files are located
- string basePath;
-
- // The tree of this help source
- Tree tree;
- string treeFilePath;
- RootTree rootTree;
-
- IDocCache cache;
- IDocStorage storage;
-
- public HelpSource (string base_filename, bool create)
- {
- this.name = Path.GetFileName (base_filename);
- this.basePath = Path.GetDirectoryName (base_filename);
- this.treeFilePath = base_filename + ".tree";
- this.storage = new Monodoc.Storage.ZipStorage (base_filename + ".zip");
- this.cache = DocCacheHelper.GetDefaultCache (Name);
-
- tree = create ? new Tree (this, string.Empty, string.Empty) : new Tree (this, treeFilePath);
-
- source_id = id++;
- }
-
- public HelpSource ()
- {
- tree = new Tree (this, "Blah", "Blah");
- source_id = id++;
- this.cache = new Caches.NullCache ();
- }
-
- public int SourceID {
- get {
- return source_id;
- }
- }
-
- public string Name {
- get {
- return name;
- }
- }
-
- /* This gives the full path of the source/ directory */
- public string BaseFilePath {
- get {
- return basePath;
- }
- }
-
- public TraceLevel TraceLevel {
- get;
- set;
- }
-
- public string BaseDir {
- get {
- return basePath;
- }
- }
-
- public Tree Tree {
- get {
- return tree;
- }
- }
-
- public RootTree RootTree {
- get {
- return rootTree;
- }
- set {
- rootTree = value;
- }
- }
-
- public IDocCache Cache {
- get {
- return cache;
- }
- }
-
- public IDocStorage Storage {
- get {
- return storage;
- }
- protected set {
- storage = value;
- }
- }
-
- // A HelpSource may have a common prefix to its URL, give it here
- protected virtual string UriPrefix {
- get {
- return "dummy:";
- }
- }
-
- public virtual SortType SortType {
- get {
- return SortType.Caption;
- }
- }
-
- /// <summary>
- /// Returns a stream from the packaged help source archive
- /// </summary>
- public virtual Stream GetHelpStream (string id)
- {
- return storage.Retrieve (id);
- }
-
- public virtual Stream GetCachedHelpStream (string id)
- {
- if (string.IsNullOrEmpty (id))
- throw new ArgumentNullException ("id");
- if (!cache.CanCache (DocEntity.Text))
- return GetHelpStream (id);
- if (!cache.IsCached (id))
- cache.CacheText (id, GetHelpStream (id));
- return cache.GetCachedStream (id);
- }
-
- public XmlReader GetHelpXml (string id)
- {
- var url = "monodoc:///" + SourceID + "@" + Uri.EscapeDataString (id) + "@";
- var stream = cache.IsCached (id) ? cache.GetCachedStream (id) : storage.Retrieve (id);
-
- return stream == null ? null : new XmlTextReader (url, stream);
- }
-
- public virtual XmlDocument GetHelpXmlWithChanges (string id)
- {
- XmlDocument doc = new XmlDocument ();
- if (!storage.SupportRevision) {
- doc.Load (GetHelpXml (id));
- } else {
- var revManager = storage.RevisionManager;
- doc.Load (revManager.RetrieveLatestRevision (id));
- }
- return doc;
- }
-
- public virtual string GetCachedText (string id)
- {
- if (!cache.CanCache (DocEntity.Text))
- return GetText (id);
- if (!cache.IsCached (id))
- cache.CacheText (id, GetText (id));
- return cache.GetCachedString (id);
- }
-
- public virtual string GetText (string id)
- {
- return new StreamReader (GetHelpStream (id)).ReadToEnd ();
- }
-
- // Tells if the result for the provided id is generated dynamically
- // by the help source
- public virtual bool IsGeneratedContent (string id)
- {
- return false;
- }
-
- // Tells if the content of the provided id is meant to be returned raw
- public virtual bool IsRawContent (string id)
- {
- return false;
- }
-
- // Tells if provided id refers to a multi-content-type document if it's case
- // tells the ids it's formed of
- public virtual bool IsMultiPart (string id, out IEnumerable<string> parts)
- {
- parts = null;
- return false;
- }
-
- /// <summary>
- /// Saves the tree and the archive
- /// </summary>
- public void Save ()
- {
- tree.Save (treeFilePath);
- storage.Dispose ();
- }
-
- public virtual void RenderPreviewDocs (XmlNode newNode, XmlWriter writer)
- {
- throw new NotImplementedException ();
- }
-
- public virtual string GetPublicUrl (Node node)
- {
- return node.GetInternalUrl ();
- }
-
- public virtual bool CanHandleUrl (string url)
- {
- return url.StartsWith (UriPrefix, StringComparison.OrdinalIgnoreCase);
- }
-
- public virtual string GetInternalIdForUrl (string url, out Node node, out Dictionary<string, string> context)
- {
- context = null;
- node = MatchNode (url);
- return node == null ? null : url.Substring (UriPrefix.Length);
- }
-
- public virtual Node MatchNode (string url)
- {
- Node current = null;
-
- var matchCache = LRUCache<string, Node>.Default;
- if ((current = matchCache.Get (url)) != null)
- return current;
-
- current = Tree.RootNode;
- var strippedUrl = url.StartsWith (UriPrefix, StringComparison.OrdinalIgnoreCase) ? url.Substring (UriPrefix.Length) : url;
- var searchNode = new Node () { Element = strippedUrl };
-
- do {
- int index = current.ChildNodes.BinarySearch (searchNode, NodeElementComparer.Instance);
- if (index >= 0) {
- Node n = current.ChildNodes[index];
- matchCache.Put (url, n);
- return n;
- }
- index = ~index;
- if (index == current.ChildNodes.Count) {
- return SlowMatchNode (Tree.RootNode, matchCache, strippedUrl);
- }
-
- if (index == 0)
- return null;
-
- current = current.ChildNodes [index - 1];
- } while (true);
-
- return null;
- }
-
- /* That slow path is mainly here to handle ecmaspec type of url which are composed of hard to sort numbers
- * because they don't have the same amount of digit. We could use a regex to harmonise the various number
- * parts but then it would be quite specific. Since in the case of ecmaspec the tree is well-formed enough
- * the "Slow" match should still be fast enough
- */
- Node SlowMatchNode (Node current, LRUCache<string, Node> matchCache, string url)
- {
- //Console.WriteLine ("Entering slow path for {0} starting from {1}", url, current.Element);
- while (current != null) {
- bool stop = true;
- foreach (Node n in current.ChildNodes) {
- var element = n.Element.StartsWith (UriPrefix, StringComparison.OrdinalIgnoreCase) ? n.Element.Substring (UriPrefix.Length) : n.Element;
- if (url.Equals (element, StringComparison.Ordinal)) {
- matchCache.Put (url, n);
- return n;
- } else if (url.StartsWith (element + ".", StringComparison.OrdinalIgnoreCase) && !n.IsLeaf) {
- current = n;
- stop = false;
- break;
- }
- }
- if (stop)
- current = null;
- }
-
- return null;
- }
-
- class NodeElementComparer : IComparer<Node>
- {
- public static NodeElementComparer Instance = new NodeElementComparer ();
-
- public int Compare (Node n1, Node n2)
- {
- return string.Compare (Cleanup (n1), Cleanup (n2), StringComparison.Ordinal);
- }
-
- string Cleanup (Node n)
- {
- var prefix = n.Tree != null && n.Tree.HelpSource != null ? n.Tree.HelpSource.UriPrefix : string.Empty;
- var element = n.Element.StartsWith (prefix, StringComparison.OrdinalIgnoreCase) ? n.Element.Substring (prefix.Length) : n.Element;
- if (char.IsDigit (element, 0)) {
- var count = element.TakeWhile (char.IsDigit).Count ();
- element = element.PadLeft (Math.Max (0, 3 - count) + element.Length, '0');
- }
- //Console.WriteLine ("Cleaned up {0} to {1}", n.Element, element);
- return element;
- }
- }
-
- public virtual DocumentType GetDocumentTypeForId (string id)
- {
- return DocumentType.PlainText;
- }
-
- public virtual Stream GetImage (string url)
- {
- Stream result = null;
- storage.TryRetrieve (url, out result);
- return result;
- }
-
- //
- // Populates the index.
- //
- public virtual void PopulateIndex (IndexMaker index_maker)
- {
- }
-
- //
- // Create different Documents for adding to Lucene search index
- // The default action is do nothing. Subclasses should add the docs
- //
- public virtual void PopulateSearchableIndex (IndexWriter writer)
- {
-
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/HelpSource_Legacy.cs b/mcs/class/monodoc/Monodoc/HelpSource_Legacy.cs
deleted file mode 100644
index 15f73ef80b9..00000000000
--- a/mcs/class/monodoc/Monodoc/HelpSource_Legacy.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Xml;
-using System.Diagnostics;
-using System.Collections.Generic;
-
-using Mono.Utilities;
-using Lucene.Net.Index;
-
-#if LEGACY_MODE
-
-namespace Monodoc
-{
- using Generators;
-
- public partial class HelpSource
- {
- static HtmlGenerator htmlGenerator = new HtmlGenerator (null);
-
- [Obsolete]
- public static bool use_css;
- [Obsolete]
- public static bool FullHtml = true;
- [Obsolete]
- public static bool UseWebdocCache;
-
- [Obsolete ("Use Monodoc.Providers.HtmlGenerator.InlineCss")]
- public string InlineCss {
- get { return Monodoc.Generators.HtmlGenerator.InlineCss; }
- }
-
- [Obsolete]
- public string InlineJavaScript {
- get { return null; }
- }
-
- [Obsolete ("Use RenderUrl")]
- public string GetText (string url, out Node node)
- {
- return rootTree.RenderUrl (url, htmlGenerator, out node, this);
- }
-
- [Obsolete ("Use RenderUrl")]
- public string RenderNamespaceLookup (string url, out Node node)
- {
- return rootTree.RenderUrl (url, htmlGenerator, out node, this);
- }
- }
-}
-
-#endif
diff --git a/mcs/class/monodoc/Monodoc/Node.cs b/mcs/class/monodoc/Monodoc/Node.cs
deleted file mode 100644
index 08452f8c40f..00000000000
--- a/mcs/class/monodoc/Monodoc/Node.cs
+++ /dev/null
@@ -1,382 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Linq;
-using System.Xml;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace Monodoc
-{
- public
-#if LEGACY_MODE
- partial
-#endif
- class Node : IComparable<Node>, IComparable
- {
- readonly Tree parentTree;
- string caption, element, pubUrl;
- public bool Documented;
- bool loaded;
- Node parent;
- List<Node> nodes;
-#if LEGACY_MODE
- ArrayList legacyNodes;
-#endif
- Dictionary<string, Node> childrenLookup;
- bool elementSort;
- /* Address has three types of value,
- * _ 0 is for no on-disk representation
- * _ >0 is a valid address that is loaded immediately
- * _ <0 is a valid negated address to indicate lazy loading
- */
- int address;
-
-#if LEGACY_MODE
- [Obsolete ("Tree inheriting Node is being phased out. Use the `Tree.RootNode' property instead")]
- public Node (string caption, string element)
- {
- this.parentTree = (Tree) this;
- this.caption = caption;
- this.element = element;
- parent = null;
- }
-#endif
-
- public Node (Node parent, string caption, string element) : this (parent.Tree, caption, element)
- {
- this.parent = parent;
- }
-
- internal Node (Tree tree, string caption, string element)
- {
- this.parentTree = tree;
- this.caption = caption;
- this.element = element;
- this.elementSort = parentTree.HelpSource != null && parentTree.HelpSource.SortType == SortType.Element;
- }
-
- /// <summary>
- /// Creates a node from an on-disk representation
- /// </summary>
- internal Node (Node parent, int address) : this (parent.parentTree, address)
- {
- this.parent = parent;
- }
-
- internal Node (Tree tree, int address)
- {
- this.address = address;
- this.parentTree = tree;
- this.elementSort = parentTree.HelpSource != null && parentTree.HelpSource.SortType == SortType.Element;
- if (address > 0)
- LoadNode ();
- }
-
- /* This is solely used for MatchNode to check for equality */
- internal Node ()
- {
- }
-
- void LoadNode ()
- {
- parentTree.InflateNode (this);
- if (parent != null)
- parent.RegisterFullNode (this);
- }
-
- public void AddNode (Node n)
- {
- nodes.Add (n);
- n.parent = this;
- n.Documented = true;
- RegisterFullNode (n);
- }
-
- public void DeleteNode (Node n)
- {
- nodes.Remove (n);
- if (!string.IsNullOrEmpty (n.element))
- childrenLookup.Remove (n.element);
- }
-
- // When a child node is inflated, it calls this method
- // so that we can add it to our lookup for quick search
- void RegisterFullNode (Node child)
- {
- if (childrenLookup == null)
- childrenLookup = new Dictionary<string, Node> ();
- if (!string.IsNullOrEmpty (child.element))
- childrenLookup[child.element] = child;
- }
-
- [Obsolete ("Use ChildNodes")]
- public ArrayList Nodes {
- get {
- if (legacyNodes == null)
- legacyNodes = new ArrayList (ChildNodes as ICollection);
- return legacyNodes;
- }
- }
-
- public IList<Node> ChildNodes {
- get {
- EnsureLoaded ();
- return nodes != null ? nodes : new List<Node> ();
- }
- }
-
- public string Element {
- get {
- EnsureLoaded ();
- return element;
- }
- set {
- element = value;
- }
- }
-
- public string Caption {
- get {
- EnsureLoaded ();
- return caption;
- }
- internal set {
- caption = value;
- }
- }
-
- public Node Parent {
- get {
- return parent;
- }
- }
-
- public Tree Tree {
- get {
- return parentTree;
- }
- }
-
- internal int Address {
- get {
- return address;
- }
-#if LEGACY_MODE
- set {
- address = value;
- }
-#endif
- }
-
- /// <summary>
- /// Creates a new node, in the locator entry point, and with
- /// a user visible caption of @caption
- /// </summary>
- public Node CreateNode (string c_caption, string c_element)
- {
- EnsureNodes ();
- if (string.IsNullOrEmpty (c_caption))
- throw new ArgumentNullException ("c_caption");
- if (string.IsNullOrEmpty (c_element))
- throw new ArgumentNullException ("c_element");
-
- Node t = new Node (this, c_caption, c_element);
- nodes.Add (t);
- childrenLookup[c_element] = t;
-
- return t;
- }
-
- public Node GetOrCreateNode (string c_caption, string c_element)
- {
- if (nodes == null)
- return CreateNode (c_caption, c_element);
- if (childrenLookup.Count != nodes.Count || (nodes.Count == 0 && childrenLookup.Count != nodes.Capacity))
- UpdateLookup ();
-
- Node result;
- if (!childrenLookup.TryGetValue (c_element, out result))
- result = CreateNode (c_caption, c_element);
- return result;
- }
-
- public void EnsureNodes ()
- {
- if (nodes == null) {
- nodes = new List<Node> ();
- childrenLookup = new Dictionary<string, Node> ();
- }
- }
-
- public void EnsureLoaded ()
- {
- if (address < 0 && !loaded) {
- LoadNode ();
- loaded = true;
- }
- }
-
- void UpdateLookup ()
- {
- foreach (var node in nodes)
- childrenLookup[node.Element] = node;
- }
-
- public bool IsLeaf {
- get {
- return nodes == null || nodes.Count == 0;
- }
- }
-
- void EncodeInt (BinaryWriter writer, int value)
- {
- do {
- int high = (value >> 7) & 0x01ffffff;
- byte b = (byte)(value & 0x7f);
-
- if (high != 0) {
- b = (byte)(b | 0x80);
- }
-
- writer.Write(b);
- value = high;
- } while(value != 0);
- }
-
- int DecodeInt (BinaryReader reader)
- {
- int ret = 0;
- int shift = 0;
- byte b;
-
- do {
- b = reader.ReadByte();
-
- ret = ret | ((b & 0x7f) << shift);
- shift += 7;
- } while ((b & 0x80) == 0x80);
-
- return ret;
- }
-
- internal void Deserialize (BinaryReader reader)
- {
- int count = DecodeInt (reader);
- element = reader.ReadString ();
- caption = reader.ReadString ();
-
- if (count == 0)
- return;
-
- nodes = new List<Node> (count);
- for (int i = 0; i < count; i++) {
- int child_address = DecodeInt (reader);
-
- Node t = new Node (this, -child_address);
- nodes.Add (t);
- }
-
- if (parentTree.ForceResort)
- nodes.Sort ();
- }
-
- internal void Serialize (FileStream output, BinaryWriter writer)
- {
- if (nodes != null)
- foreach (Node child in nodes)
- child.Serialize (output, writer);
-
- address = (int) output.Position;
- EncodeInt (writer, nodes == null ? 0 : (int) nodes.Count);
- writer.Write (element);
- writer.Write (caption);
-
- if (nodes != null)
- foreach (Node child in nodes)
- EncodeInt (writer, child.address);
- }
-
- public void Sort ()
- {
- if (nodes != null)
- nodes.Sort ();
- }
-
- internal string GetInternalUrl ()
- {
- EnsureLoaded ();
- if (element.IndexOf (":") != -1 || parent == null)
- return element;
-
- var parentUrl = parent.GetInternalUrl ();
- return parentUrl.EndsWith ("/") ? parentUrl + element : parentUrl + "/" + element;
- }
-
- public string PublicUrl {
- get {
- if (pubUrl != null)
- return pubUrl;
- return pubUrl = parentTree.HelpSource != null ? parentTree.HelpSource.GetPublicUrl (this) : GetInternalUrl ();
- }
- }
-
- int IComparable.CompareTo (object obj)
- {
- Node other = obj as Node;
- if (other == null)
- return -1;
- return CompareToInternal (other);
- }
-
- int IComparable<Node>.CompareTo (Node obj)
- {
- return CompareToInternal (obj);
- }
-
- int CompareToInternal (Node other)
- {
- EnsureLoaded ();
- other.EnsureLoaded ();
-
- var cap1 = elementSort ? element : caption;
- var cap2 = elementSort ? other.element : other.caption;
-
- /* Some node (notably from ecmaspec) have number prepended to them
- * which we need to sort better by padding them to the same number
- * of digits
- */
- if (char.IsDigit (cap1[0]) && char.IsDigit (cap2[0])) {
- int c1 = cap1.TakeWhile (char.IsDigit).Count ();
- int c2 = cap2.TakeWhile (char.IsDigit).Count ();
-
- if (c1 != c2) {
- cap1 = cap1.PadLeft (cap1.Length + Math.Max (0, c2 - c1), '0');
- cap2 = cap2.PadLeft (cap2.Length + Math.Max (0, c1 - c2), '0');
- }
- }
-
- return string.Compare (cap1, cap2, StringComparison.Ordinal);
- }
- }
-
- internal static class IListExtensions
- {
- // TODO: if the backing store ever change from List<T>, we need to tune these methods to have a fallback mechanism
- public static int BinarySearch<T> (this IList<T> ilist, T item)
- {
- var list = ilist as List<T>;
- if (list == null)
- throw new NotSupportedException ();
- return list.BinarySearch (item);
- }
-
- public static int BinarySearch<T> (this IList<T> ilist, T item, IComparer<T> comparer)
- {
- var list = ilist as List<T>;
- if (list == null)
- throw new NotSupportedException ();
- return list.BinarySearch (item, comparer);
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/Node_Legacy.cs b/mcs/class/monodoc/Monodoc/Node_Legacy.cs
deleted file mode 100644
index 6e3d7f5315a..00000000000
--- a/mcs/class/monodoc/Monodoc/Node_Legacy.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Linq;
-using System.Xml;
-using System.Collections.Generic;
-
-#if LEGACY_MODE
-
-namespace Monodoc
-{
- public partial class Node
- {
- [Obsolete ("Use `Tree' instead of 'tree'")]
- public Tree tree {
- get {
- return this.Tree;
- }
- }
-
- [Obsolete ("Use TreeDumper")]
- public static void PrintTree (Tree t)
- {
- TreeDumper.PrintTree (t.RootNode);
- }
-
-
- }
-}
-
-#endif
diff --git a/mcs/class/monodoc/Monodoc/Provider.cs b/mcs/class/monodoc/Monodoc/Provider.cs
deleted file mode 100644
index 4f078047fdf..00000000000
--- a/mcs/class/monodoc/Monodoc/Provider.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System;
-
-namespace Monodoc
-{
- public abstract class Provider
- {
- //
- // This code is used to "tag" all the different sources
- //
- static short serial;
-
- public int Code { get; set; }
-
- public Provider ()
- {
- Code = serial++;
- }
-
- public abstract void PopulateTree (Tree tree);
-
- //
- // Called at shutdown time after the tree has been populated to perform
- // any fixups or final tasks.
- //
- public abstract void CloseTree (HelpSource hs, Tree tree);
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/RootTree.cs b/mcs/class/monodoc/Monodoc/RootTree.cs
deleted file mode 100644
index 04923ad4d90..00000000000
--- a/mcs/class/monodoc/Monodoc/RootTree.cs
+++ /dev/null
@@ -1,545 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.Configuration;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Runtime.InteropServices;
-using System.Xml;
-
-using Monodoc.Providers;
-using Lucene.Net.Analysis.Standard;
-using Lucene.Net.Index;
-
-namespace Monodoc
-{
- public
-#if LEGACY_MODE
- partial
-#endif
- class RootTree : Tree
- {
- public const int MonodocVersion = 2;
- const string RootNamespace = "root:/";
- string basedir;
- static List<string> uncompiledHelpSourcePaths = new List<string>();
- HashSet<string> loadedSourceFiles = new HashSet<string>();
- List<HelpSource> helpSources = new List<HelpSource>();
- Dictionary<string, Node> nameToNode = new Dictionary<string, Node>();
- Dictionary<string, HelpSource> nameToHelpSource = new Dictionary<string, HelpSource>();
-
- public IList<HelpSource> HelpSources {
- get {
- return this.helpSources.AsReadOnly();
- }
- }
-
- public DateTime LastHelpSourceTime {
- get;
- set;
- }
-
- static bool IsUnix {
- get {
- int platform = (int)Environment.OSVersion.Platform;
- return platform == 4 || platform == 128 || platform == 6;
- }
- }
-
- RootTree () : base (null, "Mono Documentation", "root:")
- {
- base.RootNode.EnsureNodes();
- this.LastHelpSourceTime = DateTime.Now;
- }
-
- public static void AddUncompiledSource (string path)
- {
- uncompiledHelpSourcePaths.Add (path);
- }
-
- public static RootTree LoadTree ()
- {
- return RootTree.LoadTree (RootTree.ProbeBaseDirectories ());
- }
-
- static string ProbeBaseDirectories ()
- {
- string result = ".";
- try {
- result = Config.Get ("docPath") ?? ".";
- } catch {}
-
- return result;
- }
-
- public static RootTree LoadTree (string basedir, bool includeExternal = true)
- {
- if (string.IsNullOrEmpty (basedir))
- throw new ArgumentNullException ("basedir");
- if (!Directory.Exists (basedir))
- throw new ArgumentException ("basedir", string.Format ("Base documentation directory at '{0}' doesn't exist", basedir));
-
- XmlDocument xmlDocument = new XmlDocument ();
- string filename = Path.Combine (basedir, "monodoc.xml");
- xmlDocument.Load (filename);
- IEnumerable<string> sourceFiles = Directory.EnumerateFiles (Path.Combine (basedir, "sources"), "*.source");
- if (includeExternal)
- sourceFiles = sourceFiles.Concat (RootTree.ProbeExternalDirectorySources ());
- return RootTree.LoadTree (basedir, xmlDocument, sourceFiles);
- }
-
- static IEnumerable<string> ProbeExternalDirectorySources ()
- {
- IEnumerable<string> enumerable = Enumerable.Empty<string> ();
- try {
- string path = Config.Get ("docExternalPath");
- enumerable = enumerable.Concat (System.IO.Directory.EnumerateFiles (path, "*.source"));
- }
- catch {}
-
- if (Directory.Exists ("/Library/Frameworks/Mono.framework/External/monodoc"))
- enumerable = enumerable.Concat (Directory.EnumerateFiles ("/Library/Frameworks/Mono.framework/External/monodoc", "*.source"));
-
- var windowsPath = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData), "monodoc");
- if (Directory.Exists (windowsPath))
- enumerable = enumerable.Concat (Directory.EnumerateFiles (windowsPath, "*.source"));
-
- return enumerable;
- }
-
- public static RootTree LoadTree (string indexDir, XmlDocument docTree, IEnumerable<string> sourceFiles)
- {
- if (docTree == null) {
- docTree = new XmlDocument ();
- using (Stream manifestResourceStream = typeof (RootTree).Assembly.GetManifestResourceStream ("monodoc.xml")) {
- docTree.Load (manifestResourceStream);
- }
- }
-
- sourceFiles = (sourceFiles ?? new string[0]);
- RootTree rootTree = new RootTree ();
- rootTree.basedir = indexDir;
- XmlNodeList xml_node_list = docTree.SelectNodes ("/node/node");
- rootTree.nameToNode["root"] = rootTree.RootNode;
- rootTree.nameToNode["libraries"] = rootTree.RootNode;
- rootTree.Populate (rootTree.RootNode, xml_node_list);
-
- if (rootTree.LookupEntryPoint ("various") == null) {
- Console.Error.WriteLine ("No 'various' doc node! Check monodoc.xml!");
- Node rootNode = rootTree.RootNode;
- }
-
- foreach (string current in sourceFiles)
- rootTree.AddSourceFile (current);
-
- foreach (string path in uncompiledHelpSourcePaths) {
- var hs = new Providers.EcmaUncompiledHelpSource (path);
- hs.RootTree = rootTree;
- rootTree.helpSources.Add (hs);
- string epath = "extra-help-source-" + hs.Name;
- Node hsn = rootTree.RootNode.CreateNode (hs.Name, RootNamespace + epath);
- rootTree.nameToHelpSource [epath] = hs;
- hsn.EnsureNodes ();
- foreach (Node n in hs.Tree.RootNode.ChildNodes)
- hsn.AddNode (n);
- }
-
- RootTree.PurgeNode (rootTree.RootNode);
- rootTree.RootNode.Sort ();
- return rootTree;
- }
-
- public void AddSource (string sourcesDir)
- {
- IEnumerable<string> enumerable = Directory.EnumerateFiles (sourcesDir, "*.source");
- foreach (string current in enumerable)
- if (!this.AddSourceFile (current))
- Console.Error.WriteLine ("Error: Could not load source file {0}", current);
- }
-
- public bool AddSourceFile (string sourceFile)
- {
- if (this.loadedSourceFiles.Contains (sourceFile))
- return false;
-
- Node node = this.LookupEntryPoint ("various") ?? base.RootNode;
- XmlDocument xmlDocument = new XmlDocument ();
- try {
- xmlDocument.Load (sourceFile);
- } catch {
- bool result = false;
- return result;
- }
-
- XmlNodeList extra_nodes = xmlDocument.SelectNodes ("/monodoc/node");
- if (extra_nodes.Count > 0)
- this.Populate (node, extra_nodes);
-
- XmlNodeList sources = xmlDocument.SelectNodes ("/monodoc/source");
- if (sources == null) {
- Console.Error.WriteLine ("Error: No <source> section found in the {0} file", sourceFile);
- return false;
- }
-
- loadedSourceFiles.Add (sourceFile);
- foreach (XmlNode xmlNode in sources) {
- XmlAttribute a = xmlNode.Attributes["provider"];
- if (a == null) {
- Console.Error.WriteLine ("Error: no provider in <source>");
- continue;
- }
- string provider = a.InnerText;
- a = xmlNode.Attributes["basefile"];
- if (a == null) {
- Console.Error.WriteLine ("Error: no basefile in <source>");
- continue;
- }
- string basefile = a.InnerText;
- a = xmlNode.Attributes["path"];
- if (a == null) {
- Console.Error.WriteLine ("Error: no path in <source>");
- continue;
- }
- string path = a.InnerText;
- string basefilepath = Path.Combine (Path.GetDirectoryName (sourceFile), basefile);
- HelpSource helpSource = RootTree.GetHelpSource (provider, basefilepath);
- if (helpSource != null) {
- helpSource.RootTree = this;
- this.helpSources.Add (helpSource);
- this.nameToHelpSource[path] = helpSource;
- Node node2 = this.LookupEntryPoint (path);
- if (node2 == null) {
- Console.Error.WriteLine ("node `{0}' is not defined on the documentation map", path);
- node2 = node;
- }
- foreach (Node current in helpSource.Tree.RootNode.ChildNodes) {
- node2.AddNode (current);
- }
- node2.Sort ();
- }
- }
- return true;
- }
-
- static bool PurgeNode (Node node)
- {
- bool result = false;
- if (!node.Documented)
- {
- List<Node> list = new List<Node> ();
- foreach (Node current in node.ChildNodes)
- {
- bool flag = RootTree.PurgeNode (current);
- if (flag)
- {
- list.Add (current);
- }
- }
- result = (node.ChildNodes.Count == list.Count);
- foreach (Node current2 in list)
- {
- node.DeleteNode (current2);
- }
- }
- return result;
- }
-
- public static string[] GetSupportedFormats ()
- {
- return new string[]
- {
- "ecma",
- "ecmaspec",
- "error",
- "man",
- "xhtml"
- };
- }
-
- public static HelpSource GetHelpSource (string provider, string basefilepath)
- {
- HelpSource result;
- try {
- switch (provider) {
- case "xhtml":
- case "hb":
- result = new XhtmlHelpSource (basefilepath, false);
- break;
- case "man":
- result = new ManHelpSource (basefilepath, false);
- break;
- case "error":
- result = new ErrorHelpSource (basefilepath, false);
- break;
- case "ecmaspec":
- result = new EcmaSpecHelpSource (basefilepath, false);
- break;
- case "ecma":
- result = new EcmaHelpSource (basefilepath, false);
- break;
- default:
- Console.Error.WriteLine ("Error: Unknown provider specified: {0}", provider);
- result = null;
- break;
- }
- } catch (FileNotFoundException) {
- Console.Error.WriteLine ("Error: did not find one of the files in sources/" + basefilepath);
- result = null;
- }
- return result;
- }
-
- public static Provider GetProvider (string provider, params string[] basefilepaths)
- {
- switch (provider) {
- case "ecma":
- return new EcmaProvider (basefilepaths[0]);
- case "ecmaspec":
- return new EcmaSpecProvider (basefilepaths[0]);
- case "error":
- return new ErrorProvider (basefilepaths[0]);
- case "man":
- return new ManProvider (basefilepaths);
- case "xhml":
- case "hb":
- return new XhtmlProvider (basefilepaths[0]);
- }
-
- throw new NotSupportedException (provider);
- }
-
- void Populate (Node parent, XmlNodeList xml_node_list)
- {
- foreach (XmlNode xmlNode in xml_node_list) {
- XmlAttribute e = xmlNode.Attributes["parent"];
- Node parent2 = null;
- if (e != null && this.nameToNode.TryGetValue (e.InnerText, out parent2)) {
- xmlNode.Attributes.Remove (e);
- Populate (parent2, xmlNode.SelectNodes ("."));
- continue;
- }
- e = xmlNode.Attributes["label"];
- if (e == null) {
- Console.Error.WriteLine ("`label' attribute missing in <node>");
- continue;
- }
- string label = e.InnerText;
- e = xmlNode.Attributes["name"];
- if (e == null) {
- Console.Error.WriteLine ("`name' attribute missing in <node>");
- continue;
- }
- string name = e.InnerText;
- Node orCreateNode = parent.GetOrCreateNode (label, RootNamespace + name);
- orCreateNode.EnsureNodes ();
- this.nameToNode[name] = orCreateNode;
- XmlNodeList xmlNodeList = xmlNode.SelectNodes ("./node");
- if (xmlNodeList != null) {
- this.Populate (orCreateNode, xmlNodeList);
- }
- }
- }
-
- public Node LookupEntryPoint (string name)
- {
- Node result = null;
- if (!this.nameToNode.TryGetValue (name, out result))
- result = null;
- return result;
- }
-
- public TOutput RenderUrl<TOutput> (string url, IDocGenerator<TOutput> generator, HelpSource hintSource = null)
- {
- Node dummy;
- return RenderUrl<TOutput> (url, generator, out dummy, hintSource);
- }
-
- public TOutput RenderUrl<TOutput> (string url, IDocGenerator<TOutput> generator, out Node node, HelpSource hintSource = null)
- {
- node = null;
- string internalId = null;
- Dictionary<string, string> context = null;
- HelpSource hs = GetHelpSourceAndIdForUrl (url, hintSource, out internalId, out context, out node);
- return generator.Generate (hs, internalId, context);
- }
-
- public HelpSource GetHelpSourceAndIdForUrl (string url, out string internalId, out Dictionary<string, string> context)
- {
- Node dummy;
- return GetHelpSourceAndIdForUrl (url, out internalId, out context, out dummy);
- }
-
- public HelpSource GetHelpSourceAndIdForUrl (string url, out string internalId, out Dictionary<string, string> context, out Node node)
- {
- return GetHelpSourceAndIdForUrl (url, null, out internalId, out context, out node);
- }
-
- public HelpSource GetHelpSourceAndIdForUrl (string url, HelpSource hintSource, out string internalId, out Dictionary<string, string> context, out Node node)
- {
- node = null;
- internalId = null;
- context = null;
-
- if (url == "root:") {
- context = new Dictionary<string, string> { {"specialpage", "master-root"} };
- internalId = url;
- node = null;
- // We return the first help source available since the generator will simply fetch this RootTree instance through it
- return helpSources.FirstOrDefault ();
- }
- if (url.StartsWith (RootNamespace, StringComparison.OrdinalIgnoreCase)) {
- context = new Dictionary<string, string> { {"specialpage", "root"} };
- return GetHelpSourceAndIdFromName (url.Substring (RootNamespace.Length), out internalId, out node);
- }
-
- HelpSource helpSource = hintSource;
- if (helpSource == null || string.IsNullOrEmpty (internalId = helpSource.GetInternalIdForUrl (url, out node, out context))) {
- helpSource = null;
- foreach (var hs in helpSources.Where (h => h.CanHandleUrl (url))) {
- if (!string.IsNullOrEmpty (internalId = hs.GetInternalIdForUrl (url, out node, out context))) {
- helpSource = hs;
- break;
- }
- }
- }
-
- return helpSource;
- }
-
- public HelpSource GetHelpSourceAndIdFromName (string name, out string internalId, out Node node)
- {
- internalId = "root:";
- node = LookupEntryPoint (name);
-
- return node == null ? null : node.ChildNodes.Select (n => n.Tree.HelpSource).FirstOrDefault (hs => hs != null);
- }
-
- public HelpSource GetHelpSourceFromId (int id)
- {
- return (id < 0 || id >= this.helpSources.Count) ? null : this.helpSources[id];
- }
-
- public Stream GetImage (string url)
- {
- if (url.StartsWith ("source-id:", StringComparison.OrdinalIgnoreCase)) {
- string text = url.Substring (10);
- int num = text.IndexOf (":");
- string text2 = text.Substring (0, num);
- int id = 0;
- if (!int.TryParse (text2, out id)) {
- Console.Error.WriteLine ("Failed to parse source-id url: {0} `{1}'", url, text2);
- return null;
- }
- HelpSource helpSourceFromId = this.GetHelpSourceFromId (id);
- return helpSourceFromId.GetImage (text.Substring (num + 1));
- }
- Assembly assembly = Assembly.GetAssembly (typeof (RootTree));
- return assembly.GetManifestResourceStream (url);
- }
-
- public IndexReader GetIndex ()
- {
- var paths = GetIndexesPathPrefixes ().Select (bp => Path.Combine (bp, "monodoc.index"));
- var p = paths.FirstOrDefault (File.Exists);
- return p == null ? (IndexReader)null : IndexReader.Load (p);
- }
-
- public static void MakeIndex ()
- {
- RootTree rootTree = RootTree.LoadTree ();
- rootTree.GenerateIndex ();
- }
-
- public bool GenerateIndex ()
- {
- IndexMaker indexMaker = new IndexMaker ();
- foreach (HelpSource current in this.helpSources)
- current.PopulateIndex (indexMaker);
-
- var paths = GetIndexesPathPrefixes ().Select (bp => Path.Combine (bp, "monodoc.index"));
- bool successful = false;
-
- foreach (var path in paths) {
- try {
- indexMaker.Save (path);
- successful = true;
- if (RootTree.IsUnix)
- RootTree.chmod (path, 420);
- } catch (UnauthorizedAccessException) {
- }
- }
- if (!successful) {
- Console.WriteLine ("You don't have permissions to write on any of [" + string.Join (", ", paths) + "]");
- return false;
- }
-
- Console.WriteLine ("Documentation index updated");
- return true;
- }
-
- public SearchableIndex GetSearchIndex ()
- {
- var paths = GetIndexesPathPrefixes ().Select (bp => Path.Combine (bp, "search_index"));
- var p = paths.FirstOrDefault (Directory.Exists);
- return p == null ? (SearchableIndex)null : SearchableIndex.Load (p);
- }
-
- public static void MakeSearchIndex ()
- {
- RootTree rootTree = RootTree.LoadTree ();
- rootTree.GenerateSearchIndex ();
- }
-
- public bool GenerateSearchIndex ()
- {
- Console.WriteLine ("Loading the monodoc tree...");
- IndexWriter indexWriter = null;
- var analyzer = new StandardAnalyzer (Lucene.Net.Util.Version.LUCENE_CURRENT);
- var paths = GetIndexesPathPrefixes ().Select (bp => Path.Combine (bp, "search_index"));
- bool successful = false;
-
- foreach (var path in paths) {
- try {
- if (!Directory.Exists (path))
- Directory.CreateDirectory (path);
- var directory = Lucene.Net.Store.FSDirectory.Open (path);
- indexWriter = new IndexWriter (directory, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
- successful = true;
- } catch (UnauthorizedAccessException) {}
- }
- if (!successful) {
- Console.WriteLine ("You don't have permissions to write on any of [" + string.Join (", ", paths) + "]");
- return false;
- }
- Console.WriteLine ("Collecting and adding documents...");
- foreach (HelpSource current in this.helpSources) {
- current.PopulateSearchableIndex (indexWriter);
- }
- Console.WriteLine ("Closing...");
- indexWriter.Optimize ();
- indexWriter.Close ();
- return true;
- }
-
- [DllImport ("libc")]
- static extern int chmod (string filename, int mode);
-
- IEnumerable<string> GetIndexesPathPrefixes ()
- {
- yield return basedir;
- yield return Config.Get ("docPath");
- var indexDirectory = Config.Get ("monodocIndexDirectory");
- if (!string.IsNullOrEmpty (indexDirectory))
- yield return indexDirectory;
- yield return Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "monodoc");
- }
-
- [Obsolete]
- public string GetTitle (string url)
- {
- return "Mono Documentation";
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/RootTree_Legacy.cs b/mcs/class/monodoc/Monodoc/RootTree_Legacy.cs
deleted file mode 100644
index 4d8a8d27c81..00000000000
--- a/mcs/class/monodoc/Monodoc/RootTree_Legacy.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Xml;
-using System.Diagnostics;
-using System.Collections.Generic;
-
-using Mono.Utilities;
-using Lucene.Net.Index;
-
-#if LEGACY_MODE
-
-namespace Monodoc
-{
- using Generators;
-
- public partial class RootTree
- {
- static IDocGenerator<string> rawGenerator = new RawGenerator ();
- static HtmlGenerator htmlGenerator = new HtmlGenerator (null);
-
- [Obsolete ("Use RawGenerator directly")]
- public XmlDocument GetHelpXml (string id)
- {
- var rendered = RenderUrl (id, rawGenerator);
- if (rendered == null)
- return null;
- var doc = new XmlDocument ();
- doc.LoadXml (RenderUrl (id, rawGenerator));
- return doc;
- }
-
- [Obsolete ("Use the RenderUrl variant accepting a generator")]
- public string RenderUrl (string url, out Node n)
- {
- return RenderUrl (url, htmlGenerator, out n);
- }
-
- [Obsolete ("Use GenerateIndex")]
- public static void MakeIndex (RootTree root)
- {
- root.GenerateIndex ();
- }
-
- [Obsolete ("Use GenerateSearchIndex")]
- public static void MakeSearchIndex (RootTree root)
- {
- root.GenerateSearchIndex ();
- }
- }
-}
-
-#endif
diff --git a/mcs/class/monodoc/Monodoc/SearchableDocument.cs b/mcs/class/monodoc/Monodoc/SearchableDocument.cs
deleted file mode 100644
index f7b9dba85ce..00000000000
--- a/mcs/class/monodoc/Monodoc/SearchableDocument.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-//
-// SearchableDocument.cs: Abstracts our model of document from the Lucene Document
-//
-// Author: Mario Sopena
-//
-using Lucene.Net.Documents;
-
-namespace Monodoc
-{
- struct SearchableDocument
- {
- public string Title {
- get; set;
- }
-
- public string Url {
- get; set;
- }
-
- public string FullTitle {
- get; set;
- }
-
- public string HotText {
- get; set;
- }
-
- public string Text {
- get; set;
- }
-
- public string Examples {
- get; set;
- }
-
- public SearchableDocument Reset ()
- {
- Title = Url = FullTitle = HotText = Text = Examples = null;
- return this;
- }
-
- public Document LuceneDoc {
- get {
- Document doc = new Document ();
- doc.Add (UnIndexed ("title", Title));
- doc.Add (UnIndexed ("url", Url));
- doc.Add (UnIndexed ("fulltitle", FullTitle ?? string.Empty));
- doc.Add (UnStored ("hottext", HotText));
- doc.Add (UnStored ("text", Text));
- doc.Add (UnStored ("examples", Examples));
- return doc;
- }
- }
-
- static Field UnIndexed(System.String name, System.String value_Renamed)
- {
- return new Field(name, value_Renamed, Field.Store.YES, Field.Index.NO);
- }
-
- static Field UnStored(System.String name, System.String value_Renamed)
- {
- return new Field(name, value_Renamed, Field.Store.NO, Field.Index.ANALYZED);
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/SearchableIndex.cs b/mcs/class/monodoc/Monodoc/SearchableIndex.cs
deleted file mode 100644
index f32340926e2..00000000000
--- a/mcs/class/monodoc/Monodoc/SearchableIndex.cs
+++ /dev/null
@@ -1,179 +0,0 @@
-//
-//
-// SearchableIndex.cs: Index that uses Lucene to search through the docs
-//
-// Author: Mario Sopena
-//
-
-using System;
-using System.IO;
-using System.Collections.Generic;
-// Lucene imports
-using Lucene.Net.Index;
-using Lucene.Net.Documents;
-using Lucene.Net.Analysis;
-using Lucene.Net.Analysis.Standard;
-using Lucene.Net.Search;
-using Lucene.Net.QueryParsers;
-using Lucene.Net.Store;
-
-namespace Monodoc
-{
- public class SearchableIndex
- {
- const int maxSearchCount = 30;
-
- IndexSearcher searcher;
- string dir;
-
- public string Dir {
- get {
- if (dir == null)
- dir = "search_index";
- return dir;
- }
- set { dir = value; }
- }
-
- public static SearchableIndex Load (string dir)
- {
- SearchableIndex s = new SearchableIndex ();
- s.dir = dir;
- try {
- //s.searcher = new IndexSearcher (dir);
- // TODO: parametrize that depending if we run on the desktop (low footprint) or the server (use RAMDirectory for instance)
- s.searcher = new IndexSearcher (FSDirectory.Open (dir));
- } catch (IOException) {
- Console.WriteLine ("Index nonexistent or in bad format");
- return null;
- }
- return s;
- }
-
- public Result Search (string term)
- {
- return Search (term, maxSearchCount);
- }
-
- public Result Search (string term, int count)
- {
- return Search (term, count, 0);
- }
-
- public Result Search (string term, int count, int start) {
- try {
- term = term.ToLower ();
- Term htTerm = new Term ("hottext", term);
- Query qq1 = new FuzzyQuery (htTerm);
- Query qq2 = new TermQuery (htTerm);
- qq2.Boost = 10f;
- Query qq3 = new PrefixQuery (htTerm);
- qq3.Boost = 10f;
- DisjunctionMaxQuery q1 = new DisjunctionMaxQuery (0f);
- q1.Add (qq1);
- q1.Add (qq2);
- q1.Add (qq3);
- Query q2 = new TermQuery (new Term ("text", term));
- q2.Boost = 3f;
- Query q3 = new TermQuery (new Term ("examples", term));
- q3.Boost = 3f;
- DisjunctionMaxQuery q = new DisjunctionMaxQuery (0f);
-
- q.Add (q1);
- q.Add (q2);
- q.Add (q3);
-
- TopDocs top = SearchInternal (q, count, start);
- Result r = new Result (term, searcher, top.ScoreDocs);
- return r;
- } catch (IOException) {
- Console.WriteLine ("No index in {0}", dir);
- return null;
- }
- }
-
- TopDocs SearchInternal (Query q, int count, int start)
- {
- // Easy path that doesn't involve creating a Collector ourselves
- // watch for Lucene.NET improvement on that (like searcher.SearchAfter)
- if (start == 0)
- return searcher.Search (q, count);
-
- var weight = searcher.CreateWeight (q); // TODO: reuse weight instead of query
- var collector = TopScoreDocCollector.Create (start + count + 1, false);
- searcher.Search (q, collector);
-
- return collector.TopDocs (start, count);
- }
-
- public Result FastSearch (string term, int number)
- {
- try {
- term = term.ToLower ();
- Query q1 = new TermQuery (new Term ("hottext", term));
- Query q2 = new PrefixQuery (new Term ("hottext", term));
- q2.Boost = 0.5f;
- DisjunctionMaxQuery q = new DisjunctionMaxQuery (0f);
- q.Add (q1);
- q.Add (q2);
- TopDocs top = searcher.Search (q, number);
- return new Result (term, searcher, top.ScoreDocs);
- } catch (IOException) {
- Console.WriteLine ("No index in {0}", dir);
- return null;
- }
- }
- }
-
- //
- // An object representing the search term with the results
- //
- public class Result {
- string term;
- Searcher searcher;
- ScoreDoc[] docs;
-
- public string Term {
- get { return term;}
- }
-
- public int Count {
- get { return docs.Length; }
- }
-
- public Document this [int i] {
- get { return searcher.Doc (docs[i].Doc); }
- }
-
- public string GetTitle (int i)
- {
- Document d = this[i];
- return d == null ? string.Empty : d.Get ("title");
- }
-
- public string GetUrl (int i)
- {
- Document d = this[i];
- return d == null ? string.Empty : d.Get ("url");
- }
-
- public string GetFullTitle (int i)
- {
- Document d = this[i];
- return d == null ? string.Empty : d.Get ("fulltitle");
- }
-
- public float Score (int i)
- {
- return docs[i].Score;
- }
-
- public Result (string Term, Searcher searcher, ScoreDoc[] docs)
- {
- this.term = Term;
- this.searcher = searcher;
- this.docs = docs;
- }
- }
-}
-
diff --git a/mcs/class/monodoc/Monodoc/Tree.cs b/mcs/class/monodoc/Monodoc/Tree.cs
deleted file mode 100644
index 3ed9648f0ef..00000000000
--- a/mcs/class/monodoc/Monodoc/Tree.cs
+++ /dev/null
@@ -1,225 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Linq;
-using System.Xml;
-using System.Collections.Generic;
-
-namespace Monodoc
-{
- /// <summary>
- /// This tree is populated by the documentation providers, or populated
- /// from a binary encoding of the tree. The format of the tree is designed
- /// to minimize the need to load it in full.
- /// </summary>
-
- /* Ideally this class should also be abstracted to let user have something
- * else than a file as a backing store, a database for instance
- */
- public class Tree
-#if LEGACY_MODE
- : Node
-#endif
- {
- public const long CurrentVersionNumber = 1;
- const int VersionNumberKey = -(int)'v';
- public readonly HelpSource HelpSource;
-
- FileStream InputStream;
- BinaryReader InputReader;
-
-#if !LEGACY_MODE
- // This is the node which contains all the other node of the tree
- Node rootNode;
-#endif
-
- /// <summary>
- /// Load from file constructor
- /// </summary>
- public Tree (HelpSource hs, string filename)
-#if LEGACY_MODE
- : base (null, null)
-#endif
- {
- HelpSource = hs;
- Encoding utf8 = new UTF8Encoding (false, true);
-
- if (!File.Exists (filename)){
- throw new FileNotFoundException ();
- }
-
- InputStream = File.OpenRead (filename);
- InputReader = new BinaryReader (InputStream, utf8);
- byte [] sig = InputReader.ReadBytes (4);
-
- if (!GoodSig (sig))
- throw new Exception ("Invalid file format");
-
- InputStream.Position = 4;
- // Try to read old version information
- if (InputReader.ReadInt32 () == VersionNumberKey)
- VersionNumber = InputReader.ReadInt64 ();
- else {
- // We try to see if there is a version number at the end of the file
- InputStream.Seek (-(4 + 8), SeekOrigin.End); // VersionNumberKey + long
- try {
- if (InputReader.ReadInt32 () == VersionNumberKey)
- VersionNumber = InputReader.ReadInt64 ();
- } catch {}
- // We set the stream back at the beginning of the node definition list
- InputStream.Position = 4;
- }
-
- var position = InputReader.ReadInt32 ();
-#if !LEGACY_MODE
- rootNode = new Node (this, position);
-#else
- Address = position;
-#endif
- InflateNode (RootNode);
- }
-
- /// <summary>
- /// Tree creation and merged tree constructor
- /// </summary>
- public Tree (HelpSource hs, string caption, string url)
-#if !LEGACY_MODE
- : this (hs, null, caption, url)
- {
- }
-#else
- : base (caption, url)
- {
- HelpSource = hs;
- }
-#endif
-
-
- public Tree (HelpSource hs, Node parent, string caption, string element)
-#if LEGACY_MODE
- : base (parent, caption, element)
-#endif
- {
- HelpSource = hs;
-#if !LEGACY_MODE
- rootNode = parent == null ? new Node (this, caption, element) : new Node (parent, caption, element);
-#endif
- }
-
- /// <summary>
- /// Saves the tree into the specified file using the help file format.
- /// </summary>
- public void Save (string file)
- {
- Encoding utf8 = new UTF8Encoding (false, true);
- using (FileStream output = File.OpenWrite (file)){
- // Skip over the pointer to the first node.
- output.Position = 4 + 4;
-
- using (BinaryWriter writer = new BinaryWriter (output, utf8)) {
- // Recursively dump
- RootNode.Serialize (output, writer);
- // We want to generate 2.10 compatible files so we write the version number at the end
- writer.Write (VersionNumberKey);
- writer.Write (CurrentVersionNumber);
-
- output.Position = 0;
- writer.Write (new byte [] { (byte) 'M', (byte) 'o', (byte) 'H', (byte) 'P' });
- writer.Write (RootNode.Address);
- }
- }
- }
-
- public Node RootNode {
- get {
-#if LEGACY_MODE
- return this;
-#else
- return rootNode;
-#endif
- }
- }
-
- public long VersionNumber {
- get;
- private set;
- }
-
- static bool GoodSig (byte [] sig)
- {
- if (sig.Length != 4)
- return false;
- return sig [0] == (byte) 'M'
- && sig [1] == (byte) 'o'
- && sig [2] == (byte) 'H'
- && sig [3] == (byte) 'P';
- }
-
- public void InflateNode (Node baseNode)
- {
- var address = baseNode.Address;
- if (address < 0)
- address = -address;
-
- InputStream.Position = address;
- baseNode.Deserialize (InputReader);
- }
-
- // Nodes use this value to know if they should manually re-sort their child
- // if they come from an older generator version
- internal bool ForceResort {
- get {
- return VersionNumber == 0;
- }
- }
- }
-
- public static class TreeDumper
- {
- static int indent;
-
- static void Indent ()
- {
- for (int i = 0; i < indent; i++)
- Console.Write (" ");
- }
-
- public static void PrintTree (Node node)
- {
- Indent ();
- Console.WriteLine ("{0},{1}\t[PublicUrl: {2}]", node.Element, node.Caption, node.PublicUrl);
- if (node.ChildNodes.Count == 0)
- return;
-
- indent++;
- foreach (Node n in node.ChildNodes)
- PrintTree (n);
- indent--;
- }
-
- public static string ExportToTocXml (Node root, string title, string desc)
- {
- if (root == null)
- throw new ArgumentNullException ("root");
- // Return a toc index of sub-nodes
- StringBuilder buf = new StringBuilder ();
- var writer = XmlWriter.Create (buf);
- writer.WriteStartElement ("toc");
- writer.WriteAttributeString ("title", title ?? string.Empty);
- writer.WriteElementString ("description", desc ?? string.Empty);
- writer.WriteStartElement ("list");
- foreach (Node n in root.ChildNodes) {
- writer.WriteStartElement ("item");
- writer.WriteAttributeString ("url", n.Element);
- writer.WriteValue (n.Caption);
- writer.WriteEndElement ();
- }
- writer.WriteEndElement ();
- writer.WriteEndElement ();
- writer.Flush ();
- writer.Close ();
-
- return buf.ToString ();
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/TypeUtils.cs b/mcs/class/monodoc/Monodoc/TypeUtils.cs
deleted file mode 100644
index 33a2838b926..00000000000
--- a/mcs/class/monodoc/Monodoc/TypeUtils.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System;
-
-namespace Monodoc
-{
- public static class TypeUtils
- {
- public static bool GetNamespaceAndType (string url, out string ns, out string type)
- {
- int nsidx = -1;
- int numLt = 0;
- for (int i = 0; i < url.Length; ++i) {
- char c = url [i];
- switch (c) {
- case '<':
- case '{':
- ++numLt;
- break;
- case '>':
- case '}':
- --numLt;
- break;
- case '.':
- if (numLt == 0)
- nsidx = i;
- break;
- }
- }
-
- if (nsidx == -1) {
- ns = null;
- type = null;
- return false;
- }
- ns = url.Substring (0, nsidx);
- type = url.Substring (nsidx + 1);
-
- return true;
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/cache.cs b/mcs/class/monodoc/Monodoc/cache.cs
deleted file mode 100644
index f10320230db..00000000000
--- a/mcs/class/monodoc/Monodoc/cache.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System;
-using System.Linq;
-using System.IO;
-using System.Configuration;
-using System.Collections.Specialized;
-using Monodoc.Caches;
-
-namespace Monodoc
-{
- public enum DocEntity
- {
- Text,
- Blob
- }
-
- public interface IDocCache : IDisposable
- {
- bool IsCached (string id);
- bool CanCache (DocEntity entity);
-
- Stream GetCachedStream (string id);
- string GetCachedString (string id);
-
- void CacheText (string id, string content);
- void CacheText (string id, Stream stream);
-
- void CacheBlob (string id, byte[] data);
- void CacheBlob (string id, Stream stream);
- }
-
- public static class DocCacheHelper
- {
- static string cacheBaseDirectory;
-
- static DocCacheHelper ()
- {
- try {
- var cacheConfig = Config.Get ("cache");
- if (cacheConfig == null) return;
- var cacheValues = cacheConfig.Split (',');
- if (cacheValues.Length == 2 && cacheValues[0].Equals ("file", StringComparison.Ordinal))
- cacheBaseDirectory = cacheValues[1].Replace ("~", Environment.GetFolderPath (Environment.SpecialFolder.Personal));
- } catch {}
- }
-
- // Use configuration option to query for cache directory, if it doesn't exist we instantiate a nullcache
- public static IDocCache GetDefaultCache (string name)
- {
- if (cacheBaseDirectory == null)
- return new NullCache ();
-
- return new FileCache (Path.Combine (cacheBaseDirectory, name));
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/caches/FileCache.cs b/mcs/class/monodoc/Monodoc/caches/FileCache.cs
deleted file mode 100644
index 75ccdd8ab75..00000000000
--- a/mcs/class/monodoc/Monodoc/caches/FileCache.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-using System;
-using System.IO;
-
-namespace Monodoc.Caches
-{
- public class FileCache : IDocCache
- {
- string baseCacheDir;
-
- public FileCache (string baseCacheDir)
- {
- this.baseCacheDir = baseCacheDir;
- if (!Directory.Exists (baseCacheDir))
- Directory.CreateDirectory (baseCacheDir);
- }
-
- public bool IsCached (string id)
- {
- return File.Exists (MakePath (id));
- }
-
- public bool CanCache (DocEntity entity)
- {
- return true;
- }
-
- public Stream GetCachedStream (string id)
- {
- return File.OpenRead (MakePath (id));
- }
-
- public string GetCachedString (string id)
- {
- return File.ReadAllText (MakePath (id));
- }
-
- public void CacheText (string id, string content)
- {
- File.WriteAllText (MakePath (id), content);
- }
-
- public void CacheText (string id, Stream stream)
- {
- using (var file = File.OpenWrite (MakePath (id)))
- stream.CopyTo (file);
- }
-
- public void CacheBlob (string id, byte[] data)
- {
- File.WriteAllBytes (MakePath (id), data);
- }
-
- public void CacheBlob (string id, Stream stream)
- {
- using (var file = File.OpenWrite (MakePath (id)))
- stream.CopyTo (file);
- }
-
- string MakePath (string id)
- {
- id = id.Replace (Path.DirectorySeparatorChar, '_');
- return Path.Combine (baseCacheDir, id);
- }
-
- public void Dispose ()
- {
- if (!Directory.Exists (baseCacheDir))
- return;
-
- try {
- Directory.Delete (baseCacheDir, true);
- } catch {}
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/caches/NullCache.cs b/mcs/class/monodoc/Monodoc/caches/NullCache.cs
deleted file mode 100644
index 628397efd64..00000000000
--- a/mcs/class/monodoc/Monodoc/caches/NullCache.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-using System;
-using System.IO;
-
-namespace Monodoc.Caches
-{
- // This is basically a no-cache implementation
- public class NullCache : IDocCache
- {
- public bool IsCached (string id)
- {
- return false;
- }
-
- public bool CanCache (DocEntity entity)
- {
- return false;
- }
-
- public Stream GetCachedStream (string id)
- {
- return null;
- }
-
- public string GetCachedString (string id)
- {
- return null;
- }
-
- public void CacheText (string id, string content)
- {
-
- }
-
- public void CacheText (string id, Stream stream)
- {
-
- }
-
- public void CacheBlob (string id, byte[] data)
- {
-
- }
-
- public void CacheBlob (string id, Stream stream)
- {
-
- }
-
- public void Dispose ()
- {
-
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/generator.cs b/mcs/class/monodoc/Monodoc/generator.cs
deleted file mode 100644
index 9b117d41535..00000000000
--- a/mcs/class/monodoc/Monodoc/generator.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace Monodoc
-{
- // All type of documents that a generator may find as input
- public enum DocumentType {
- EcmaXml, // Our main monodoc format
- EcmaSpecXml,
- Man,
- AddinXml,
- MonoBook, // This is mostly XHTML already, just need a tiny bit of processing
- Html,
- TocXml, // Used by help source displaying some kind of toc of the content they host
- PlainText,
- ErrorXml
- }
-
- /* This interface defines a set of transformation engine
- * that convert multiple documentation source to a single output format
- */
- public interface IDocGenerator<TOutput>
- {
- /* This method is responsible for finding out the documentation type
- * for the given ID and use the right engine internally
- * The id can be accompanied by a context dictionary giving away extra
- * informtion to the renderer
- */
- TOutput Generate (HelpSource hs, string internalId, Dictionary<string, string> context);
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/generators/HtmlGenerator.cs b/mcs/class/monodoc/Monodoc/generators/HtmlGenerator.cs
deleted file mode 100644
index 7b157413c22..00000000000
--- a/mcs/class/monodoc/Monodoc/generators/HtmlGenerator.cs
+++ /dev/null
@@ -1,156 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Linq;
-using System.Collections.Generic;
-
-using Monodoc;
-
-namespace Monodoc.Generators
-{
- using Html;
-
- interface IHtmlExporter
- {
- string CssCode { get; }
- string Export (Stream input, Dictionary<string, string> extras);
- string Export (string input, Dictionary<string, string> extras);
- }
-
- public class HtmlGenerator : IDocGenerator<string>
- {
- const string cachePrefix = "htmlcached#";
-
- static string css_code;
-
- IDocCache defaultCache;
- static Dictionary<DocumentType, IHtmlExporter> converters;
-
- static HtmlGenerator ()
- {
- converters = new Dictionary<DocumentType, IHtmlExporter> {
- { DocumentType.EcmaXml, new Ecma2Html () },
- { DocumentType.Man, new Man2Html () },
- { DocumentType.TocXml, new Toc2Html () },
- { DocumentType.EcmaSpecXml, new Ecmaspec2Html () },
- { DocumentType.ErrorXml, new Error2Html () },
- { DocumentType.Html, new Idem () },
- { DocumentType.MonoBook, new MonoBook2Html () },
- { DocumentType.AddinXml, new Addin2Html () },
- { DocumentType.PlainText, new Idem () },
- };
- }
-
- public HtmlGenerator (IDocCache defaultCache)
- {
- this.defaultCache = defaultCache;
- }
-
- public string Generate (HelpSource hs, string id, Dictionary<string, string> context)
- {
- string specialPage = null;
- if (context != null && context.TryGetValue ("specialpage", out specialPage) && specialPage == "master-root")
- return GenerateMasterRootPage (hs != null ? hs.RootTree : null);
-
- if (id == "root:" && hs == null)
- return MakeEmptySummary ();
-
- if (hs == null || string.IsNullOrEmpty (id))
- return MakeHtmlError (string.Format ("Your request has found no candidate provider [hs=\"{0}\", id=\"{1}\"]",
- hs == null ? "(null)" : hs.Name, id ?? "(null)"));
-
- var cache = defaultCache ?? hs.Cache;
- if (cache != null && cache.IsCached (MakeCacheKey (hs, id, null)))
- return cache.GetCachedString (MakeCacheKey (hs, id, null));
-
- IEnumerable<string> parts;
- if (hs.IsMultiPart (id, out parts))
- return GenerateMultiPart (hs, parts, id, context);
-
- if (hs.IsRawContent (id))
- return hs.GetText (id) ?? string.Empty;
-
- DocumentType type = hs.GetDocumentTypeForId (id);
- if (cache != null && context != null && cache.IsCached (MakeCacheKey (hs, id, context)))
- return cache.GetCachedString (MakeCacheKey (hs, id, context));
-
- IHtmlExporter exporter;
- if (!converters.TryGetValue (type, out exporter))
- return MakeHtmlError (string.Format ("Input type '{0}' not supported",
- type.ToString ()));
- var result = hs.IsGeneratedContent (id) ?
- exporter.Export (hs.GetCachedText (id), context) :
- exporter.Export (hs.GetCachedHelpStream (id), context);
-
- if (cache != null)
- cache.CacheText (MakeCacheKey (hs, id, context), result);
- return result;
- }
-
- string GenerateMultiPart (HelpSource hs, IEnumerable<string> ids, string originalId, Dictionary<string, string> context)
- {
- var sb = new StringBuilder ();
- foreach (var id in ids)
- sb.AppendLine (Generate (hs, id, context));
-
- var cache = defaultCache ?? hs.Cache;
- if (cache != null)
- cache.CacheText (MakeCacheKey (hs, originalId, null), sb.ToString ());
- return sb.ToString ();
- }
-
- string GenerateMasterRootPage (RootTree rootTree)
- {
- if (rootTree == null)
- return string.Empty;
- var assembly = System.Reflection.Assembly.GetAssembly (typeof (HtmlGenerator));
- var hpStream = assembly.GetManifestResourceStream ("home.html");
- var home = new StreamReader (hpStream).ReadToEnd ();
- var links = string.Join (Environment.NewLine,
- rootTree.RootNode.ChildNodes.Select (n => string.Format ("<li><a href=\"{0}\">{1}</a></li>", n.Element, n.Caption)));
- return home.Replace ("@@API_DOCS@@", links);
- }
-
- public static string InlineCss {
- get {
- if (css_code != null)
- return css_code;
-
- System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly (typeof (HtmlGenerator));
- Stream str_css = assembly.GetManifestResourceStream ("base.css");
- StringBuilder sb = new StringBuilder ((new StreamReader (str_css)).ReadToEnd());
- sb.Replace ("@@FONT_FAMILY@@", "Sans Serif");
- sb.Replace ("@@FONT_SIZE@@", "100%");
- css_code = sb.ToString () + converters.Values
- .Select (c => c.CssCode)
- .Where (css => !string.IsNullOrEmpty (css))
- .DefaultIfEmpty (string.Empty)
- .Aggregate (string.Concat);
- return css_code;
- }
- set {
- css_code = value;
- }
- }
-
- string MakeHtmlError (string error)
- {
- return string.Format ("<html><head></head><body><p><em>Error:</em> {0}</p></body></html>", error);
- }
-
- string MakeEmptySummary ()
- {
- return @"<html><head></head><body><p><em>This node doesn't have a summary available</p></body></html>";
- }
-
- string MakeCacheKey (HelpSource hs, string page, IDictionary<string,string> extraParams)
- {
- var key = cachePrefix + hs.SourceID + page;
- if (extraParams != null && extraParams.Count > 0) {
- var paramPart = string.Join ("-", extraParams.Select (kvp => kvp.Key + kvp.Value));
- key += '_' + paramPart;
- }
- return key;
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/generators/RawGenerator.cs b/mcs/class/monodoc/Monodoc/generators/RawGenerator.cs
deleted file mode 100644
index 88439d8b22e..00000000000
--- a/mcs/class/monodoc/Monodoc/generators/RawGenerator.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Linq;
-using System.Collections.Generic;
-
-using Monodoc;
-
-namespace Monodoc.Generators
-{
- /// <summary>
- /// This generators returns the raw content of the HelpSource without any transformation
- /// </summary>
- public class RawGenerator : IDocGenerator<string>
- {
- public string Generate (HelpSource hs, string id, Dictionary<string, string> context)
- {
- if (hs == null || string.IsNullOrEmpty (id))
- return null;
-
- IEnumerable<string> parts;
- if (hs.IsMultiPart (id, out parts))
- return GenerateMultiPart (hs, parts, id, context);
-
- if (hs.IsRawContent (id))
- return hs.GetText (id) ?? string.Empty;
-
- var result = hs.IsGeneratedContent (id) ? hs.GetCachedText (id) : new StreamReader (hs.GetCachedHelpStream (id)).ReadToEnd ();
-
- return result;
- }
-
- string GenerateMultiPart (HelpSource hs, IEnumerable<string> ids, string originalId, Dictionary<string, string> context)
- {
- var sb = new StringBuilder ();
- foreach (var id in ids)
- sb.AppendLine (Generate (hs, id, context));
- return sb.ToString ();
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/generators/html/Addin2Html.cs b/mcs/class/monodoc/Monodoc/generators/html/Addin2Html.cs
deleted file mode 100644
index 2cd5ea0366d..00000000000
--- a/mcs/class/monodoc/Monodoc/generators/html/Addin2Html.cs
+++ /dev/null
@@ -1,197 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Xml;
-using System.Xml.Xsl;
-using System.Xml.XPath;
-using System.Collections.Generic;
-
-namespace Monodoc.Generators.Html
-{
- public class Addin2Html : IHtmlExporter
- {
- public string CssCode {
- get {
- return string.Empty;
- }
- }
-
- public string Export (Stream stream, Dictionary<string, string> extraArgs)
- {
- using (var reader = new StreamReader (stream))
- return Htmlize (GetAddin (reader, extraArgs["AddinID"]),
- extraArgs["show"],
- extraArgs["AddinID"],
- extraArgs["FileID"],
- extraArgs["NodeID"]);
- }
-
- public string Export (string input, Dictionary<string, string> extraArgs)
- {
- return Htmlize (GetAddin (new StringReader (input), extraArgs["AddinID"]),
- extraArgs["show"],
- extraArgs["AddinID"],
- extraArgs["FileID"],
- extraArgs["NodeID"]);
- }
-
- XmlElement GetAddin (TextReader reader, string addinId)
- {
- XmlDocument doc = new XmlDocument ();
- doc.Load (reader);
- XmlElement addin = (XmlElement) doc.SelectSingleNode ("Addins/Addin[@fullId='" + addinId + "']");
- return addin != null ? addin : null;
- }
-
- public string Htmlize (XmlElement addin, string urlType, string addinId, string fileId, string path)
- {
- if (urlType == Monodoc.Providers.AddinsHelpSource.AddinPrefix)
- return GetAddinTextFromUrl (addin, addinId, fileId);
- else if (urlType == Monodoc.Providers.AddinsHelpSource.ExtensionPrefix)
- return GetExtensionTextFromUrl (addin, addinId, fileId, path);
- else if (urlType == Monodoc.Providers.AddinsHelpSource.ExtensionNodePrefix)
- return GetExtensionNodeTextFromUrl (addin, addinId, fileId, path);
-
- return null;
- }
-
- protected string GetAddinTextFromUrl (XmlElement addin, string addinId, string fileId)
- {
- if (addin == null)
- return "<html>Add-in not found: " + addinId + "</html>";
-
- StringBuilder sb = new StringBuilder ("<html>");
- sb.Append ("<h1>").Append (addin.GetAttribute ("name")).Append ("</h1>");
- XmlElement docs = (XmlElement) addin.SelectSingleNode ("Description");
- if (docs != null)
- sb.Append (docs.InnerText);
-
- sb.Append ("<p><table border=\"1\" cellpadding=\"4\" cellspacing=\"0\">");
- sb.AppendFormat ("<tr><td><b>Id</b></td><td>{0}</td></tr>", addin.GetAttribute ("addinId"));
- sb.AppendFormat ("<tr><td><b>Namespace</b></td><td>{0}</td></tr>", addin.GetAttribute ("namespace"));
- sb.AppendFormat ("<tr><td><b>Version</b></td><td>{0}</td></tr>", addin.GetAttribute ("version"));
- sb.Append ("</table></p>");
- sb.Append ("<p><b>Extension Points</b>:</p>");
- sb.Append ("<ul>");
-
- foreach (XmlElement ep in addin.SelectNodes ("ExtensionPoint")) {
- sb.AppendFormat ("<li><a href=\"extension-point:{0}#{1}#{2}\">{3}</li>", fileId, addinId, ep.GetAttribute ("path"), ep.GetAttribute ("name"));
- }
- sb.Append ("</ul>");
-
- sb.Append ("</html>");
- return sb.ToString ();
- }
-
- protected string GetExtensionTextFromUrl (XmlElement addin, string addinId, string fileId, string path)
- {
- if (addin == null)
- return "<html>Add-in not found: " + addinId + "</html>";
-
- XmlElement ext = (XmlElement) addin.SelectSingleNode ("ExtensionPoint[@path='" + path + "']");
- if (ext == null)
- return "<html>Extension point not found: " + path + "</html>";
-
- StringBuilder sb = new StringBuilder ("<html>");
- sb.Append ("<h1>").Append (ext.GetAttribute ("name")).Append ("</h1>");
-
- path = path.Replace ("/", " <b>/</b> ");
- sb.Append ("<p><b>Path</b>: ").Append (path).Append ("</p>");
- XmlElement desc = (XmlElement) ext.SelectSingleNode ("Description");
- if (desc != null)
- sb.Append (desc.InnerText);
-
- sb.Append ("<p><b>Extension Nodes</b>:</p>");
- sb.Append ("<table border=\"1\" cellpadding=\"4\" cellspacing=\"0\">");
-
- foreach (XmlElement en in ext.SelectNodes ("ExtensionNode")) {
- string nid = en.GetAttribute ("id");
- string nname = en.GetAttribute ("name");
- string sdesc = "";
- desc = (XmlElement) en.SelectSingleNode ("Description");
- if (desc != null)
- sdesc = desc.InnerText;
-
- sb.AppendFormat ("<tr><td><a href=\"extension-node:{0}#{1}#{2}\">{3}</td><td>{4}</td></tr>", fileId, addinId, nid, nname, sdesc);
- }
- sb.Append ("</table>");
-
- sb.Append ("</html>");
- return sb.ToString ();
- }
-
- protected string GetExtensionNodeTextFromUrl (XmlElement addin, string addinId, string fileId, string nodeId)
- {
- if (addin == null)
- return "<html>Add-in not found: " + addinId + "</html>";
-
- XmlElement node = (XmlElement) addin.SelectSingleNode ("ExtensionNodeType[@id='" + nodeId + "']");
- if (node == null)
- return "<html>Extension point not found: " + nodeId + "</html>";
-
- StringBuilder sb = new StringBuilder ("<html>");
- sb.Append ("<h1>").Append (node.GetAttribute ("name")).Append ("</h1>");
- XmlElement desc = (XmlElement) node.SelectSingleNode ("Description");
- if (desc != null)
- sb.Append (desc.InnerText);
-
- sb.Append ("<p><b>Attributes</b>:</p>");
- sb.Append ("<table border=\"1\" cellpadding=\"4\" cellspacing=\"0\"><tr>");
- sb.Append ("<td><b>Name</b></td>");
- sb.Append ("<td><b>Type</b></td>");
- sb.Append ("<td><b>Required</b></td>");
- sb.Append ("<td><b>Localizable</b></td>");
- sb.Append ("<td><b>Description</b></td>");
- sb.Append ("<tr>");
- sb.Append ("<td>id</td>");
- sb.Append ("<td>System.String</td>");
- sb.Append ("<td></td>");
- sb.Append ("<td></td>");
- sb.Append ("<td>Identifier of the node.</td>");
- sb.Append ("</tr>");
-
- foreach (XmlElement at in node.SelectNodes ("Attributes/Attribute")) {
- sb.Append ("<tr>");
- sb.AppendFormat ("<td>{0}</td>", at.GetAttribute ("name"));
- sb.AppendFormat ("<td>{0}</td>", at.GetAttribute ("type"));
- if (at.GetAttribute ("required") == "True")
- sb.Append ("<td>Yes</td>");
- else
- sb.Append ("<td></td>");
- if (at.GetAttribute ("localizable") == "True")
- sb.Append ("<td>Yes</td>");
- else
- sb.Append ("<td></td>");
- string sdesc = "";
- desc = (XmlElement) at.SelectSingleNode ("Description");
- if (desc != null)
- sdesc = desc.InnerText;
-
- sb.AppendFormat ("<td>{0}</td>", sdesc);
- sb.Append ("</tr>");
- }
- sb.Append ("</table>");
-
- XmlNodeList children = node.SelectNodes ("ChildNodes/ExtensionNode");
- if (children.Count > 0) {
- sb.Append ("<p><b>Child Nodes</b>:</p>");
- sb.Append ("<table border=\"1\" cellpadding=\"4\" cellspacing=\"0\">");
-
- foreach (XmlElement en in children) {
- string nid = en.GetAttribute ("id");
- string nname = en.GetAttribute ("name");
- string sdesc = "";
- desc = (XmlElement) en.SelectSingleNode ("Description");
- if (desc != null)
- sdesc = desc.InnerText;
-
- sb.AppendFormat ("<tr><td><a href=\"extension-node:{0}#{1}#{2}\">{3}</td><td>{4}</td></tr>", fileId, addinId, nid, nname, sdesc);
- }
- sb.Append ("</table>");
- }
-
- sb.Append ("</html>");
- return sb.ToString ();
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/generators/html/Ecma2Html.cs b/mcs/class/monodoc/Monodoc/generators/html/Ecma2Html.cs
deleted file mode 100644
index 560c9619a3f..00000000000
--- a/mcs/class/monodoc/Monodoc/generators/html/Ecma2Html.cs
+++ /dev/null
@@ -1,333 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Linq;
-using System.Xml;
-using System.Xml.Xsl;
-using System.Xml.XPath;
-using System.Collections.Generic;
-
-using Mono.Documentation;
-using BF = System.Reflection.BindingFlags;
-
-namespace Monodoc.Generators.Html
-{
- public class Ecma2Html : IHtmlExporter
- {
- static string css_ecma;
- static string js;
- static XslCompiledTransform ecma_transform;
- readonly ExtensionObject ExtObject = new ExtensionObject ();
-
- public Ecma2Html ()
- {
- }
-
- public string CssCode {
- get {
- if (css_ecma != null)
- return css_ecma;
- var assembly = typeof(Ecma2Html).Assembly;
- Stream str_css = assembly.GetManifestResourceStream ("mono-ecma.css");
- css_ecma = (new StreamReader (str_css)).ReadToEnd();
- return css_ecma;
- }
- }
-
- public string JsCode {
- get {
- if (js != null)
- return js;
- var assembly = typeof(Ecma2Html).Assembly;
- Stream str_js = assembly.GetManifestResourceStream ("helper.js");
- js = (new StreamReader (str_js)).ReadToEnd();
- return js;
- }
- }
-
- public string Htmlize (XmlReader ecma_xml, Dictionary<string, string> extraArgs)
- {
- var args = new XsltArgumentList ();
- args.AddExtensionObject("monodoc:///extensions", ExtObject);
- string specialPage;
- if (extraArgs.TryGetValue ("specialpage", out specialPage) && specialPage == "root") {
- extraArgs.Remove ("specialpage");
- extraArgs["show"] = "masteroverview";
- }
-
- foreach (var kvp in extraArgs)
- args.AddParam (kvp.Key, string.Empty, kvp.Value);
-
- return Htmlize (ecma_xml, args);
- }
-
- public string Htmlize (XmlReader ecma_xml, XsltArgumentList args)
- {
- try{
- EnsureTransform ();
-
- var output = new StringBuilder ();
- ecma_transform.Transform (ecma_xml,
- args,
- XmlWriter.Create (output, ecma_transform.OutputSettings),
- CreateDocumentResolver ());
- return output.ToString ();
- }
- catch(Exception x)
- {
- var msg = x.ToString ();
- return msg;
- }
- }
-
- protected virtual XmlResolver CreateDocumentResolver ()
- {
- // results in using XmlUrlResolver
- return null;
- }
-
- public string Export (Stream stream, Dictionary<string, string> extraArgs)
- {
- return Htmlize (XmlReader.Create (new StreamReader(stream)), extraArgs);
- }
-
- public string Export (string input, Dictionary<string, string> extraArgs)
- {
- return Htmlize (XmlReader.Create (new StringReader(input)), extraArgs);
- }
-
-
- static void EnsureTransform ()
- {
- if (ecma_transform == null) {
- ecma_transform = new XslCompiledTransform ();
- var assembly = System.Reflection.Assembly.GetAssembly (typeof (Ecma2Html));
-
- Stream stream = assembly.GetManifestResourceStream ("mono-ecma-css.xsl");
- XmlReader xml_reader = new XmlTextReader (stream);
- XmlResolver r = new ManifestResourceResolver (".");
- ecma_transform.Load (xml_reader, XsltSettings.TrustedXslt, r);
- }
- }
-
- public class ExtensionObject
- {
- bool quiet = true;
- Dictionary<string, System.Reflection.Assembly> assemblyCache = new Dictionary<string, System.Reflection.Assembly> ();
-
- public string Colorize(string code, string lang)
- {
- return Mono.Utilities.Colorizer.Colorize(code,lang);
- }
-
- // Used by stylesheet to nicely reformat the <see cref=> tags.
- public string MakeNiceSignature(string sig, string contexttype)
- {
- if (sig.Length < 3)
- return sig;
- if (sig[1] != ':')
- return sig;
-
- char s = sig[0];
- sig = sig.Substring(2);
-
- switch (s) {
- case 'N': return sig;
- case 'T': return ShortTypeName (sig, contexttype);
-
- case 'C': case 'M': case 'P': case 'F': case 'E':
- string type, mem, arg;
-
- // Get arguments
- int paren;
- if (s == 'C' || s == 'M')
- paren = sig.IndexOf("(");
- else if (s == 'P')
- paren = sig.IndexOf("[");
- else
- paren = 0;
-
- if (paren > 0 && paren < sig.Length-1) {
- string[] args = sig.Substring(paren+1, sig.Length-paren-2).Split(',');
- for (int i = 0; i < args.Length; i++)
- args[i] = ShortTypeName(args[i], contexttype);
- arg = "(" + String.Join(", ", args) + ")";
- sig = sig.Substring(0, paren);
- } else {
- arg = string.Empty;
- }
-
- // Get type and member names
- int dot = sig.LastIndexOf(".");
- if (s == 'C' || dot <= 0 || dot == sig.Length-1) {
- mem = string.Empty;
- type = sig;
- } else {
- type = sig.Substring(0, dot);
- mem = sig.Substring(dot);
- }
-
- type = ShortTypeName(type, contexttype);
-
- return type + mem + arg;
-
- default:
- return sig;
- }
- }
-
- static string ShortTypeName(string name, string contexttype)
- {
- int dot = contexttype.LastIndexOf(".");
- if (dot < 0) return name;
- string contextns = contexttype.Substring(0, dot+1);
-
- if (name == contexttype)
- return name.Substring(dot+1);
-
- if (name.StartsWith(contextns))
- return name.Substring(contextns.Length);
-
- return name.Replace("+", ".");
- }
-
- string MonoImpInfo(string assemblyname, string typename, string membername, string arglist, bool strlong)
- {
- if (quiet)
- return string.Empty;
-
- var a = new List<string> ();
- if (!string.IsNullOrEmpty (arglist)) a.Add (arglist);
- return MonoImpInfo(assemblyname, typename, membername, a, strlong);
- }
-
- string MonoImpInfo(string assemblyname, string typename, string membername, XPathNodeIterator itr, bool strlong)
- {
- if (quiet)
- return string.Empty;
-
- var rgs = itr.Cast<XPathNavigator> ().Select (nav => nav.Value).ToList ();
-
- return MonoImpInfo (assemblyname, typename, membername, rgs, strlong);
- }
-
- string MonoImpInfo(string assemblyname, string typename, string membername, List<string> arglist, bool strlong)
- {
- try {
- System.Reflection.Assembly assembly = null;
-
- try {
- if (!assemblyCache.TryGetValue (assemblyname, out assembly)) {
- assembly = System.Reflection.Assembly.LoadWithPartialName(assemblyname);
- if (assembly != null)
- assemblyCache[assemblyname] = assembly;
- }
- } catch (Exception) {
- // nothing.
- }
-
- if (assembly == null) {
- /*if (strlong) return "The assembly " + assemblyname + " is not available to MonoDoc.";
- else return string.Empty;*/
- return string.Empty; // silently ignore
- }
-
- Type t = assembly.GetType(typename, false);
- if (t == null) {
- if (strlong)
- return typename + " has not been implemented.";
- else
- return "Not implemented.";
- }
-
- // The following code is flakey and fails to find existing members
- return string.Empty;
- } catch (Exception) {
- return string.Empty;
- }
- }
-
- string MonoImpInfo(System.Reflection.MemberInfo mi, string itemtype, bool strlong)
- {
- if (quiet)
- return string.Empty;
-
- string s = string.Empty;
-
- object[] atts = mi.GetCustomAttributes(true);
- int todoctr = 0;
- foreach (object att in atts) if (att.GetType().Name == "MonoTODOAttribute") todoctr++;
-
- if (todoctr > 0) {
- if (strlong)
- s = "This " + itemtype + " is marked as being unfinished.<BR/>\n";
- else
- s = "Unfinished.";
- }
-
- return s;
- }
-
- public string MonoImpInfo(string assemblyname, string typename, bool strlong)
- {
- if (quiet)
- return string.Empty;
-
- try {
- if (assemblyname == string.Empty)
- return string.Empty;
-
- System.Reflection.Assembly assembly;
- if (!assemblyCache.TryGetValue (assemblyname, out assembly)) {
- assembly = System.Reflection.Assembly.LoadWithPartialName(assemblyname);
- if (assembly != null)
- assemblyCache[assemblyname] = assembly;
- }
-
- if (assembly == null)
- return string.Empty;
-
- Type t = assembly.GetType(typename, false);
- if (t == null) {
- if (strlong)
- return typename + " has not been implemented.";
- else
- return "Not implemented.";
- }
-
- string s = MonoImpInfo(t, "type", strlong);
-
- if (strlong) {
- var mis = t.GetMembers (BF.Static | BF.Instance | BF.Public | BF.NonPublic);
-
- // Scan members for MonoTODO attributes
- int mctr = 0;
- foreach (var mi in mis) {
- string mii = MonoImpInfo(mi, null, false);
- if (mii != string.Empty) mctr++;
- }
- if (mctr > 0) {
- s += "This type has " + mctr + " members that are marked as unfinished.<BR/>";
- }
- }
-
- return s;
-
- } catch (Exception) {
- return string.Empty;
- }
- }
-
- public bool MonoEditing ()
- {
- return false;
- }
-
- public bool IsToBeAdded(string text)
- {
- return text.StartsWith ("To be added");
- }
- }
- }
-
-}
diff --git a/mcs/class/monodoc/Monodoc/generators/html/Ecmaspec2Html.cs b/mcs/class/monodoc/Monodoc/generators/html/Ecmaspec2Html.cs
deleted file mode 100644
index 3585b4842b6..00000000000
--- a/mcs/class/monodoc/Monodoc/generators/html/Ecmaspec2Html.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-using System;
-using System.IO;
-using System.Xml;
-using System.Xml.Xsl;
-using System.Xml.XPath;
-using System.Collections.Generic;
-
-namespace Monodoc.Generators.Html
-{
- public class Ecmaspec2Html : IHtmlExporter
- {
- static string css_ecmaspec;
- static XslTransform ecma_transform;
- static XsltArgumentList args = new XsltArgumentList();
-
- public string CssCode {
- get {
- if (css_ecmaspec != null)
- return css_ecmaspec;
- System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly (typeof (Ecmaspec2Html));
- Stream str_css = assembly.GetManifestResourceStream ("ecmaspec.css");
- css_ecmaspec = (new StreamReader (str_css)).ReadToEnd ();
- return css_ecmaspec;
- }
- }
-
- class ExtObj
- {
- public string Colorize (string code, string lang)
- {
- return Mono.Utilities.Colorizer.Colorize (code, lang);
- }
- }
-
- public string Export (Stream stream, Dictionary<string, string> extraArgs)
- {
- return Htmlize (new XPathDocument (stream));
- }
-
- public string Export (string input, Dictionary<string, string> extraArgs)
- {
- return Htmlize (new XPathDocument (new StringReader (input)));
- }
-
- static string Htmlize (XPathDocument ecma_xml)
- {
- if (ecma_transform == null){
- ecma_transform = new XslTransform ();
- System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly (typeof (Ecmaspec2Html));
- Stream stream;
- stream = assembly.GetManifestResourceStream ("ecmaspec-html-css.xsl");
-
- XmlReader xml_reader = new XmlTextReader (stream);
- ecma_transform.Load (xml_reader, null, null);
- args.AddExtensionObject ("monodoc:///extensions", new ExtObj ());
- }
-
- if (ecma_xml == null) return "";
-
- StringWriter output = new StringWriter ();
- ecma_transform.Transform (ecma_xml, args, output, null);
-
- return output.ToString ();
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/generators/html/Error2Html.cs b/mcs/class/monodoc/Monodoc/generators/html/Error2Html.cs
deleted file mode 100644
index 67e6c9c4899..00000000000
--- a/mcs/class/monodoc/Monodoc/generators/html/Error2Html.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Xml;
-using System.Xml.XPath;
-using System.Collections.Generic;
-
-namespace Monodoc.Generators.Html
-{
- public class Error2Html : IHtmlExporter
- {
- public string Export (string input, Dictionary<string, string> extraArgs)
- {
- return Htmlize (new XPathDocument (new StringReader (input)));
- }
-
- public string Export (Stream input, Dictionary<string, string> extraArgs)
- {
- return Htmlize (new XPathDocument (input));
- }
-
- public string CssCode {
- get {
- return @"
- #error_ref {
- background: #debcb0;
- border: 2px solid #782609;
- }
- div.summary {
- font-size: 110%;
- font-weight: bolder;
- }
- div.details {
- font-size: 110%;
- font-weight: bolder;
- }
- div.code_example {
- background: #f5f5dd;
- border: 1px solid black;
- padding-left: 1em;
- padding-bottom: 1em;
- margin-top: 1em;
- white-space: pre;
- margin-bottom: 1em;
- }
- div.code_ex_title {
- position: relative;
- top: -1em;
- left: 30%;
- background: #cdcd82;
- border: 1px solid black;
- color: black;
- font-size: 65%;
- text-transform: uppercase;
- width: 40%;
- padding: 0.3em;
- text-align: center;
- }";
- }
- }
-
- public string Htmlize (IXPathNavigable doc)
- {
- var navigator = doc.CreateNavigator ();
- var errorName = navigator.SelectSingleNode ("//ErrorDocumentation/ErrorName");
- var details = navigator.SelectSingleNode ("//ErrorDocumentation/Details");
-
- StringWriter sw = new StringWriter ();
- XmlWriter w = new XmlTextWriter (sw);
-
- WriteElementWithClass (w, "div", "header");
- w.WriteAttributeString ("id", "error_ref");
- WriteElementWithClass (w, "div", "subtitle", "Compiler Error Reference");
- WriteElementWithClass (w, "div", "title", "Error " + (errorName == null ? string.Empty : errorName.Value));
- w.WriteEndElement ();
-
- if (details != null) {
- WriteElementWithClass (w, "div", "summary", "Summary");
-
- var summary = details.SelectSingleNode ("/Summary");
- w.WriteValue (summary == null ? string.Empty : summary.Value);
-
- WriteElementWithClass (w, "div", "details", "Details");
- var de = details.SelectSingleNode ("/Details");
- w.WriteValue (de == null ? string.Empty : de.Value);
- }
-
- foreach (XPathNavigator xmp in navigator.Select ("//ErrorDocumentation/Examples/string")) {
- WriteElementWithClass (w, "div", "code_example");
- WriteElementWithClass (w, "div", "code_ex_title", "Example");
- w.WriteRaw (Mono.Utilities.Colorizer.Colorize (xmp.Value, "c#"));;
- w.WriteEndElement ();
- }
-
- w.Close ();
-
- return sw.ToString ();
- }
-
- void WriteElementWithClass (XmlWriter w, string element, string cls, string content = null)
- {
- w.WriteStartElement (element);
- w.WriteAttributeString ("class", cls);
- if (!string.IsNullOrEmpty (content)) {
- w.WriteValue (content);
- w.WriteEndElement ();
- }
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/generators/html/Idem.cs b/mcs/class/monodoc/Monodoc/generators/html/Idem.cs
deleted file mode 100644
index 0c020601866..00000000000
--- a/mcs/class/monodoc/Monodoc/generators/html/Idem.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Collections.Generic;
-
-using Monodoc;
-using Monodoc.Generators;
-
-namespace Monodoc.Generators.Html
-{
- // Input is expected to be already HTML so just return it
- public class Idem : IHtmlExporter
- {
- public string CssCode {
- get {
- return string.Empty;
- }
- }
-
- public string Export (Stream input, Dictionary<string, string> extraArgs)
- {
- if (input == null)
- return null;
- return new StreamReader (input).ReadToEnd ();
- }
-
- public string Export (string input, Dictionary<string, string> extraArgs)
- {
- if (string.IsNullOrEmpty (input))
- return null;
- return input;
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/generators/html/Man2Html.cs b/mcs/class/monodoc/Monodoc/generators/html/Man2Html.cs
deleted file mode 100644
index a065daf212c..00000000000
--- a/mcs/class/monodoc/Monodoc/generators/html/Man2Html.cs
+++ /dev/null
@@ -1,316 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Collections.Generic;
-
-using Monodoc;
-using Monodoc.Generators;
-
-namespace Monodoc.Generators.Html
-{
- public class Man2Html : IHtmlExporter
- {
- public string CssCode {
- get {
- return string.Empty;
- }
- }
-
- public string Export (Stream input, Dictionary<string, string> extraArgs)
- {
- if (input == null)
- return null;
- return GetTextFromReader (new StreamReader (input));
- }
-
- public string Export (string input, Dictionary<string, string> extraArgs)
- {
- if (string.IsNullOrEmpty (input))
- return null;
- return GetTextFromReader (new StringReader (input));
- }
-
- public static string GetTextFromReader (TextReader file)
- {
- string line;
- StateInfo s = new StateInfo ();
-
- while ((line = file.ReadLine ()) != null)
- ProcessLine (line, s);
-
- return s.output.ToString ();
- }
-
- enum ListState {
- None,
- Start,
- Title,
- }
-
- class StateInfo {
- public ListState ls;
- public Stack<string> tags = new Stack<string> ();
- public StringBuilder output = new StringBuilder ();
- }
-
- static void ProcessLine (string line, StateInfo s)
- {
- string[] parts = SplitLine (line);
- switch (parts [0]) {
- case ".\\\"": // comments
- case ".de": // define macro
- case ".if": // if
- case ".ne": // ???
- case "..": // end macro
- // ignore
- break;
- case ".I":
- s.output.Append ("<i>");
- Translate (parts, 1, s.output);
- s.output.Append ("</i>");
- break;
- case ".B":
- s.output.Append ("<b>");
- Translate (parts, 1, s.output);
- s.output.Append ("</b>");
- break;
- case ".br":
- Translate (parts, 1, s.output);
- s.output.Append ("<br />");
- break;
- case ".nf":
- Expect (s, "</p>");
- s.output.Append ("<pre>\n");
- s.tags.Push ("</pre>");
- break;
- case ".fi":
- Expect (s, "</pre>");
- break;
- case ".PP":
- Expect (s, "</p>", "</dd>", "</dl>");
- goto case ".Sp";
- case ".Sp":
- Expect (s, "</p>");
- s.output.Append ("<p>");
- Translate (parts, 1, s.output);
- s.tags.Push ("</p>");
- break;
- case ".RS":
- Expect (s, "</p>");
- s.output.Append ("<blockquote>");
- s.tags.Push ("</blockquote>");
- break;
- case ".RE":
- ClearUntil (s, "</blockquote>");
- break;
- case ".SH":
- ClearAll (s);
- s.output.Append ("<h2>");
- Translate (parts, 1, s.output);
- s.output.Append ("</h2>")
- .Append ("<blockquote>");
- s.tags.Push ("</blockquote>");
- break;
- case ".SS":
- s.output.Append ("<h3>");
- Translate (parts, 1, s.output);
- s.output.Append ("</h3>");
- break;
- case ".TH": {
- ClearAll (s);
- string name = "", extra = "";
- if (parts.Length >= 4 && parts [2].Trim ().Length == 0) {
- name = parts [1] + "(" + parts [3] + ")";
- if (parts.Length > 4) {
- int start = 4;
- if (parts [start].Trim ().Length == 0)
- ++start;
- extra = string.Join ("", parts, start, parts.Length-start);
- }
- }
- else
- name = string.Join ("", parts, 1, parts.Length-1);
- s.output.Append ("<table width=\"100%\" bgcolor=\"#b0c4da\">" +
- "<tr colspan=\"2\"><td>Manual Pages</td></tr>\n" +
- "<tr><td><h3>");
- Translate (name, s.output);
- s.output.Append ("</h3></td><td align=\"right\">");
- Translate (extra, s.output);
- s.output.Append ("</td></tr></table>");
- break;
- }
- case ".TP":
- Expect (s, "</p>");
- if (s.tags.Count > 0 && s.tags.Peek ().ToString () != "</dd>") {
- s.output.Append ("<dl>");
- s.tags.Push ("</dl>");
- }
- else
- Expect (s, "</dd>");
- s.output.Append ("<dt>");
- s.tags.Push ("</dt>");
- s.ls = ListState.Start;
- break;
- default:
- Translate (line, s.output);
- break;
- }
- if (s.ls == ListState.Start)
- s.ls = ListState.Title;
- else if (s.ls == ListState.Title) {
- Expect (s, "</dt>");
- s.output.Append ("<dd>");
- s.tags.Push ("</dd>");
- s.ls = ListState.None;
- }
- s.output.Append ("\n");
- }
-
- static string[] SplitLine (string line)
- {
- if (line.Length > 1 && line [0] != '.')
- return new string[]{null, line};
-
- int i;
- for (i = 0; i < line.Length; ++i) {
- if (char.IsWhiteSpace (line, i))
- break;
- }
-
- if (i == line.Length)
- return new string[]{line};
-
- var pieces = new List<string> ();
- pieces.Add (line.Substring (0, i));
- bool inQuotes = false;
- bool prevWs = true;
- ++i;
- int start = i;
- for ( ; i < line.Length; ++i) {
- char c = line [i];
- if (inQuotes) {
- if (c == '"') {
- Add (pieces, line, start, i);
- start = i+1;
- inQuotes = false;
- }
- }
- else {
- if (prevWs && c == '"') {
- Add (pieces, line, start, i);
- start = i+1;
- inQuotes = true;
- }
- else if (char.IsWhiteSpace (c)) {
- if (!prevWs) {
- Add (pieces, line, start, i);
- start = i;
- }
- prevWs = true;
- }
- else {
- if (prevWs) {
- Add (pieces, line, start, i);
- start = i;
- }
- prevWs = false;
- }
- }
- }
- if (start > 0 && start != line.Length)
- pieces.Add (line.Substring (start, line.Length-start));
- return pieces.ToArray ();
- }
-
- static void Add (List<string> pieces, string line, int start, int end)
- {
- if (start == end)
- return;
- pieces.Add (line.Substring (start, end-start));
- }
-
- static void Expect (StateInfo s, params string[] expected)
- {
- string e;
- while (s.tags.Count > 0 &&
- Array.IndexOf (expected, (e = s.tags.Peek ().ToString ())) >= 0) {
- s.output.Append (s.tags.Pop ().ToString ());
- }
- }
-
- static void ClearUntil (StateInfo s, string required)
- {
- string e = null;
- while (s.tags.Count > 0 &&
- (e = s.tags.Peek ().ToString ()) != required) {
- s.output.Append (s.tags.Pop ().ToString ());
- }
- if (e == required)
- s.output.Append (s.tags.Pop ().ToString ());
- }
-
- static void ClearAll (StateInfo s)
- {
- while (s.tags.Count > 0)
- s.output.Append (s.tags.Pop ().ToString ());
- }
-
- static void Translate (string[] lines, int startIndex, StringBuilder output)
- {
- if (lines.Length <= startIndex)
- return;
- do {
- Translate (lines [startIndex++], output);
- if (startIndex == lines.Length)
- break;
- } while (startIndex < lines.Length);
- }
-
- static void Translate (string line, StringBuilder output)
- {
- string span = null;
- int start = output.Length;
- for (int i = 0; i < line.Length; ++i) {
- switch (line [i]) {
- case '\\': {
- if ((i+2) < line.Length && line [i+1] == 'f') {
- if (line [i+2] == 'I') {
- output.Append ("<i>");
- span = "</i>";
- }
- else if (line [i+2] == 'B') {
- output.Append ("<b>");
- span = "</b>";
- }
- else if (line [i+2] == 'R' || line [i+2] == 'P') {
- output.Append (span);
- }
- else
- goto default;
- i += 2;
- }
- else if ((i+1) < line.Length) {
- output.Append (line [i+1]);
- ++i;
- }
- else
- goto default;
- break;
- }
- case '<':
- output.Append ("&lt;");
- break;
- case '>':
- output.Append ("&gt;");
- break;
- case '&':
- output.Append ("&amp;");
- break;
- default:
- output.Append (line [i]);
- break;
- }
- }
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/generators/html/MonoBook2Html.cs b/mcs/class/monodoc/Monodoc/generators/html/MonoBook2Html.cs
deleted file mode 100644
index 847c375c2c7..00000000000
--- a/mcs/class/monodoc/Monodoc/generators/html/MonoBook2Html.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Xml;
-using System.Collections.Generic;
-
-using Monodoc;
-using Monodoc.Generators;
-
-namespace Monodoc.Generators.Html
-{
- // Input is expected to be already HTML so just return it
- public class MonoBook2Html : IHtmlExporter
- {
- public string CssCode {
- get {
- return @" h3 {
- font-size: 18px;
- padding-bottom: 4pt;
- border-bottom: 2px solid #dddddd;
- }
-
- .api {
- border: 1px solid;
- padding: 10pt;
- margin: 10pt;
- }
-
- .api-entry {
- border-bottom: none;
- font-size: 18px;
- }
-
- .prototype {
- border: 1px solid;
- background-color: #f2f2f2;
- padding: 5pt;
- margin-top: 5pt;
- margin-bottom: 5pt;
- }
-
- .header {
- border: 1px solid !important;
- padding: 0 0 5pt 5pt !important;
- margin: 10pt !important;
- white-space: pre !important;
- font-family: monospace !important;
- font-weight: normal !important;
- font-size: 1em !important;
- }
-
- .code {
- border: 1px solid;
- padding: 0 0 5pt 5pt;
- margin: 10pt;
- white-space: pre;
- font-family: monospace;
- }
-";
- }
- }
-
- public string Export (Stream input, Dictionary<string, string> extraArgs)
- {
- if (input == null)
- return null;
- return FromXmlReader (XmlReader.Create (input));
- }
-
- public string Export (string input, Dictionary<string, string> extraArgs)
- {
- if (string.IsNullOrEmpty (input))
- return null;
- return FromXmlReader (XmlReader.Create (new StringReader (input)));
- }
-
- public string FromXmlReader (XmlReader reader)
- {
- if (!reader.ReadToDescendant ("head"))
- return null;
- if (!reader.ReadToNextSibling ("body"))
- return null;
-
- return reader.ReadInnerXml ();
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/generators/html/Toc2Html.cs b/mcs/class/monodoc/Monodoc/generators/html/Toc2Html.cs
deleted file mode 100644
index cb34b988509..00000000000
--- a/mcs/class/monodoc/Monodoc/generators/html/Toc2Html.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using System;
-using System.IO;
-using System.Xml;
-using System.Xml.Xsl;
-using System.Xml.XPath;
-using System.Reflection;
-using System.Collections.Generic;
-
-namespace Monodoc.Generators.Html
-{
- public class Toc2Html : IHtmlExporter
- {
- XslTransform transform;
-
- public Toc2Html ()
- {
- transform = new XslTransform ();
- var assembly = Assembly.GetAssembly (typeof (Toc2Html));
- var stream = assembly.GetManifestResourceStream ("toc-html.xsl");
- XmlReader xml_reader = new XmlTextReader (stream);
- transform.Load (xml_reader, null, null);
- }
-
- public string Export (Stream input, Dictionary<string, string> extraArgs)
- {
- var output = new StringWriter ();
- transform.Transform (new XPathDocument (input), null, output, null);
- return output.ToString ();
- }
-
- public string Export (string input, Dictionary<string, string> extraArgs)
- {
- var output = new StringWriter ();
- transform.Transform (new XPathDocument (new StringReader (input)), null, output, null);
- return output.ToString ();
- }
-
- public string CssCode {
- get {
- return string.Empty;
- }
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/index.cs b/mcs/class/monodoc/Monodoc/index.cs
deleted file mode 100644
index b9aefff7ca2..00000000000
--- a/mcs/class/monodoc/Monodoc/index.cs
+++ /dev/null
@@ -1,310 +0,0 @@
-//
-// index.cs: Handling of the index files
-//
-// Author:
-// Miguel de Icaza (miguel@xamarin.com)
-//
-// (C) 2003 Ximian, Inc.
-// Copyright 2003-2011 Novell Inc
-// Copyright 2011 Xamarin Inc.
-//
-// Possible file format optimizations:
-// * Do not use 4 bytes for each index entry, use 3 bytes
-// * Find a way of compressing strings, there are plenty of duplicates
-// Find common roots, and use an encoding that uses a root to compress data.
-// "System", "System.Data", "System.Data class"
-// 0: PLAIN: "System"
-// 1: PLAIN: " class"
-// 2: LINK0 PLAIN ".DATA"
-// 3: LINK0 LINK1
-//
-// Maybe split everything at spaces and dots, and encode that:
-// string-1-idx "System."
-// string-1-idx "Data"
-// 2-items [ string-1-idx string-2-idx]
-//
-// Other variations are possible; Like Archive "System", "System." when we
-// see "System.Data".
-//
-//
-
-using System;
-using System.IO;
-using System.Text;
-using System.Collections.Generic;
-
-namespace Monodoc
-{
- public class Topic
- {
- public readonly string Caption;
- public readonly string SortKey;
- public readonly string Url;
-
- public Topic (string caption, string sort_key, string url)
- {
- Caption = caption;
- SortKey = sort_key;
- Url = url;
- }
- }
-
- public class IndexEntry
- {
- List<Topic> topics;
-
- public int Position {
- get;
- private set;
- }
-
- public IList<Topic> Topics {
- get {
- return topics.AsReadOnly ();
- }
- }
-
- public int Count {
- get;
- private set;
- }
-
- public void Add (Topic t)
- {
- Count++;
- topics.Add (t);
- }
-
- public Topic this [int idx] {
- get {
- if (idx < 0 || idx > topics.Count)
- throw new ArgumentOutOfRangeException ("idx");
- return topics[idx];
- }
- }
-
- //
- // Constructor from a stream
- //
- public IndexEntry (FileStream fs, BinaryReader reader, int position)
- {
- Count = reader.ReadInt32 ();
- int caption_offset = reader.ReadInt32 ();
- string caption;
- topics = new List<Topic> (Count);
-
- int [] offsets = new int [Count];
- for (int i = 0; i < Count; i++)
- offsets [i] = reader.ReadInt32 ();
-
- fs.Position = caption_offset;
- caption = reader.ReadString ();
- for (int i = 0; i < Count; i++){
- fs.Position = offsets [i];
- string url = reader.ReadString ();
- topics.Add (new Topic (caption, string.Empty, url));
- }
- }
-
- //
- // Regular constructor
-
- public IndexEntry ()
- {
- topics = new List<Topic> ();
- }
-
- public void WriteTopics (IndexMaker maker, Stream stream, BinaryWriter writer)
- {
- //
- // Convention: entries with the same SortKey should have the same Caption
- //
- Position = (int) stream.Position;
- writer.Write (Count);
-
- if (Count == 0)
- return;
-
- writer.Write (maker.GetCode (topics[0].Caption));
- foreach (Topic t in topics)
- writer.Write (maker.GetCode (t.Url));
- }
- }
-
- public class IndexMaker
- {
- Dictionary<string, IndexEntry> entries = new Dictionary<string, IndexEntry> ();
- Dictionary<string, int> all_strings = new Dictionary<string, int> ();
- int index_position;
-
- void AddString (string str)
- {
- if (!all_strings.ContainsKey (str))
- all_strings.Add (str, 0);
- }
-
- public void AddTopic (Topic topic)
- {
- IndexEntry entry;
- if (!entries.TryGetValue (topic.SortKey, out entry)) {
- entry = new IndexEntry ();
- entries[topic.SortKey] = entry;
- }
-
- AddString (topic.SortKey);
- AddString (topic.Caption);
- AddString (topic.Url);
- entry.Add (topic);
- }
-
- public void Add (string caption, string sort_key, string url)
- {
- Topic t = new Topic (caption, sort_key, url);
- AddTopic (t);
- }
-
- void SaveStringTable (Stream stream, BinaryWriter writer)
- {
- var keys = new List<string> (all_strings.Keys);
- foreach (string s in keys) {
- int pos = (int) stream.Position;
- writer.Write (s);
- all_strings [s] = pos;
- }
- }
-
- public int GetCode (string s)
- {
- return all_strings [s];
- }
-
- void SaveTopics (Stream stream, BinaryWriter writer)
- {
- //
- // Convention: entries with the same SortKey should have the same Caption
- //
- foreach (IndexEntry e in entries.Values)
- e.WriteTopics (this, stream, writer);
- }
-
- void SaveIndexEntries (Stream stream, BinaryWriter writer)
- {
- index_position = (int) stream.Position;
- writer.Write (entries.Count);
- var keys = new List<string> (entries.Keys);
- keys.Sort (StringComparer.OrdinalIgnoreCase);
-
- foreach (string s in keys){
- IndexEntry e = entries [s];
- writer.Write (e.Position);
- }
- }
-
- public void Save (string filename)
- {
- Encoding utf8 = new UTF8Encoding (false, true);
-
- using (FileStream fs = File.OpenWrite (filename)){
- BinaryWriter writer = new BinaryWriter (fs, utf8);
- writer.Write (new byte [] { (byte) 'M',
- (byte) 'o', (byte) 'i',
- (byte) 'x'});
-
- // Leave room for pointer
- fs.Position = 8;
-
- SaveStringTable (fs, writer);
- SaveTopics (fs, writer);
-
- // index_position is set here
-
- SaveIndexEntries (fs, writer);
-
- fs.Position = 4;
- writer.Write (index_position);
- }
- }
- }
-
- public interface IListModel
- {
- int Rows { get; }
- string GetValue (int row);
- string GetDescription (int row);
- }
-
- public class IndexReader : IListModel
- {
- Encoding utf8 = new UTF8Encoding (false, true);
- FileStream fs;
- BinaryReader reader;
-
- // The offset of the table of entries
- int table_offset;
- int entries;
-
- static public IndexReader Load (string filename)
- {
- if (!File.Exists (filename))
- return null;
-
- try {
- return new IndexReader (filename);
- } catch {
- return null;
- }
- }
-
- IndexReader (string filename)
- {
- fs = File.OpenRead (filename);
- reader = new BinaryReader (fs, utf8);
-
- if (fs.ReadByte () != 'M' ||
- fs.ReadByte () != 'o' ||
- fs.ReadByte () != 'i' ||
- fs.ReadByte () != 'x'){
- throw new Exception ("Corrupt index");
- }
-
- // Seek to index_entries
- fs.Position = reader.ReadInt32 ();
-
- entries = reader.ReadInt32 ();
-
- table_offset = (int) fs.Position;
- }
-
- public int Rows {
- get {
- return entries;
- }
- }
-
- public string GetValue (int row)
- {
- fs.Position = row * 4 + table_offset;
- fs.Position = reader.ReadInt32 () + 4;
- int code = reader.ReadInt32 ();
- fs.Position = code;
- string caption = reader.ReadString ();
-
- return caption;
- }
-
- public string GetDescription (int row)
- {
- return GetValue (row);
- }
-
- public IndexEntry GetIndexEntry (int row)
- {
- fs.Position = row * 4 + table_offset;
- int entry_offset = reader.ReadInt32 ();
- fs.Position = entry_offset;
-
- return new IndexEntry (fs, reader, entry_offset);
- }
- }
-}
-
diff --git a/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs b/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs
deleted file mode 100644
index bf14a24cc42..00000000000
--- a/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs
+++ /dev/null
@@ -1,595 +0,0 @@
-using System;
-using System.Linq;
-using System.IO;
-using System.Text;
-using System.Xml;
-using System.Xml.Linq;
-using System.Collections.Generic;
-
-using Monodoc.Ecma;
-
-namespace Monodoc.Providers
-{
- public enum EcmaNodeType {
- Invalid,
- Namespace,
- Type,
- Member,
- Meta, // A node that's here to serve as a header for other node
- }
-
-
-
- // Common functionality between ecma-provider and ecmauncompiled-provider
- internal class EcmaDoc
- {
- static EcmaUrlParser parser = new EcmaUrlParser ();
-
- public static void PopulateTreeFromIndexFile (string indexFilePath,
- string idPrefix,
- Tree tree,
- IDocStorage storage,
- Dictionary<string, XElement> nsSummaries,
- Func<XElement, string> indexGenerator = null,
- IEcmaProviderFileSource fileSource = null)
- {
- fileSource = fileSource ?? DefaultEcmaProviderFileSource.Default;
- var root = tree.RootNode;
- int resID = 0;
- var asm = Path.GetDirectoryName (indexFilePath);
-
- storage = storage ?? new Storage.NullStorage ();
- // nsSummaries is allowed to be null if the user doesn't care about it
- nsSummaries = nsSummaries ?? new Dictionary<string, XElement> ();
- // default index generator uses a counter
- indexGenerator = indexGenerator ?? (_ => resID++.ToString ());
-
- using (var reader = fileSource.GetIndexReader (indexFilePath)) {
- reader.ReadToFollowing ("Types");
- var types = XElement.Load (reader.ReadSubtree ());
-
- foreach (var ns in types.Elements ("Namespace")) {
- var nsName = (string)ns.Attribute ("Name");
- nsName = !string.IsNullOrEmpty (nsName) ? nsName : "global";
- var nsNode = root.GetOrCreateNode (nsName, "N:" + nsName);
-
- XElement nsElements;
- if (!nsSummaries.TryGetValue (nsName, out nsElements))
- nsSummaries[nsName] = nsElements = new XElement ("elements",
- new XElement ("summary"),
- new XElement ("remarks"));
- //Add namespace summary and remarks data from file, if available
- var nsFileName = fileSource.GetNamespaceXmlPath(asm, nsName);
-
- if(File.Exists(nsFileName)){
- var nsEl = fileSource.GetNamespaceElement (nsFileName);
-
- nsElements.Element ("summary").ReplaceWith (nsEl.Descendants ("summary").First ());
- nsElements.Element ("remarks").ReplaceWith (nsEl.Descendants ("remarks").First ());
- }else{
- Console.WriteLine ("Error reading namespace XML for {0} at {1}", nsName, nsFileName);
- }
-
- foreach (var type in ns.Elements ("Type")) {
- // Add the XML file corresponding to the type to our storage
- var id = indexGenerator (type);
- string typeFilePath;
- var typeDocument = EcmaDoc.LoadTypeDocument (asm, nsName, type.Attribute ("Name").Value, out typeFilePath, fileSource);
- if (typeDocument == null)
- continue;
-
- // write the document (which may have been modified by the fileSource) to the storage
- MemoryStream io = new MemoryStream ();
- using (var writer = XmlWriter.Create (io)) {
- typeDocument.WriteTo (writer);
- }
- io.Seek (0, SeekOrigin.Begin);
- storage.Store (id, io);
-
- nsElements.Add (ExtractClassSummary (typeDocument));
-
- var typeCaption = EcmaDoc.GetTypeCaptionFromIndex (type);
- var url = idPrefix + id + '#' + typeCaption + '/';
- typeCaption = EcmaDoc.GetTypeCaptionFromIndex (type, true);
- var typeNode = nsNode.CreateNode (typeCaption, url);
-
- // Add meta "Members" node
- typeNode.CreateNode ("Members", "*");
- var membersNode = typeDocument.Root.Element ("Members");
- if (membersNode == null || !membersNode.Elements ().Any ())
- continue;
- var members = membersNode
- .Elements ("Member")
- .ToLookup (EcmaDoc.GetMemberType);
-
- foreach (var memberType in members) {
- // We pluralize the member type to get the caption and take the first letter as URL
- var node = typeNode.CreateNode (EcmaDoc.PluralizeMemberType (memberType.Key), memberType.Key[0].ToString ());
- var memberIndex = 0;
-
- var isCtors = memberType.Key[0] == 'C';
-
- // We do not escape much member name here
- foreach (var memberGroup in memberType.GroupBy (m => MakeMemberCaption (m, isCtors))) {
- if (memberGroup.Count () > 1) {
- // Generate overload
- var overloadCaption = MakeMemberCaption (memberGroup.First (), false);
- var overloadNode = node.CreateNode (overloadCaption, overloadCaption);
- foreach (var member in memberGroup)
- overloadNode.CreateNode (MakeMemberCaption (member, true), (memberIndex++).ToString ());
- overloadNode.Sort ();
- } else {
- // We treat constructor differently by showing their argument list in all cases
- node.CreateNode (MakeMemberCaption (memberGroup.First (), isCtors), (memberIndex++).ToString ());
- }
- }
- node.Sort ();
- }
- }
-
- nsNode.Sort ();
- }
- root.Sort ();
- }
- }
-
- // Utility methods
-
- public static XDocument LoadTypeDocument (string basePath, string nsName, string typeName, IEcmaProviderFileSource fileSource = null)
- {
- string dummy;
- return LoadTypeDocument (basePath, nsName, typeName, out dummy, fileSource ?? DefaultEcmaProviderFileSource.Default);
- }
-
- public static XDocument LoadTypeDocument (string basePath, string nsName, string typeName, out string finalPath, IEcmaProviderFileSource fileSource = null)
- {
- fileSource = fileSource ?? DefaultEcmaProviderFileSource.Default;
-
- finalPath = fileSource.GetTypeXmlPath (basePath, nsName, typeName);
- if (!File.Exists (finalPath)) {
- Console.Error.WriteLine ("Warning: couldn't process type file `{0}' as it doesn't exist", finalPath);
- return null;
- }
-
- XDocument doc = null;
- try {
- doc = fileSource.GetTypeDocument(finalPath);
- } catch (Exception e) {
- Console.WriteLine ("Document `{0}' is unparsable, {1}", finalPath, e.ToString ());
- }
-
- return doc;
- }
-
- public static string GetTypeCaptionFromIndex (XElement typeNodeFromIndex, bool full = false)
- {
- var t = typeNodeFromIndex;
- var c = ((string)(t.Attribute ("DisplayName") ?? t.Attribute ("Name"))).Replace ('+', '.');
- if (full)
- c += " " + (string)t.Attribute ("Kind");
- return c;
- }
-
- public static string PluralizeMemberType (string memberType)
- {
- switch (memberType) {
- case "Property":
- return "Properties";
- default:
- return memberType + "s";
- }
- }
-
- public static string GetMemberType (XElement m)
- {
- return m.Attribute ("MemberName").Value.StartsWith ("op_") ? "Operator" : m.Element ("MemberType").Value;
- }
-
- public static string MakeMemberCaption (XElement member, bool withArguments)
- {
- var caption = (string)member.Attribute ("MemberName");
- // Use type name instead of .ctor for cosmetic sake
- if (caption == ".ctor") {
- caption = (string)member.Ancestors ("Type").First ().Attribute ("Name");
- // If this is an inner type ctor, strip the parent type reference
- var plusIndex = caption.LastIndexOf ('+');
- if (plusIndex != -1)
- caption = caption.Substring (plusIndex + 1);
- }
- if (caption.StartsWith ("op_")) {
- string sig;
- caption = MakeOperatorSignature (member, out sig);
- caption = withArguments ? sig : caption;
- return caption;
- }
- if (withArguments) {
- var args = member.Element ("Parameters");
- caption += '(';
- if (args != null && args.Elements ("Parameter").Any ()) {
- caption += args.Elements ("Parameter")
- .Select (p => (string)p.Attribute ("Type"))
- .Aggregate ((p1, p2) => p1 + "," + p2);
- }
- caption += ')';
- }
-
- return caption;
- }
-
- public static Node MatchNodeWithEcmaUrl (string url, Tree tree)
- {
- Node result = null;
- EcmaDesc desc;
- if (!parser.TryParse (url, out desc))
- return null;
-
- // Namespace search
- Node currentNode = tree.RootNode;
- Node searchNode = new Node () { Caption = desc.Namespace };
- int index = currentNode.ChildNodes.BinarySearch (searchNode, EcmaGenericNodeComparer.Instance);
- if (index >= 0)
- result = currentNode.ChildNodes[index];
- if (desc.DescKind == EcmaDesc.Kind.Namespace || index < 0)
- return result;
-
- // Type search
- currentNode = result;
- result = null;
- searchNode.Caption = desc.ToCompleteTypeName ();
- if (!desc.GenericTypeArgumentsIsNumeric)
- index = currentNode.ChildNodes.BinarySearch (searchNode, EcmaTypeNodeComparer.Instance);
- else
- index = GenericTypeBacktickSearch (currentNode.ChildNodes, desc);
- if (index >= 0)
- result = currentNode.ChildNodes[index];
- if ((desc.DescKind == EcmaDesc.Kind.Type && !desc.IsEtc) || index < 0)
- return result;
-
- // Member selection
- currentNode = result;
- result = null;
- var caption = desc.IsEtc ? EtcKindToCaption (desc.Etc) : MemberKindToCaption (desc.DescKind);
- currentNode = FindNodeForCaption (currentNode.ChildNodes, caption);
- if (currentNode == null
- || (desc.IsEtc && desc.DescKind == EcmaDesc.Kind.Type && string.IsNullOrEmpty (desc.EtcFilter)))
- return currentNode;
-
- // Member search
- result = null;
- var format = desc.DescKind == EcmaDesc.Kind.Constructor ? EcmaDesc.Format.WithArgs : EcmaDesc.Format.WithoutArgs;
- searchNode.Caption = desc.ToCompleteMemberName (format);
- index = currentNode.ChildNodes.BinarySearch (searchNode, EcmaGenericNodeComparer.Instance);
- if (index < 0)
- return null;
- result = currentNode.ChildNodes[index];
- if (result.ChildNodes.Count == 0 || desc.IsEtc)
- return result;
-
- // Overloads search
- currentNode = result;
- searchNode.Caption = desc.ToCompleteMemberName (EcmaDesc.Format.WithArgs);
- index = currentNode.ChildNodes.BinarySearch (searchNode, EcmaGenericNodeComparer.Instance);
- if (index < 0)
- return result;
- result = result.ChildNodes[index];
-
- return result;
- }
-
- static int GenericTypeBacktickSearch (IList<Node> childNodes, EcmaDesc desc)
- {
- /* Our strategy is to search for the non-generic variant of the type
- * (which in most case should fail) and then use the closest index
- * to linearily search for the generic variant with the right generic arg number
- */
- var searchNode = new Node () { Caption = desc.TypeName };
- int index = childNodes.BinarySearch (searchNode, EcmaTypeNodeComparer.Instance);
- // Place the index in the right start position
- if (index < 0)
- index = ~index;
-
- for (int i = index; i < childNodes.Count; i++) {
- var currentNode = childNodes[i];
- // Find the index of the generic argument list
- int genericIndex = currentNode.Caption.IndexOf ('<');
- // If we are not on the same base type name anymore, there is no point
- int captionSlice = genericIndex != -1 ? genericIndex : currentNode.Caption.LastIndexOf (' ');
- if (string.Compare (searchNode.Caption, 0,
- currentNode.Caption, 0,
- Math.Max (captionSlice, searchNode.Caption.Length),
- StringComparison.Ordinal) != 0)
- break;
-
- var numGenerics = CountTypeGenericArguments (currentNode.Caption, genericIndex);
- if (numGenerics == desc.GenericTypeArguments.Count) {
- // Simple comparison if we are not looking for an inner type
- if (desc.NestedType == null)
- return i;
- // If more complicated, we fallback to using EcmaUrlParser
- var caption = currentNode.Caption;
- caption = "T:" + caption.Substring (0, caption.LastIndexOf (' ')).Replace ('.', '+');
- EcmaDesc otherDesc;
- var parser = new EcmaUrlParser ();
- if (parser.TryParse (caption, out otherDesc) && desc.NestedType.Equals (otherDesc.NestedType))
- return i;
- }
- }
-
- return -1;
- }
-
- // This comparer returns the answer straight from caption comparison
- class EcmaGenericNodeComparer : IComparer<Node>
- {
- public static readonly EcmaGenericNodeComparer Instance = new EcmaGenericNodeComparer ();
-
- public int Compare (Node n1, Node n2)
- {
- return string.Compare (n1.Caption, n2.Caption, StringComparison.Ordinal);
- }
- }
-
- // This comparer take into account the space in the caption
- class EcmaTypeNodeComparer : IComparer<Node>
- {
- public static readonly EcmaTypeNodeComparer Instance = new EcmaTypeNodeComparer ();
-
- public int Compare (Node n1, Node n2)
- {
- int length1 = CaptionLength (n1.Caption);
- int length2 = CaptionLength (n2.Caption);
-
- return string.Compare (n1.Caption, 0, n2.Caption, 0, Math.Max (length1, length2), StringComparison.Ordinal);
- }
-
- int CaptionLength (string caption)
- {
- var length = caption.LastIndexOf (' ');
- return length == -1 ? caption.Length : length;
- }
- }
-
- public static Dictionary<string, string> GetContextForEcmaNode (string hash, string sourceID, Node node)
- {
- var args = new Dictionary<string, string> ();
-
- args["source-id"] = sourceID;
-
- if (node != null) {
- var nodeType = GetNodeType (node);
- switch (nodeType) {
- case EcmaNodeType.Namespace:
- args["show"] = "namespace";
- args["namespace"] = node.Element.Substring ("N:".Length);
- break;
- case EcmaNodeType.Type:
- args["show"] = "typeoverview";
- break;
- case EcmaNodeType.Member:
- case EcmaNodeType.Meta:
- switch (GetNodeMemberTypeChar (node)){
- case 'C':
- args["membertype"] = "Constructor";
- break;
- case 'M':
- args["membertype"] = "Method";
- break;
- case 'P':
- args["membertype"] = "Property";
- break;
- case 'F':
- args["membertype"] = "Field";
- break;
- case 'E':
- args["membertype"] = "Event";
- break;
- case 'O':
- args["membertype"] = "Operator";
- break;
- case 'X':
- args["membertype"] = "ExtensionMethod";
- break;
- case '*':
- args["membertype"] = "All";
- break;
- }
-
- if (nodeType == EcmaNodeType.Meta) {
- args["show"] = "members";
- args["index"] = "all";
- } else {
- args["show"] = "member";
- args["index"] = node.Element;
- }
- break;
- }
- }
-
- if (!string.IsNullOrEmpty (hash))
- args["hash"] = hash;
-
- return args;
- }
-
- public static EcmaNodeType GetNodeType (Node node)
- {
- // We guess the node type by checking the depth level it's at in the tree
- int level = GetNodeLevel (node);
- switch (level) {
- case 0:
- return EcmaNodeType.Namespace;
- case 1:
- return EcmaNodeType.Type;
- case 2:
- return EcmaNodeType.Meta;
- case 3: // Here it's either a member or, in case of overload, a meta
- return node.IsLeaf ? EcmaNodeType.Member : EcmaNodeType.Meta;
- case 4: // At this level, everything is necessarily a member
- return EcmaNodeType.Member;
- default:
- return EcmaNodeType.Invalid;
- }
- }
-
- public static char GetNodeMemberTypeChar (Node node)
- {
- int level = GetNodeLevel (node);
- // We try to reach the member group node depending on node nested level
- switch (level) {
- case 2:
- return node.Element[0];
- case 3:
- return node.Parent.Element[0];
- case 4:
- return node.Parent.Parent.Element[0];
- default:
- throw new ArgumentException ("node", "Couldn't determine member type of node `" + node.Caption + "'");
- }
- }
-
- public static int GetNodeLevel (Node node)
- {
- int i = 0;
- for (; !node.Element.StartsWith ("root:/", StringComparison.OrdinalIgnoreCase); i++) {
- node = node.Parent;
- if (node == null)
- return i - 1;
- }
- return i - 1;
- }
-
- public static string EtcKindToCaption (char etc)
- {
- switch (etc) {
- case 'M':
- return "Methods";
- case 'P':
- return "Properties";
- case 'C':
- return "Constructors";
- case 'F':
- return "Fields";
- case 'E':
- return "Events";
- case 'O':
- return "Operators";
- case '*':
- return "Members";
- default:
- return null;
- }
- }
-
- public static string MemberKindToCaption (EcmaDesc.Kind kind)
- {
- switch (kind) {
- case EcmaDesc.Kind.Method:
- return "Methods";
- case EcmaDesc.Kind.Property:
- return "Properties";
- case EcmaDesc.Kind.Constructor:
- return "Constructors";
- case EcmaDesc.Kind.Field:
- return "Fields";
- case EcmaDesc.Kind.Event:
- return "Events";
- case EcmaDesc.Kind.Operator:
- return "Operators";
- default:
- return null;
- }
- }
-
- public static Node FindNodeForCaption (IList<Node> nodes, string caption)
- {
- foreach (var node in nodes)
- if (node.Caption.Equals (caption, StringComparison.OrdinalIgnoreCase))
- return node;
- return null;
- }
-
- public static int CountTypeGenericArguments (string typeDefinition, int startIndex = 0)
- {
- int nestedLevel = 0;
- int count = 0;
- bool started = false;
-
- foreach (char c in typeDefinition.Skip (startIndex)) {
- switch (c) {
- case '<':
- if (!started)
- count = 1;
- started = true;
- nestedLevel++;
- break;
- case ',':
- if (started && nestedLevel == 1)
- count++;
- break;
- case '>':
- nestedLevel--;
- break;
- }
- }
-
- return count;
- }
-
- internal static string MakeOperatorSignature (XElement member, out string memberSignature)
- {
- string name = (string)member.Attribute ("MemberName");
- var nicename = name.Substring(3);
- memberSignature = null;
-
- switch (name) {
- // unary operators: no overloading possible [ECMA-335 §10.3.1]
- case "op_UnaryPlus": // static R operator+ (T)
- case "op_UnaryNegation": // static R operator- (T)
- case "op_LogicalNot": // static R operator! (T)
- case "op_OnesComplement": // static R operator~ (T)
- case "op_Increment": // static R operator++ (T)
- case "op_Decrement": // static R operator-- (T)
- case "op_True": // static bool operator true (T)
- case "op_False": // static bool operator false (T)
- case "op_AddressOf": // static R operator& (T)
- case "op_PointerDereference": // static R operator* (T)
- memberSignature = nicename;
- break;
- // conversion operators: overloading based on parameter and return type [ECMA-335 §10.3.3]
- case "op_Implicit": // static implicit operator R (T)
- case "op_Explicit": // static explicit operator R (T)
- nicename = name.EndsWith ("Implicit") ? "ImplicitConversion" : "ExplicitConversion";
- string arg = (string)member.Element ("Parameters").Element ("Parameter").Attribute ("Type");
- string ret = (string)member.Element ("ReturnValue").Element ("ReturnType");
- memberSignature = arg + " to " + ret;
- break;
- // binary operators: overloading is possible [ECMA-335 §10.3.2]
- default:
- if (member.Element ("Parameters") != null)
- memberSignature =
- nicename + "("
- + string.Join (",", member.Element ("Parameters").Elements ("Parameter").Select (p => (string)p.Attribute ("Type")))
- + ")";
- break;
- }
-
- return nicename;
- }
-
- static XElement ExtractClassSummary (XDocument typeDoc)
- {
- string name = typeDoc.Root.Attribute("Name").Value;
- string fullName = typeDoc.Root.Attribute("FullName").Value;
- string assemblyName = typeDoc.Root.Element("AssemblyInfo") != null ? typeDoc.Root.Element("AssemblyInfo").Element("AssemblyName").Value : string.Empty;
- var docs = typeDoc.Root.Element("Docs");
- var summary = docs.Element("summary") ?? new XElement("summary");
- var remarks = docs.Element("remarks") ?? new XElement("remarks");
- return new XElement ("class",
- new XAttribute ("name", name ?? string.Empty),
- new XAttribute ("fullname", fullName ?? string.Empty),
- new XAttribute ("assembly", assemblyName ?? string.Empty),
- summary,
- remarks);
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/providers/addins-provider.cs b/mcs/class/monodoc/Monodoc/providers/addins-provider.cs
deleted file mode 100644
index a824e63e6df..00000000000
--- a/mcs/class/monodoc/Monodoc/providers/addins-provider.cs
+++ /dev/null
@@ -1,130 +0,0 @@
-// addins-provider.cs
-//
-// A provider to display Mono.Addins extension models
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2007 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using System.Linq;
-using System.Diagnostics;
-using System.Text;
-using System.IO;
-using System.Xml;
-using System.Collections.Generic;
-
-namespace Monodoc.Providers
-{
- public class AddinsProvider : Provider
- {
- string file;
-
- public AddinsProvider (string xmlModelFile)
- {
- file = xmlModelFile;
-
- if (!File.Exists (file))
- throw new FileNotFoundException (String.Format ("The file `{0}' does not exist", file));
- }
-
- public override void PopulateTree (Tree tree)
- {
- string fileId = Path.GetFileNameWithoutExtension (file);
- using (var f = File.OpenRead (file))
- tree.HelpSource.Storage.Store (fileId, f);
-
- XmlDocument doc = new XmlDocument ();
- doc.Load (file);
-
- foreach (XmlElement addin in doc.SelectNodes ("Addins/Addin")) {
-
- string addinId = addin.GetAttribute ("fullId");
- Node newNode = tree.RootNode.CreateNode (addin.GetAttribute ("name"), "addin:" + fileId + "#" + addinId);
-
- foreach (XmlElement node in addin.SelectNodes ("ExtensionPoint")) {
- string target = "extension-point:" + fileId + "#" + addinId + "#" + node.GetAttribute ("path");
- Node newExt = newNode.CreateNode (node.GetAttribute ("name"), target);
-
- foreach (XmlElement en in node.SelectNodes ("ExtensionNode")) {
- string nid = en.GetAttribute ("id");
- string nname = en.GetAttribute ("name");
- newExt.CreateNode (nname, "extension-node:" + fileId + "#" + addinId + "#" + nid);
- }
- }
- }
- }
-
- public override void CloseTree (HelpSource hs, Tree tree)
- {
- }
- }
-
- public class AddinsHelpSource : HelpSource
- {
- public AddinsHelpSource (string base_file, bool create) : base (base_file, create)
- {
- }
-
- internal protected const string AddinPrefix = "addin:";
- internal protected const string ExtensionPrefix = "extension-point:";
- internal protected const string ExtensionNodePrefix = "extension-node:";
-
- public override bool CanHandleUrl (string url)
- {
- return url.StartsWith (AddinPrefix, StringComparison.OrdinalIgnoreCase)
- || url.StartsWith (ExtensionPrefix, StringComparison.OrdinalIgnoreCase)
- || url.StartsWith (ExtensionNodePrefix, StringComparison.OrdinalIgnoreCase);
- }
-
- protected override string UriPrefix {
- get {
- return AddinPrefix;
- }
- }
-
- public override DocumentType GetDocumentTypeForId (string id)
- {
- return DocumentType.AddinXml;
- }
-
- public override string GetInternalIdForUrl (string url, out Node node, out Dictionary<string, string> context)
- {
- var id = base.GetInternalIdForUrl (url, out node, out context);
- var idParts = id.Split ('#');
- context = new Dictionary<string, string> ();
- context["FileID"] = idParts[0];
- context["AddinID"] = idParts[1];
- context["NodeID"] = idParts[2];
-
- return idParts[0];
- }
-
- public override Node MatchNode (string url)
- {
- var prefix = new[] { AddinPrefix, ExtensionPrefix, ExtensionNodePrefix }.First (p => url.StartsWith (p, StringComparison.OrdinalIgnoreCase));
- return base.MatchNode (prefix != null ? url.Substring (prefix.Length) : url);
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/providers/ecma-provider.cs b/mcs/class/monodoc/Monodoc/providers/ecma-provider.cs
deleted file mode 100644
index 4e82c2c7668..00000000000
--- a/mcs/class/monodoc/Monodoc/providers/ecma-provider.cs
+++ /dev/null
@@ -1,858 +0,0 @@
-//
-// The ecmaspec provider is for ECMA specifications
-//
-// Authors:
-// John Luke (jluke@cfl.rr.com)
-// Ben Maurer (bmaurer@users.sourceforge.net)
-//
-// Use like this:
-// mono assembler.exe --ecmaspec DIRECTORY --out name
-//
-
-using System;
-using System.Linq;
-using System.IO;
-using System.Text;
-using System.Xml;
-using System.Xml.Linq;
-using System.Collections.Generic;
-
-using Lucene.Net.Index;
-using Lucene.Net.Documents;
-
-using Monodoc.Ecma;
-using Mono.Utilities;
-
-namespace Monodoc.Providers
-{
- public interface IEcmaProviderFileSource {
- XmlReader GetIndexReader(string path);
- XDocument GetTypeDocument(string path);
- XElement GetNamespaceElement(string path);
- string GetTypeXmlPath(string basePath, string nsName, string typeName);
- string GetNamespaceXmlPath(string basePath, string ns);
- XElement ExtractNamespaceSummary (string path);
- }
-
- internal class DefaultEcmaProviderFileSource : IEcmaProviderFileSource {
- public static readonly IEcmaProviderFileSource Default = new DefaultEcmaProviderFileSource();
-
- public XmlReader GetIndexReader(string path) {
- return XmlReader.Create (File.OpenRead (path));
- }
-
- public XElement GetNamespaceElement(string path) {
- return XElement.Load (path);
- }
-
- public string GetTypeXmlPath(string basePath, string nsName, string typeName) {
- string finalPath = Path.Combine (basePath, nsName, Path.ChangeExtension (typeName, ".xml"));
- return finalPath;
- }
-
- public XDocument GetTypeDocument(string path) {
- return XDocument.Load (path);
- }
-
- public string GetNamespaceXmlPath(string basePath, string ns) {
- string finalPath = Path.Combine(basePath, String.Format("ns-{0}.xml", ns));
- return finalPath;
- }
-
- public XElement ExtractNamespaceSummary (string path)
- {
- using (var reader = XmlReader.Create (path)) {
- reader.ReadToFollowing ("Namespace");
- var name = reader.GetAttribute ("Name");
- var summary = reader.ReadToFollowing ("summary") ? XElement.Load (reader.ReadSubtree ()) : new XElement ("summary");
- var remarks = reader.ReadToFollowing ("remarks") ? XElement.Load (reader.ReadSubtree ()) : new XElement ("remarks");
-
- return new XElement ("namespace",
- new XAttribute ("ns", name ?? string.Empty),
- summary,
- remarks);
- }
- }
- }
-
- public class EcmaProvider : Provider
- {
- HashSet<string> directories = new HashSet<string> ();
- IEcmaProviderFileSource fileSource;
-
- public EcmaProvider ()
- {
- }
-
- public EcmaProvider (string baseDir)
- {
- AddDirectory (baseDir);
- }
-
- public IEcmaProviderFileSource FileSource {
- get {
- if (fileSource == null) {
- fileSource = new DefaultEcmaProviderFileSource();
- }
- return fileSource;
- }
- set { fileSource = value; }
- }
-
- public void AddDirectory (string directory)
- {
- if (string.IsNullOrEmpty (directory))
- throw new ArgumentNullException ("directory");
-
- directories.Add (directory);
- }
-
- public override void PopulateTree (Tree tree)
- {
- var storage = tree.HelpSource.Storage;
- var nsSummaries = new Dictionary<string, XElement> ();
- int resID = 0;
-
- foreach (var asm in directories) {
- var indexFilePath = Path.Combine (asm, "index.xml");
- if (!File.Exists (indexFilePath)) {
- Console.Error.WriteLine ("Warning: couldn't process directory `{0}' as it has no index.xml file", asm);
- continue;
- }
-
- EcmaDoc.PopulateTreeFromIndexFile (indexFilePath, EcmaHelpSource.EcmaPrefix, tree, storage, nsSummaries, _ => resID++.ToString (), FileSource);
- }
-
- foreach (var summary in nsSummaries)
- storage.Store ("xml.summary." + summary.Key, summary.Value.ToString ());
-
- var masterSummary = new XElement ("elements",
- directories
- .SelectMany (d => Directory.EnumerateFiles (d, "ns-*.xml"))
- .Select (FileSource.ExtractNamespaceSummary));
- storage.Store ("mastersummary.xml", masterSummary.ToString ());
- }
-
-
-
- public override void CloseTree (HelpSource hs, Tree tree)
- {
- AddImages (hs);
- AddExtensionMethods (hs);
- }
-
- void AddEcmaXml (HelpSource hs)
- {
- var xmls = directories
- .SelectMany (Directory.EnumerateDirectories) // Assemblies
- .SelectMany (Directory.EnumerateDirectories) // Namespaces
- .SelectMany (Directory.EnumerateFiles)
- .Where (f => f.EndsWith (".xml")); // Type XML files
-
- int resID = 0;
- foreach (var xml in xmls)
- using (var file = File.OpenRead (xml))
- hs.Storage.Store ((resID++).ToString (), file);
- }
-
- void AddImages (HelpSource hs)
- {
- var imgs = directories
- .SelectMany (Directory.EnumerateDirectories)
- .Select (d => Path.Combine (d, "_images"))
- .Where (Directory.Exists)
- .SelectMany (Directory.EnumerateFiles);
-
- foreach (var img in imgs)
- using (var file = File.OpenRead (img))
- hs.Storage.Store (Path.GetFileName (img), file);
- }
-
- void AddExtensionMethods (HelpSource hs)
- {
- var extensionMethods = directories
- .SelectMany (Directory.EnumerateDirectories)
- .Select (d => Path.Combine (d, "index.xml"))
- .Where (File.Exists)
- .Select (f => {
- using (var file = File.OpenRead (f)) {
- var reader = XmlReader.Create (file);
- reader.ReadToFollowing ("ExtensionMethods");
- return reader.ReadInnerXml ();
- }
- })
- .DefaultIfEmpty (string.Empty);
-
- hs.Storage.Store ("ExtensionMethods.xml",
- "<ExtensionMethods>" + extensionMethods.Aggregate (string.Concat) + "</ExtensionMethods>");
- }
-
- IEnumerable<string> GetEcmaXmls ()
- {
- return directories
- .SelectMany (Directory.EnumerateDirectories) // Assemblies
- .SelectMany (Directory.EnumerateDirectories) // Namespaces
- .SelectMany (Directory.EnumerateFiles)
- .Where (f => f.EndsWith (".xml")); // Type XML files
- }
- }
-
- public class EcmaHelpSource : HelpSource
- {
- internal const string EcmaPrefix = "ecma:";
- LRUCache<string, Node> cache = new LRUCache<string, Node> (4);
-
- public EcmaHelpSource (string base_file, bool create) : base (base_file, create)
- {
- }
-
- protected EcmaHelpSource () : base ()
- {
- }
-
- protected override string UriPrefix {
- get {
- return EcmaPrefix;
- }
- }
-
- public override bool CanHandleUrl (string url)
- {
- if (url.Length > 2 && url[1] == ':') {
- switch (url[0]) {
- case 'T':
- case 'M':
- case 'C':
- case 'P':
- case 'E':
- case 'F':
- case 'N':
- case 'O':
- return true;
- }
- }
- return base.CanHandleUrl (url);
- }
-
- // Clean the extra paramers in the id
- public override Stream GetHelpStream (string id)
- {
- var idParts = id.Split ('?');
- var name = idParts[0];
- if (name == "root:")
- name = "mastersummary.xml";
- return base.GetHelpStream (name);
- }
-
- public override Stream GetCachedHelpStream (string id)
- {
- var idParts = id.Split ('?');
- return base.GetCachedHelpStream (idParts[0]);
- }
-
- public override DocumentType GetDocumentTypeForId (string id)
- {
- return DocumentType.EcmaXml;
- }
-
- public override string GetPublicUrl (Node node)
- {
- string url = string.Empty;
- var type = EcmaDoc.GetNodeType (node);
- //Console.WriteLine ("GetPublicUrl {0} : {1} [{2}]", node.Element, node.Caption, type.ToString ());
- switch (type) {
- case EcmaNodeType.Namespace:
- return node.Element; // A namespace node has already a well formated internal url
- case EcmaNodeType.Type:
- return MakeTypeNodeUrl (node);
- case EcmaNodeType.Meta:
- return MakeTypeNodeUrl (GetNodeTypeParent (node)) + GenerateMetaSuffix (node);
- case EcmaNodeType.Member:
- var typeChar = EcmaDoc.GetNodeMemberTypeChar (node);
- var parentNode = GetNodeTypeParent (node);
- var typeNode = MakeTypeNodeUrl (parentNode).Substring (2);
- return typeChar + ":" + typeNode + MakeMemberNodeUrl (typeChar, node);
- default:
- return null;
- }
- }
-
- string MakeTypeNodeUrl (Node node)
- {
- // A Type node has a Element property of the form: 'ecma:{number}#{typename}/'
- var hashIndex = node.Element.IndexOf ('#');
- var typeName = node.Element.Substring (hashIndex + 1, node.Element.Length - hashIndex - 2);
- return "T:" + node.Parent.Caption + '.' + typeName.Replace ('.', '+');
- }
-
- string MakeMemberNodeUrl (char typeChar, Node node)
- {
- // We clean inner type ctor name which may contain the outer type name
- var caption = node.Caption;
-
- // Sanitize constructor caption of inner types
- if (typeChar == 'C') {
- int lastDot = -1;
- for (int i = 0; i < caption.Length && caption[i] != '('; i++)
- lastDot = caption[i] == '.' ? i : lastDot;
- return lastDot == -1 ? '.' + caption : caption.Substring (lastDot);
- }
-
- /* We handle type conversion operator by checking if the name contains " to "
- * (as in 'foo to bar') and we generate a corresponding conversion signature
- */
- if (typeChar == 'O' && caption.IndexOf (" to ") != -1) {
- var parts = caption.Split (' ');
- return "." + node.Parent.Caption + "(" + parts[0] + ", " + parts[2] + ")";
- }
-
- /* The goal here is to treat method which are explicit interface definition
- * such as 'void IDisposable.Dispose ()' for which the caption is a dot
- * expression thus colliding with the ecma parser.
- * If the first non-alpha character in the caption is a dot then we have an
- * explicit member implementation (we assume the interface has namespace)
- */
- var firstNonAlpha = caption.FirstOrDefault (c => !char.IsLetterOrDigit (c));
- if (firstNonAlpha == '.')
- return "$" + caption;
-
- return "." + caption;
- }
-
- Node GetNodeTypeParent (Node node)
- {
- // Type nodes are always at level 2 so we just need to get there
- while (node != null && node.Parent != null
- && !node.Parent.Parent.Element.StartsWith ("root:/", StringComparison.OrdinalIgnoreCase) && node.Parent.Parent.Parent != null)
- node = node.Parent;
- return node;
- }
-
- string GenerateMetaSuffix (Node node)
- {
- string suffix = string.Empty;
- // A meta node has always a type element to begin with
- while (EcmaDoc.GetNodeType (node) != EcmaNodeType.Type) {
- suffix = '/' + node.Element + suffix;
- node = node.Parent;
- }
- return suffix;
- }
-
- public override string GetInternalIdForUrl (string url, out Node node, out Dictionary<string, string> context)
- {
- var id = string.Empty;
- node = null;
- context = null;
-
- if (!url.StartsWith (UriPrefix, StringComparison.OrdinalIgnoreCase)) {
- node = MatchNode (url);
- if (node == null)
- return null;
- id = node.GetInternalUrl ();
- }
-
- string hash;
- id = GetInternalIdForInternalUrl (id, out hash);
- context = EcmaDoc.GetContextForEcmaNode (hash, SourceID.ToString (), node);
-
- return id;
- }
-
- public string GetInternalIdForInternalUrl (string internalUrl, out string hash)
- {
- var id = internalUrl;
- if (id.StartsWith (UriPrefix, StringComparison.OrdinalIgnoreCase))
- id = id.Substring (UriPrefix.Length);
- else if (id.StartsWith ("N:", StringComparison.OrdinalIgnoreCase))
- id = "xml.summary." + id.Substring ("N:".Length);
-
- var hashIndex = id.IndexOf ('#');
- hash = string.Empty;
- if (hashIndex != -1) {
- hash = id.Substring (hashIndex + 1);
- id = id.Substring (0, hashIndex);
- }
-
- return id;
- }
-
- public override Node MatchNode (string url)
- {
- Node node = null;
- if ((node = cache.Get (url)) == null) {
- node = EcmaDoc.MatchNodeWithEcmaUrl (url, Tree);
- if (node != null)
- cache.Put (url, node);
- }
- return node;
- }
-
- public override void PopulateIndex (IndexMaker index_maker)
- {
- foreach (Node ns_node in Tree.RootNode.ChildNodes){
- foreach (Node type_node in ns_node.ChildNodes){
- string typename = type_node.Caption.Substring (0, type_node.Caption.IndexOf (' '));
- string full = ns_node.Caption + "." + typename;
-
- string doc_tag = GetKindFromCaption (type_node.Caption);
- string url = type_node.PublicUrl;
-
- //
- // Add MonoMac/MonoTouch [Export] attributes, those live only in classes
- //
- XDocument type_doc = null;
- ILookup<string, XElement> prematchedMembers = null;
- bool hasExports = doc_tag == "Class" && (ns_node.Caption.StartsWith ("MonoTouch") || ns_node.Caption.StartsWith ("MonoMac"));
- if (hasExports) {
- try {
- string rest, hash;
- var id = GetInternalIdForInternalUrl (type_node.GetInternalUrl (), out hash);
- type_doc = XDocument.Load (GetHelpStream (id));
- prematchedMembers = type_doc.Root.Element ("Members").Elements ("Member").ToLookup (n => (string)n.Attribute ("MemberName"), n => n);
- } catch (Exception e) {
- Console.WriteLine ("Problem processing {0} for MonoTouch/MonoMac exports\n\n{0}", e);
- hasExports = false;
- }
- }
-
- if (doc_tag == "Class" || doc_tag == "Structure" || doc_tag == "Interface"){
- index_maker.Add (type_node.Caption, typename, url);
- index_maker.Add (full + " " + doc_tag, full, url);
-
- foreach (Node c in type_node.ChildNodes){
- switch (c.Caption){
- case "Constructors":
- index_maker.Add (" constructors", typename+"0", url + "/C");
- break;
- case "Fields":
- index_maker.Add (" fields", typename+"1", url + "/F");
- break;
- case "Events":
- index_maker.Add (" events", typename+"2", url + "/E");
- break;
- case "Properties":
- index_maker.Add (" properties", typename+"3", url + "/P");
- break;
- case "Methods":
- index_maker.Add (" methods", typename+"4", url + "/M");
- break;
- case "Operators":
- index_maker.Add (" operators", typename+"5", url + "/O");
- break;
- }
- }
-
- //
- // Now repeat, but use a different sort key, to make sure we come after
- // the summary data above, start the counter at 6
- //
- string keybase = typename + "6.";
-
- foreach (Node c in type_node.ChildNodes){
- var type = c.Caption[0];
-
- foreach (Node nc in c.ChildNodes) {
- string res = nc.Caption;
- string nurl = nc.PublicUrl;
-
- // Process exports
- if (hasExports && (type == 'C' || type == 'M' || type == 'P')) {
- try {
- var member = GetMemberFromCaption (type_doc, type == 'C' ? ".ctor" : res, false, prematchedMembers);
- var exports = member.Descendants ("AttributeName").Where (a => a.Value.Contains ("Foundation.Export"));
- foreach (var exportNode in exports) {
- var parts = exportNode.Value.Split ('"');
- if (parts.Length != 3) {
- Console.WriteLine ("Export attribute not found or not usable in {0}", exportNode);
- } else {
- var export = parts[1];
- index_maker.Add (export + " selector", export, nurl);
- }
- }
- } catch (Exception e) {
- Console.WriteLine ("Problem processing {0}/{1} for MonoTouch/MonoMac exports\n\n{2}", nurl, res, e);
- }
- }
-
- switch (type){
- case 'C':
- break;
- case 'F':
- index_maker.Add (String.Format ("{0}.{1} field", typename, res),
- keybase + res, nurl);
- index_maker.Add (String.Format ("{0} field", res), res, nurl);
- break;
- case 'E':
- index_maker.Add (String.Format ("{0}.{1} event", typename, res),
- keybase + res, nurl);
- index_maker.Add (String.Format ("{0} event", res), res, nurl);
- break;
- case 'P':
- index_maker.Add (String.Format ("{0}.{1} property", typename, res),
- keybase + res, nurl);
- index_maker.Add (String.Format ("{0} property", res), res, nurl);
- break;
- case 'M':
- index_maker.Add (String.Format ("{0}.{1} method", typename, res),
- keybase + res, nurl);
- index_maker.Add (String.Format ("{0} method", res), res, nurl);
- break;
- case 'O':
- index_maker.Add (String.Format ("{0}.{1} operator", typename, res),
- keybase + res, nurl);
- break;
- }
- }
- }
- } else if (doc_tag == "Enumeration"){
- //
- // Enumerations: add the enumeration values
- //
- index_maker.Add (type_node.Caption, typename, url);
- index_maker.Add (full + " " + doc_tag, full, url);
-
- // Now, pull the values.
- string rest, hash;
- var id = GetInternalIdForInternalUrl (type_node.GetInternalUrl (), out hash);
- var xdoc = XDocument.Load (GetHelpStream (id));
- if (xdoc == null)
- continue;
-
- var members = xdoc.Root.Element ("Members").Elements ("Members");
- if (members == null)
- continue;
-
- foreach (var member_node in members){
- string enum_value = member_node.Attribute ("MemberName").Value;
- string caption = enum_value + " value";
- index_maker.Add (caption, caption, url);
- }
- } else if (doc_tag == "Delegate"){
- index_maker.Add (type_node.Caption, typename, url);
- index_maker.Add (full + " " + doc_tag, full, url);
- }
- }
- }
- }
-
-
- public override void PopulateSearchableIndex (IndexWriter writer)
- {
- StringBuilder text = new StringBuilder ();
- SearchableDocument searchDoc = new SearchableDocument ();
-
- foreach (Node ns_node in Tree.RootNode.ChildNodes) {
- foreach (Node type_node in ns_node.ChildNodes) {
- string typename = type_node.Caption.Substring (0, type_node.Caption.IndexOf (' '));
- string full = ns_node.Caption + "." + typename;
- string url = type_node.PublicUrl;
- string doc_tag = GetKindFromCaption (type_node.Caption);
- string rest, hash;
- var id = GetInternalIdForInternalUrl (type_node.GetInternalUrl (), out hash);
- var xdoc = XDocument.Load (GetHelpStream (id));
- if (xdoc == null)
- continue;
- if (string.IsNullOrEmpty (doc_tag))
- continue;
-
- // For classes, structures or interfaces add a doc for the overview and
- // add a doc for every constructor, method, event, ...
- // doc_tag == "Class" || doc_tag == "Structure" || doc_tag == "Interface"
- if (doc_tag[0] == 'C' || doc_tag[0] == 'S' || doc_tag[0] == 'I') {
- // Adds a doc for every overview of every type
- SearchableDocument doc = searchDoc.Reset ();
- doc.Title = type_node.Caption;
- doc.HotText = typename;
- doc.Url = url;
- doc.FullTitle = full;
-
- var node_sel = xdoc.Root.Element ("Docs");
- text.Clear ();
- GetTextFromNode (node_sel, text);
- doc.Text = text.ToString ();
-
- text.Clear ();
- GetExamples (node_sel, text);
- doc.Examples = text.ToString ();
-
- writer.AddDocument (doc.LuceneDoc);
- var exportParsable = doc_tag[0] == 'C' && (ns_node.Caption.StartsWith ("MonoTouch") || ns_node.Caption.StartsWith ("MonoMac"));
-
- //Add docs for contructors, methods, etc.
- foreach (Node c in type_node.ChildNodes) { // c = Constructors || Fields || Events || Properties || Methods || Operators
- if (c.Element == "*")
- continue;
- const float innerTypeBoost = 0.2f;
-
- IEnumerable<Node> ncnodes = c.ChildNodes;
- // The rationale is that we need to properly handle method overloads
- // so for those method node which have children, flatten them
- if (c.Caption == "Methods") {
- ncnodes = ncnodes
- .Where (n => n.ChildNodes == null || n.ChildNodes.Count == 0)
- .Concat (ncnodes.Where (n => n.ChildNodes.Count > 0).SelectMany (n => n.ChildNodes));
- } else if (c.Caption == "Operators") {
- ncnodes = ncnodes
- .Where (n => !n.Caption.EndsWith ("Conversion"))
- .Concat (ncnodes.Where (n => n.Caption.EndsWith ("Conversion")).SelectMany (n => n.ChildNodes));
- }
-
- var prematchedMembers = xdoc.Root.Element ("Members").Elements ("Member").ToLookup (n => (string)n.Attribute ("MemberName"), n => n);
-
- foreach (Node nc in ncnodes) {
- XElement docsNode = null;
- try {
- docsNode = GetDocsFromCaption (xdoc, c.Caption[0] == 'C' ? ".ctor" : nc.Caption, c.Caption[0] == 'O', prematchedMembers);
- } catch {}
- if (docsNode == null) {
- Console.Error.WriteLine ("Problem: {0}", nc.PublicUrl);
- continue;
- }
-
- SearchableDocument doc_nod = searchDoc.Reset ();
- doc_nod.Title = LargeName (nc) + " " + EcmaDoc.EtcKindToCaption (c.Caption[0]);
- doc_nod.FullTitle = ns_node.Caption + '.' + typename + "::" + nc.Caption;
- doc_nod.HotText = string.Empty;
-
- /* Disable constructors hottext indexing as it's often "polluting" search queries
- because it has the same hottext than standard types */
- if (c.Caption != "Constructors") {
- //dont add the parameters to the hottext
- int ppos = nc.Caption.IndexOf ('(');
- doc_nod.HotText = ppos != -1 ? nc.Caption.Substring (0, ppos) : nc.Caption;
- }
-
- var urlnc = nc.PublicUrl;
- doc_nod.Url = urlnc;
-
- text.Clear ();
- GetTextFromNode (docsNode, text);
- doc_nod.Text = text.ToString ();
-
- text.Clear ();
- GetExamples (docsNode, text);
- doc_nod.Examples = text.ToString ();
-
- Document lucene_doc = doc_nod.LuceneDoc;
- lucene_doc.Boost = innerTypeBoost;
- writer.AddDocument (lucene_doc);
-
- // Objective-C binding specific parsing of [Export] attributes
- if (exportParsable) {
- try {
- var exports = docsNode.Parent.Elements ("Attributes").Elements ("Attribute").Elements ("AttributeName")
- .Select (a => (string)a).Where (txt => txt.Contains ("Foundation.Export"));
-
- foreach (var exportNode in exports) {
- var parts = exportNode.Split ('"');
- if (parts.Length != 3) {
- Console.WriteLine ("Export attribute not found or not usable in {0}", exportNode);
- continue;
- }
-
- var export = parts[1];
- var export_node = searchDoc.Reset ();
- export_node.Title = export + " Export";
- export_node.FullTitle = ns_node.Caption + '.' + typename + "::" + export;
- export_node.Url = urlnc;
- export_node.HotText = export;
- export_node.Text = string.Empty;
- export_node.Examples = string.Empty;
- lucene_doc = export_node.LuceneDoc;
- lucene_doc.Boost = innerTypeBoost;
- writer.AddDocument (lucene_doc);
- }
- } catch (Exception e){
- Console.WriteLine ("Problem processing {0} for MonoTouch/MonoMac exports\n\n{0}", e);
- }
- }
- }
- }
- // doc_tag == "Enumeration"
- } else if (doc_tag[0] == 'E'){
- var members = xdoc.Root.Element ("Members").Elements ("Member");
- if (members == null)
- continue;
-
- text.Clear ();
- foreach (var member_node in members) {
- string enum_value = (string)member_node.Attribute ("MemberName");
- text.Append (enum_value);
- text.Append (" ");
- GetTextFromNode (member_node.Element ("Docs"), text);
- text.AppendLine ();
- }
-
- SearchableDocument doc = searchDoc.Reset ();
-
- text.Clear ();
- GetExamples (xdoc.Root.Element ("Docs"), text);
- doc.Examples = text.ToString ();
-
- doc.Title = type_node.Caption;
- doc.HotText = (string)xdoc.Root.Attribute ("Name");
- doc.FullTitle = full;
- doc.Url = url;
- doc.Text = text.ToString();
- writer.AddDocument (doc.LuceneDoc);
- // doc_tag == "Delegate"
- } else if (doc_tag[0] == 'D'){
- SearchableDocument doc = searchDoc.Reset ();
- doc.Title = type_node.Caption;
- doc.HotText = (string)xdoc.Root.Attribute ("Name");
- doc.FullTitle = full;
- doc.Url = url;
-
- var node_sel = xdoc.Root.Element ("Docs");
-
- text.Clear ();
- GetTextFromNode (node_sel, text);
- doc.Text = text.ToString();
-
- text.Clear ();
- GetExamples (node_sel, text);
- doc.Examples = text.ToString();
-
- writer.AddDocument (doc.LuceneDoc);
- }
- }
- }
- }
-
- string GetKindFromCaption (string s)
- {
- int p = s.LastIndexOf (' ');
- if (p > 0)
- return s.Substring (p + 1);
- return null;
- }
-
- // Extract the interesting text from the docs node
- void GetTextFromNode (XElement n, StringBuilder sb)
- {
- // Include the text content of the docs
- sb.AppendLine (n.Value);
- foreach (var tag in n.Descendants ())
- //include the url to which points the see tag and the name of the parameter
- if ((tag.Name.LocalName.Equals ("see", StringComparison.Ordinal) || tag.Name.LocalName.Equals ("paramref", StringComparison.Ordinal))
- && tag.HasAttributes)
- sb.AppendLine ((string)tag.Attributes ().First ());
- }
-
- // Extract the code nodes from the docs
- void GetExamples (XElement n, StringBuilder sb)
- {
- foreach (var code in n.Descendants ("code"))
- sb.Append ((string)code);
- }
-
- // Extract a large name for the Node
- static string LargeName (Node matched_node)
- {
- string[] parts = matched_node.GetInternalUrl ().Split('/', '#');
- if (parts.Length == 3 && parts[2] != String.Empty) //List of Members, properties, events, ...
- return parts[1] + ": " + matched_node.Caption;
- else if(parts.Length >= 4) //Showing a concrete Member, property, ...
- return parts[1] + "." + matched_node.Caption;
- else
- return matched_node.Caption;
- }
-
- XElement GetMemberFromCaption (XDocument xdoc, string caption, bool isOperator, ILookup<string, XElement> prematchedMembers)
- {
- string name;
- IList<string> args;
- var doc = xdoc.Root.Element ("Members").Elements ("Member");
-
- if (isOperator) {
- // The first case are explicit and implicit conversion operators which are grouped specifically
- if (caption.IndexOf (" to ") != -1) {
- var convArgs = caption.Split (new[] { " to " }, StringSplitOptions.None);
- return doc
- .First (n => (AttrEq (n, "MemberName", "op_Explicit") || AttrEq (n, "MemberName", "op_Implicit"))
- && ((string)n.Element ("ReturnValue").Element ("ReturnType")).Equals (convArgs[1], StringComparison.Ordinal)
- && AttrEq (n.Element ("Parameters").Element ("Parameter"), "Type", convArgs[0]));
- } else {
- return doc.First (m => AttrEq (m, "MemberName", "op_" + caption));
- }
- }
-
- TryParseCaption (caption, out name, out args);
-
- if (!string.IsNullOrEmpty (name)) { // Filter member by name
- var prematched = prematchedMembers[name];
- doc = prematched.Any () ? prematched : doc.Where (m => AttrEq (m, "MemberName", name));
- }
- if (args != null && args.Count > 0) // Filter member by its argument list
- doc = doc.Where (m => m.Element ("Parameters").Elements ("Parameter").Attributes ("Type").Select (a => (string)a).SequenceEqual (args));
-
- return doc.First ();
- }
-
- XElement GetDocsFromCaption (XDocument xdoc, string caption, bool isOperator, ILookup<string, XElement> prematchedMembers)
- {
- return GetMemberFromCaption (xdoc, caption, isOperator, prematchedMembers).Element ("Docs");
- }
-
- // A simple stack-based parser to detect single type definition separated by commas
- IEnumerable<string> ExtractArguments (string rawArgList)
- {
- var sb = new System.Text.StringBuilder ();
- int genericDepth = 0;
- int arrayDepth = 0;
-
- for (int i = 0; i < rawArgList.Length; i++) {
- char c = rawArgList[i];
- switch (c) {
- case ',':
- if (genericDepth == 0 && arrayDepth == 0) {
- yield return sb.ToString ();
- sb.Clear ();
- continue;
- }
- break;
- case '<':
- genericDepth++;
- break;
- case '>':
- genericDepth--;
- break;
- case '[':
- arrayDepth++;
- break;
- case ']':
- arrayDepth--;
- break;
- }
- sb.Append (c);
- }
- if (sb.Length > 0)
- yield return sb.ToString ();
- }
-
- void TryParseCaption (string caption, out string name, out IList<string> argList)
- {
- name = null;
- argList = null;
- int parenIdx = caption.IndexOf ('(');
- // In case of simple name, there is no need for processing
- if (parenIdx == -1) {
- name = caption;
- return;
- }
- name = caption.Substring (0, parenIdx);
- // Now we gather the argument list if there is any
- var rawArgList = caption.Substring (parenIdx + 1, caption.Length - parenIdx - 2); // Only take what's inside the parens
- if (string.IsNullOrEmpty (rawArgList))
- return;
-
- argList = ExtractArguments (rawArgList).Select (arg => arg.Trim ()).ToList ();
- }
-
- bool AttrEq (XElement element, string attributeName, string expectedValue)
- {
- return ((string)element.Attribute (attributeName)).Equals (expectedValue, StringComparison.Ordinal);
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/providers/ecmaspec-provider.cs b/mcs/class/monodoc/Monodoc/providers/ecmaspec-provider.cs
deleted file mode 100644
index 84cc4a1cb55..00000000000
--- a/mcs/class/monodoc/Monodoc/providers/ecmaspec-provider.cs
+++ /dev/null
@@ -1,193 +0,0 @@
-//
-// The ecmaspec provider is for ECMA specifications
-//
-// Authors:
-// John Luke (jluke@cfl.rr.com)
-// Ben Maurer (bmaurer@users.sourceforge.net)
-//
-// Use like this:
-// mono assembler.exe --ecmaspec DIRECTORY --out name
-//
-
-using System;
-using System.Diagnostics;
-using System.IO;
-using System.Text;
-using System.Xml.XPath;
-using System.Xml.Xsl;
-using System.Xml;
-using System.Collections.Generic;
-using Lucene.Net.Index;
-using Lucene.Net.Documents;
-
-namespace Monodoc.Providers
-{
- public class EcmaSpecProvider : Provider
- {
- string basedir;
-
- public EcmaSpecProvider (string base_directory)
- {
- basedir = base_directory;
- if (!Directory.Exists (basedir))
- throw new DirectoryNotFoundException (String.Format ("The directory `{0}' does not exist", basedir));
- }
-
- public override void PopulateTree (Tree tree)
- {
- XPathNavigator n = new XPathDocument (Path.Combine (basedir, "toc.xml")).CreateNavigator ();
- n.MoveToRoot ();
- n.MoveToFirstChild ();
- PopulateNode (n.SelectChildren ("node", ""), tree.RootNode);
- }
-
- void PopulateNode (XPathNodeIterator nodes, Node treeNode)
- {
- foreach (XPathNavigator n in nodes) {
- string secNumber = n.GetAttribute ("number", "");
- string secName = n.GetAttribute ("name", "");
-
- var storage = treeNode.Tree.HelpSource.Storage;
- using (var file = File.OpenRead (Path.Combine (basedir, secNumber + ".xml")))
- storage.Store (secNumber, file);
-
- Node thisNode = treeNode.GetOrCreateNode (secNumber + ": " + secName, "ecmaspec:" + secNumber);
-
- if (n.HasChildren)
- PopulateNode (n.SelectChildren ("node", ""), thisNode);
- }
- }
-
- public override void CloseTree (HelpSource hs, Tree tree)
- {
- }
- }
-
- public class EcmaSpecHelpSource : HelpSource
- {
- const string EcmaspecPrefix = "ecmaspec:";
- const string TocPart = "%toc"; // What is returned as TocXml
- const string SpecPart = "%spec"; // What is returned as Ecmaspec
-
- public EcmaSpecHelpSource (string base_file, bool create) : base (base_file, create)
- {
- }
-
- public override DocumentType GetDocumentTypeForId (string id)
- {
- return id.EndsWith (TocPart) ? DocumentType.TocXml : DocumentType.EcmaSpecXml;
- }
-
- public override bool IsGeneratedContent (string id)
- {
- return id == "root:" || id.EndsWith (TocPart);
- }
-
- public override bool IsMultiPart (string id, out IEnumerable<string> parts)
- {
- if (id == "root:" || id.EndsWith (TocPart) || id.EndsWith (SpecPart)) {
- parts = null;
- return false;
- }
- parts = MakeMultiPart (id);
- return true;
- }
-
- IEnumerable<string> MakeMultiPart (string baseId)
- {
- yield return baseId + SpecPart;
- yield return baseId + TocPart;
- }
-
- public override string GetText (string id)
- {
- Node n = id == "root:" ? Tree.RootNode : MatchNode (EcmaspecPrefix + id.Substring (0, id.Length - TocPart.Length));
- if (n == null)
- throw new ArgumentException ("id", string.Format ("{0} -> {1}", id, EcmaspecPrefix + id.Substring (0, id.Length - TocPart.Length)));
- return TreeDumper.ExportToTocXml (n, "C# Language Specification", "In this section:");
- }
-
- public override Stream GetHelpStream (string id)
- {
- return id.EndsWith (SpecPart) ? base.GetHelpStream (id.Substring (0, id.IndexOf (SpecPart))) : base.GetHelpStream (id);
- }
-
- public override void PopulateSearchableIndex (IndexWriter writer)
- {
- foreach (Node n in Tree.RootNode.ChildNodes)
- AddDocuments (writer, n);
- }
-
- protected override string UriPrefix {
- get {
- return EcmaspecPrefix;
- }
- }
-
- void AddDocuments (IndexWriter writer, Node node)
- {
- string url = node.PublicUrl;
- Stream file_stream = GetHelpStream (url.Substring (9));
- if (file_stream == null) //Error
- return;
- XmlDocument xdoc = new XmlDocument ();
- xdoc.Load (new XmlTextReader (file_stream));
-
- //Obtain the title
- XmlNode nelem = xdoc.DocumentElement;
- string title = nelem.Attributes["number"].Value + ": " + nelem.Attributes["title"].Value;
-
- //Obtain the text
- StringBuilder s = new StringBuilder ();
- GetTextNode (nelem, s);
- string text = s.ToString ();
-
- //Obtain the examples
- StringBuilder s2 = new StringBuilder ();
- GetExamples (nelem, s2);
- string examples = s2.ToString ();
-
- //Write to the Lucene Index all the parts
- SearchableDocument doc = new SearchableDocument ();
- doc.Title = title;
- doc.HotText = title.Substring (title.IndexOf (':'));
- doc.Url = url;
- doc.Text = text;
- doc.Examples = examples;
- writer.AddDocument (doc.LuceneDoc);
-
- if (node.IsLeaf)
- return;
-
- foreach (Node n in node.ChildNodes)
- AddDocuments (writer, n);
- }
-
- void GetTextNode (XmlNode n, StringBuilder s)
- {
- //dont include c# code
- if (n.Name == "code_example")
- return;
- //include all text from nodes
- if (n.NodeType == XmlNodeType.Text)
- s.Append (n.Value);
-
- //recursively explore all nodes
- if (n.HasChildNodes)
- foreach (XmlNode n_child in n.ChildNodes)
- GetTextNode (n_child, s);
- }
-
- void GetExamples (XmlNode n, StringBuilder s)
- {
- if (n.Name == "code_example") {
- if (n.FirstChild.Name == "#cdata-section")
- s.Append (n.FirstChild.Value);
- } else {
- if (n.HasChildNodes)
- foreach (XmlNode n_child in n.ChildNodes)
- GetExamples (n_child, s);
- }
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/providers/ecmauncompiled-provider.cs b/mcs/class/monodoc/Monodoc/providers/ecmauncompiled-provider.cs
deleted file mode 100644
index 30f3ff47754..00000000000
--- a/mcs/class/monodoc/Monodoc/providers/ecmauncompiled-provider.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-using System;
-using System.Linq;
-using System.IO;
-using System.Text;
-using System.Xml;
-using System.Xml.Linq;
-using System.Collections.Generic;
-
-using Lucene.Net.Index;
-using Lucene.Net.Documents;
-
-using Monodoc.Ecma;
-using Monodoc.Storage;
-using Mono.Utilities;
-
-namespace Monodoc.Providers
-{
- public class EcmaUncompiledHelpSource : EcmaHelpSource
- {
- readonly DirectoryInfo basedir;
- readonly string basedoc;
-
- public readonly string BasePath;
-
- public new string Name {
- get;
- private set;
- }
-
- /* base_file: the directory containing the index.xml file, usually in Mono land .../Documentation/en
- * markName: if true, we encase the node caption with [] to clearly mark it's from an uncompiled source
- */
- public EcmaUncompiledHelpSource (string base_file, bool markName = true) : base ()
- {
- basedir = new DirectoryInfo (base_file);
- BasePath = basedir.FullName;
-
- basedoc = Path.Combine (basedir.FullName, "index.xml");
-
- Name = ((string)XDocument.Load (basedoc).Root.Element ("Title")) ?? "UnnamedUncompiledSource";
- if (markName)
- Name = '[' + Name + ']';
- Tree.RootNode.Caption = Name;
-
- Func<XElement, string> indexGenerator = type => {
- var nsName = (string)type.Parent.Attribute ("Name");
- var typeName = (string)type.Attribute ("Name");
- return Path.ChangeExtension (nsName + '/' + typeName, ".xml");
- };
-
- this.Storage = new UncompiledDocStorage (BasePath);
-
- EcmaDoc.PopulateTreeFromIndexFile (basedoc, UriPrefix, Tree, null, null, indexGenerator);
- }
-
- protected override string UriPrefix {
- get {
- return "uncompiled:";
- }
- }
-
- public override Stream GetImage (string url)
- {
- var path = Path.Combine (BasePath, "_images", url);
- return File.Exists (path) ? File.OpenRead (path) : (Stream)null;
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/providers/error-provider.cs b/mcs/class/monodoc/Monodoc/providers/error-provider.cs
deleted file mode 100644
index 6a25518d2dd..00000000000
--- a/mcs/class/monodoc/Monodoc/providers/error-provider.cs
+++ /dev/null
@@ -1,200 +0,0 @@
-//
-// error-provider.cs
-//
-// Author:
-// Ben Maurer (bmaurer@users.sourceforge.net)
-//
-// (C) 2003 Ben Maurer
-// Copyright 2003-2011 Novell
-// Copyright 2011 Xamarin Inc
-//
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-using System.Xml;
-using System.Xml.Serialization;
-using System.Linq;
-using Lucene.Net.Index;
-using Lucene.Net.Documents;
-
-namespace Monodoc.Providers
-{
- public class ErrorProviderConfig
- {
- public string FilesPath;
- public string Match;
- public int ErrorNumSubstringStart;
- public int ErrorNumSubstringLength;
- public string FriendlyFormatString;
-
- public override string ToString ()
- {
- var sb = new StringBuilder ();
- var w = new StringWriter (sb);
-
- w.WriteLine ("FilesPath: {0}", FilesPath);
- w.WriteLine ("Match: {0}", Match);
- w.WriteLine ("Error Number Substring: {0} Length:{1}", ErrorNumSubstringStart, ErrorNumSubstringLength);
- w.WriteLine ("FriendlyFormatString: {0}", FriendlyFormatString);
-
- return w.ToString ();
- }
-
- public Dictionary<string, ErrorDocumentation> Compile (HelpSource hs)
- {
- string[] files = Directory.GetFiles (FilesPath, Match);
- var ret = new Dictionary<string, ErrorDocumentation> ();
-
- foreach (string s in files) {
- ErrorDocumentation d;
- int errorNum = 0;
-
- try {
- errorNum = int.Parse (Path.GetFileName (s).Substring (ErrorNumSubstringStart, ErrorNumSubstringLength));
- } catch {
- Console.WriteLine ("Ignoring file {0}", s);
- }
-
- string errorName = String.Format (FriendlyFormatString, errorNum);
-
- if (!ret.TryGetValue (errorName, out d))
- ret[errorName] = d = new ErrorDocumentation (errorName);
-
- if (d.Details == null) {
- string xmlFile = Path.ChangeExtension (s, "xml");
- if (File.Exists (xmlFile)) {
- XmlSerializer cfgRdr = new XmlSerializer (typeof (ErrorDetails));
- d.Details = (ErrorDetails)cfgRdr.Deserialize (new XmlTextReader (xmlFile));
- }
- }
- // Encoding is same as used in MCS, so we will be able to do all those files
- using (StreamReader reader = new StreamReader (s, Encoding.GetEncoding (28591))) {
- d.Examples.Add (reader.ReadToEnd ());
- }
- }
-
- return ret;
- }
- }
-
- public class ErrorDocumentation
- {
- public string ErrorName;
- public ErrorDetails Details;
- public List<string> Examples = new List<string> ();
-
- public ErrorDocumentation () {}
- public ErrorDocumentation (string ErrorName)
- {
- this.ErrorName = ErrorName;
- }
- }
-
- public class ErrorDetails
- {
- public XmlNode Summary;
- public XmlNode Details;
- }
-
- public class ErrorProvider : Provider
- {
- ErrorProviderConfig config;
-
- public ErrorProvider (string configFile)
- {
- config = ReadConfig (configFile);
- }
-
- public static ErrorProviderConfig ReadConfig (string file)
- {
- XmlSerializer cfgRdr = new XmlSerializer (typeof (ErrorProviderConfig));
- ErrorProviderConfig ret = (ErrorProviderConfig)cfgRdr.Deserialize (new XmlTextReader (file));
- // handle path rel to the config file
- ret.FilesPath = Path.Combine (Path.GetDirectoryName (file), ret.FilesPath);
- return ret;
- }
-
- public override void PopulateTree (Tree tree)
- {
- // everything is done in CloseTree so we can pack
- }
-
- public override void CloseTree (HelpSource hs, Tree tree)
- {
- var entries = config.Compile (hs);
- MemoryStream ms = new MemoryStream ();
- XmlSerializer writer = new XmlSerializer (typeof (ErrorDocumentation));
-
- foreach (var de in entries) {
- ErrorDocumentation d = de.Value;
- string s = de.Key;
-
- tree.RootNode.GetOrCreateNode (s, "error:" + s);
-
- writer.Serialize (ms, d);
- ms.Position = 0;
- hs.Storage.Store (s, ms);
- ms.SetLength (0);
- }
-
- tree.RootNode.Sort ();
- }
- }
-
- public class ErrorHelpSource : HelpSource
- {
- public ErrorHelpSource (string base_file, bool create) : base (base_file, create)
- {
- }
-
- public override string GetText (string id)
- {
- return TreeDumper.ExportToTocXml (Tree.RootNode, "Compiler Error Reference", "In this section:");
- }
-
- protected override string UriPrefix {
- get {
- return "error:";
- }
- }
-
- public override bool IsGeneratedContent (string id)
- {
- return id == "root:";
- }
-
- public override DocumentType GetDocumentTypeForId (string id)
- {
- return id == "root:" ? DocumentType.TocXml : DocumentType.ErrorXml;
- }
-
- public override string GetInternalIdForUrl (string url, out Node node, out Dictionary<string, string> context)
- {
- var result = base.GetInternalIdForUrl (url, out node, out context);
- return result.ToLower ();
- }
-
- public override void PopulateIndex (IndexMaker index_maker)
- {
- foreach (Node n in Tree.RootNode.ChildNodes)
- index_maker.Add (n.Caption, n.Caption, n.Element);
- }
-
- public override void PopulateSearchableIndex (IndexWriter writer)
- {
- foreach (Node n in Tree.RootNode.ChildNodes) {
- XmlSerializer reader = new XmlSerializer (typeof (ErrorDocumentation));
- ErrorDocumentation d = (ErrorDocumentation)reader.Deserialize (GetHelpStream (n.Element.Substring (6)));
- SearchableDocument doc = new SearchableDocument ();
- doc.Title = d.ErrorName;
- doc.Url = n.Element;
- doc.Text = d.Details != null ? d.Details.ToString () : string.Empty;
- doc.Examples = d.Examples.Cast<string> ().Aggregate ((e1, e2) => e1 + Environment.NewLine + e2);
- doc.HotText = d.ErrorName;
- writer.AddDocument (doc.LuceneDoc);
- }
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/providers/man-provider.cs b/mcs/class/monodoc/Monodoc/providers/man-provider.cs
deleted file mode 100755
index 6e68626551b..00000000000
--- a/mcs/class/monodoc/Monodoc/providers/man-provider.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-//
-// A provider to display man pages
-//
-// Authors:
-// Johannes Roith <johannes@roith.de>
-// Jonathan Pryor <jpryor@novell.com>
-//
-// (C) 2008 Novell, Inc.
-
-using System;
-using System.IO;
-using System.Text;
-using System.Xml;
-using System.Linq;
-using System.Collections.Generic;
-
-namespace Monodoc.Providers
-{
- public class ManProvider : Provider
- {
- string[] tocFiles;
-
- public ManProvider (string[] handbookTocFiles)
- {
- tocFiles = handbookTocFiles;
-
- // huh...
- if (!File.Exists (tocFiles[0]))
- throw new FileNotFoundException (String.Format ("The table of contents, `{0}' does not exist", tocFiles[0]));
- }
-
- public override void PopulateTree (Tree tree)
- {
- foreach(string TocFile in tocFiles) {
- XmlDocument doc = new XmlDocument();
- doc.Load (TocFile);
-
- XmlNodeList nodeList = doc.GetElementsByTagName("manpage");
- Node nodeToAddChildrenTo = tree.RootNode;
- var storage = nodeToAddChildrenTo.Tree.HelpSource.Storage;
-
- foreach (XmlNode node in nodeList) {
-
- XmlAttribute name = node.Attributes["name"];
- XmlAttribute page = node.Attributes["page"];
-
- if (name == null || page == null) continue;
-
- if (!File.Exists (page.Value))
- continue;
-
- string target = "man:" + name.Value;
- nodeToAddChildrenTo.CreateNode (name.Value, target);
-
- if (File.Exists (page.Value))
- using (var file = File.OpenRead (page.Value))
- storage.Store (name.Value, file);
- }
- }
- }
-
- public override void CloseTree (HelpSource hs, Tree tree)
- {
- }
- }
-
- public class ManHelpSource : HelpSource
- {
- const string ManPrefix = "man:";
- Dictionary<string, Node> nodesMap;
-
- public ManHelpSource (string base_file, bool create) : base (base_file, create)
- {
- nodesMap = Tree.RootNode.ChildNodes.ToDictionary (n => n.Element);
- }
-
- // Since man always has a flat tree and rather small amount of item
- // we store them in a dictionary
- public override Node MatchNode (string url)
- {
- Node result;
- return nodesMap.TryGetValue (url, out result) ? result : null;
- }
-
- public override DocumentType GetDocumentTypeForId (string id)
- {
- return id == "root:" ? DocumentType.TocXml : DocumentType.Man;
- }
-
- public override bool IsGeneratedContent (string id)
- {
- return id == "root:";
- }
-
- public override string GetText (string url)
- {
- return TreeDumper.ExportToTocXml (Tree.RootNode, "Mono Documentation Library", "Available man pages:");
- }
-
- protected override string UriPrefix {
- get {
- return ManPrefix;
- }
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/providers/simple-provider.cs b/mcs/class/monodoc/Monodoc/providers/simple-provider.cs
deleted file mode 100644
index e567dc19660..00000000000
--- a/mcs/class/monodoc/Monodoc/providers/simple-provider.cs
+++ /dev/null
@@ -1,153 +0,0 @@
-//
-// The simple provider is an example provider
-//
-// Author:
-// Miguel de Icaza (miguel@ximian.com)
-//
-// Use like this:
-// mono assembler.exe --simple DIRECTORY --out name
-//
-// Then create a .source file in your sources directory, and copy
-// name.tree and name.zip to the sources directory.
-//
-// To view the tree generated, use:
-// mono dump.exe name.tree
-//
-namespace Monodoc {
-using System;
-using System.IO;
-using System.Text;
-
-//
-// The simple provider generates the information source
-//
-public class SimpleProvider : Provider {
- string basedir;
-
- public SimpleProvider (string base_directory)
- {
- basedir = base_directory;
- if (!Directory.Exists (basedir))
- throw new FileNotFoundException (String.Format ("The directory `{0}' does not exist", basedir));
- }
-
- public override void PopulateTree (Tree tree)
- {
- Node top = tree.LookupNode ("Directory at: " + basedir, "simple:");
-
- foreach (string dir in Directory.GetDirectories (basedir)){
- string url = Path.GetFileName (dir);
- Node n = top.LookupNode ("Dir: " + url, url);
- PopulateDir (n, dir);
- }
- }
-
-#pragma warning disable 219
- void PopulateDir (Node me, string dir)
- {
- Console.WriteLine ("Adding: " + dir);
- foreach (string child_dir in Directory.GetDirectories (dir)){
- string url = Path.GetFileName (child_dir);
- Node n = me.LookupNode ("Dir: " + url, "simple-directory:" + url);
- PopulateDir (me, child_dir);
- }
-
- foreach (string file in Directory.GetFiles (dir)){
- Console.WriteLine (" File: " + file);
- string file_code = me.tree.HelpSource.PackFile (file);
-
- //
- // The url element encoded for the file is:
- // originalfilename#CODE
- //
- // The code is assigned to us after the file has been packaged
- // We use the original-filename later to render html or text files
- //
- Node n = me.LookupNode (Path.GetFileName (file), file + "#" + file_code);
-
- }
- }
-
- public override void CloseTree (HelpSource hs, Tree tree)
- {
- }
-}
-
-//
-// The HelpSource is used during the rendering phase.
-//
-
-public class SimpleHelpSource : HelpSource {
- Encoding enc;
-
- public SimpleHelpSource (string base_file, bool create) : base (base_file, create)
- {
- enc = new UTF8Encoding (false, false);
- }
-
- public override string GetText (string url, out Node match_node)
- {
- match_node = null;
-
- string c = GetCachedText (url);
- if (c != null)
- return c;
-
- if (url.StartsWith ("simple:") || url.StartsWith ("simple-directory:"))
- return GetTextFromUrl (url);
-
- return null;
- }
-
- string GetTextFromUrl (string url)
- {
- // Remove "simple:" prefix
- url = url.Substring (7);
-
- if (url.StartsWith ("simple-directory:"))
- return String.Format ("<html>This is a directory entry point: {0} </html>",
- url.Substring (17));
-
- // Otherwise the last element of the url is the file code we got.
- int pound = url.LastIndexOf ("#");
- string code;
- if (pound == -1)
- code = url;
- else
- code = url.Substring (pound+1);
-
-
- Stream s = GetHelpStream (code);
- if (s == null)
- return String.Format ("<html>No stream for this node: {0} </html>", url);
-
- //
- // Now, get the file type
- //
- int slash = url.LastIndexOf ("/");
- string fname = url.Substring (slash + 1, pound - slash - 1).ToLower ();
-
- if (fname.EndsWith (".html") || fname.EndsWith (".htm")){
- TextReader r = new StreamReader (s, enc);
- return r.ReadToEnd ();
- }
-
- if (fname.EndsWith (".png") || fname.EndsWith (".jpg") ||
- fname.EndsWith (".jpeg") || fname.EndsWith (".gif")){
- return "<html>Image file, have not implemented rendering this yet</html>";
- }
-
- // Convert text to HTML
- StringBuilder result = new StringBuilder ("<html>");
- TextReader reader = new StreamReader (s, enc);
- string line;
-
- while ((line = reader.ReadLine ()) != null){
- result.Append (line);
- result.Append ("<br>");
- }
- result.Append ("<html>");
- return result.ToString ();
- }
-}
-}
diff --git a/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs b/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs
deleted file mode 100644
index 7a866432d63..00000000000
--- a/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs
+++ /dev/null
@@ -1,242 +0,0 @@
-//
-// A provider that uses Windows help file xhtml TOC files and looks for the
-// referenced documents to create the help source.
-//
-// Authors:
-// Copyright 2003 Lee Mallabone <gnome@fonicmonkey.net>
-// Johannes Roith <johannes@roith.de>
-// Miguel de Icaza <miguel@ximian.com>
-
-using System;
-using System.IO;
-using System.Linq;
-using System.Collections.Generic;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Xml;
-using System.Xml.Linq;
-
-namespace Monodoc.Providers
-{
- public class XhtmlProvider : Provider
- {
- string tocFile;
- readonly XNamespace ns = "http://www.w3.org/1999/xhtml";
-
- public XhtmlProvider (string handbookTocFile)
- {
- tocFile = handbookTocFile;
- if (!File.Exists (tocFile))
- throw new FileNotFoundException (String.Format ("The table of contents, `{0}' does not exist", tocFile));
- }
-
- public override void PopulateTree (Tree tree)
- {
- var doc = XDocument.Load (tocFile);
- var uls = doc.Descendants (ns + "body").First ().Elements (ns + "ul");
- foreach (var ul in uls)
- ParseUl (tree, tree.RootNode, ul);
- }
-
- void ParseUl (Tree tree, Node parent, XElement ul)
- {
- var storage = tree.HelpSource.Storage;
- foreach (var e in ul.Elements (ns + "li")) {
- var inner = e.Element (ns + "object");
- if (inner == null)
- continue;
- string caption, element;
- ObjectEntryToParams (inner, out caption, out element);
- // Don't add if the backing file doesn't exist
- if (!File.Exists (element)) {
- Console.Error.WriteLine ("Warning: File `{0}' referenced in TOC but it doesn't exist. It will be ignored.", element);
- continue;
- }
- using (var file = File.OpenRead (element))
- storage.Store (element, file);
- parent.CreateNode (caption, XhtmlHelpSource.XhtmlPrefix + element);
- }
- }
-
- void ObjectEntryToParams (XElement obj, out string caption, out string element)
- {
- var ps = obj.Elements (ns + "param");
- caption = ps
- .Where (p => p.Attribute ("name").Value == "Name")
- .Select (p => (string)p.Attribute ("value"))
- .FirstOrDefault ();
- caption = caption ?? string.Empty;
-
- element = ps
- .Where (p => p.Attribute ("name").Value == "Local")
- .Select (p => (string)p.Attribute ("value"))
- .FirstOrDefault ();
- element = element ?? string.Empty;
- }
-
- public override void CloseTree (HelpSource hs, Tree tree)
- {
- }
- }
-
- public class XhtmlHelpSource : HelpSource
- {
- public XhtmlHelpSource (string base_file, bool create) : base (base_file, create)
- {
-
- }
-
- internal const string XhtmlPrefix = "xhtml:";
-
- protected override string UriPrefix {
- get {
- return XhtmlPrefix;
- }
- }
-
- public override SortType SortType {
- get {
- return SortType.Element;
- }
- }
-
- public override DocumentType GetDocumentTypeForId (string id)
- {
- return id == "root:" ? DocumentType.TocXml : DocumentType.MonoBook;
- }
-
- public override bool IsGeneratedContent (string id)
- {
- return id == "root:";
- }
-
- public override string GetText (string url)
- {
- return TreeDumper.ExportToTocXml (Tree.RootNode, "Mono Handbook", string.Empty);
- }
-
- public static string GetAbsoluteLink(string target, string url)
- {
- string value = null;
-
- if (target.StartsWith ("#") ||
- target.StartsWith ("T:") ||
- target.StartsWith ("M:") ||
- target.StartsWith ("P:") ||
- target.StartsWith ("T:") ||
- target.StartsWith ("E:") ||
- target.StartsWith ("F:") ||
- target.StartsWith ("O:") ||
- target.StartsWith ("N:") ||
- target.StartsWith ("api:"))
- return null;
-
- int endp = target.IndexOf(':');
-
- if (endp == -1)
- endp = 0;
- string protocol = target.Substring(0, endp);
- switch (protocol) {
- case "mailto":
- case "http":
- case "https":
- case "ftp":
- case "news":
- case "irc":
- break;
- default:
- // handle absolute urls like: /html/en/images/empty.png
- if (!target.StartsWith("/")) {
-
- // url is something like "gnome/bindings/mono.html"
- // This will get the path "gnome/bindings"
-
- int slash = url.LastIndexOf ("/");
- string tmpurl = url;
-
- if (slash != -1)
- tmpurl = url.Substring(0, slash);
-
- // Count "../" in target and go one level down
- // for each in tmpurl, eventually, then remove "../".
-
- Regex reg1 = new Regex("../");
- MatchCollection matches = reg1.Matches(target);
-
- for(int i = 1; i < matches.Count; i++) {
- slash = tmpurl.LastIndexOf ("/");
- if (slash != -1)
- tmpurl = tmpurl.Substring(0, slash);
- }
-
- target = target.Replace("../", "");
-
- value = tmpurl + "/" + target;
-
- } else {
- value = target.Substring(1, target.Length - 1);
- }
- break;
- }
- return value;
- }
-
- XmlDocument RewriteLinks(XmlDocument docToProcess, string url)
- {
- XmlNodeList nodeList = docToProcess.GetElementsByTagName("a");
-
- foreach(XmlNode node in nodeList) {
-
- XmlElement element = (XmlElement) node;
-
- if (element.HasAttribute("href") ){
-
- XmlAttribute href = element.GetAttributeNode("href");
- string target = href.Value;
-
- target = GetAbsoluteLink(target, url);
- if (target != null) {
- string newtarget = String.Format ("source-id:{0}:xhtml:{1}", SourceID, target);
- href.Value = newtarget;
- }
- }
- }
-
- nodeList = docToProcess.GetElementsByTagName("img");
-
- foreach(XmlNode node in nodeList) {
-
- XmlElement element = (XmlElement) node;
-
- if (element.HasAttribute("src") ){
-
- XmlAttribute href = element.GetAttributeNode("src");
- string target = href.Value;
-
- target = GetAbsoluteLink(target, url);
- if (target != null) {
- string newtarget = String.Format ("source-id:{0}:xhtml:{1}", SourceID, target);
- href.Value = newtarget;
- }
- }
- }
-
- return docToProcess;
- }
-
- public override void PopulateIndex (IndexMaker index_maker)
- {
- PopulateIndexFromNodes (Tree.RootNode);
- }
-
- void PopulateIndexFromNodes (Node start)
- {
- /*var nodes = start.Nodes;
-
- if (nodes != null) {
- foreach (Node n in nodes)
- PopulateIndexFromNodes (n);
- }*/
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/settings.cs b/mcs/class/monodoc/Monodoc/settings.cs
deleted file mode 100644
index 8dd01e6e124..00000000000
--- a/mcs/class/monodoc/Monodoc/settings.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using System;
-using System.Configuration;
-using System.Collections.Specialized;
-
-namespace Monodoc
-{
- public static class Config
- {
- static KeyValueConfigurationCollection libConfig;
- static KeyValueConfigurationCollection exeConfig;
-
- static Config ()
- {
- try {
- var config = ConfigurationManager.OpenExeConfiguration (System.Reflection.Assembly.GetExecutingAssembly ().Location);
- libConfig = config.AppSettings.Settings;
- } catch {}
-
- try {
- exeConfig = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None).AppSettings.Settings;
- } catch {}
- }
-
- public static string Get (string key)
- {
- KeyValueConfigurationElement element = null;
- // We check the configuration in order: app first and then library itself
- if (exeConfig != null)
- element = exeConfig[key];
- if (element == null && libConfig != null)
- element = libConfig[key];
-
- return element == null ? null : element.Value;
- }
-
- public static KeyValueConfigurationCollection AppSettings {
- get {
- return exeConfig;
- }
- }
-
- public static KeyValueConfigurationCollection LibSettings {
- get {
- return libConfig;
- }
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/settings_Legacy.cs b/mcs/class/monodoc/Monodoc/settings_Legacy.cs
deleted file mode 100644
index db305e4ee72..00000000000
--- a/mcs/class/monodoc/Monodoc/settings_Legacy.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-using System;
-using System.IO;
-using System.Xml;
-using System.Xml.Serialization;
-
-#if LEGACY_MODE
-
-namespace Monodoc {
- [Obsolete]
- public class SettingsHandler {
- static string settingsFile;
- static XmlSerializer settingsSerializer = new XmlSerializer (typeof (Settings));
- [Obsolete]
- public static Settings Settings;
-
- static SettingsHandler ()
- {
- string rootDir = Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData);
- Path = System.IO.Path.Combine (rootDir, "monodoc");
- settingsFile = System.IO.Path.Combine (Path, "settings.xml");
- if (File.Exists (settingsFile)) {
- try {
- using (Stream s = File.OpenRead (settingsFile)) {
- Settings = (Settings) settingsSerializer.Deserialize (s);
- }
- } catch {
- Settings = new Settings ();
- }
- } else
- Settings = new Settings ();
-
- if (Settings.preferred_font_family.Length == 0)
- Settings.preferred_font_family = "Sans";
- if (Settings.preferred_font_size <= 0)
- Settings.preferred_font_size = 100;
- }
-
- [Obsolete]
- public static void CheckUpgrade ()
- {
- // no new version
- if (Settings.LastSeenVersion == RootTree.MonodocVersion)
- return;
-
- // new install
- if (! File.Exists (settingsFile)) {
- Settings.LastSeenVersion = RootTree.MonodocVersion;
- Save ();
- return;
- }
- }
-
- [Obsolete]
- public static void Save ()
- {
- EnsureSettingsDirectory ();
- using (FileStream fs = File.Create (settingsFile)){
- settingsSerializer.Serialize (fs, Settings);
- }
- }
-
- // these can be used for other types of settings to
- [Obsolete]
- public static string Path;
-
- [Obsolete]
- public static void EnsureSettingsDirectory ()
- {
- DirectoryInfo d = new DirectoryInfo (Path);
- if (!d.Exists)
- d.Create ();
- }
- }
-
- [Obsolete]
- public class Settings {
- // public to allow serialization
- [Obsolete]
- public bool EnableEditing = true;
-
- // Last serial number commited
- [Obsolete]
- public int SerialNumber = 0;
-
- [Obsolete]
- public bool ShowInheritedMembers = false;
- [Obsolete]
- public bool ShowComments = false;
-
- [Obsolete]
- public string Email;
- [Obsolete]
- public string Key;
-
- [Obsolete]
- public int LastSeenVersion = -1;
-
- [Obsolete]
- public static bool RunningGUI = false;
-
- // fonts for rendering
- [Obsolete]
- public string preferred_font_family = "Sans";
- [Obsolete]
- public double preferred_font_size = 100;
- }
-}
-
-#endif
-
diff --git a/mcs/class/monodoc/Monodoc/storage.cs b/mcs/class/monodoc/Monodoc/storage.cs
deleted file mode 100644
index 9fddecb3afb..00000000000
--- a/mcs/class/monodoc/Monodoc/storage.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using System;
-using System.IO;
-using System.Collections.Generic;
-
-namespace Monodoc
-{
- // Define a storage mechanism for a help source
- public interface IDocStorage : IDisposable
- {
- // Tell if the storage can store successive change to the doc as revision
- bool SupportRevision { get; }
- IDocRevisionManager RevisionManager { get; }
-
- // Tell if the storage support modifying an existing data
- bool SupportChange { get; }
-
- /* Store data inside the storage backend
- * if SupportChange is false and user try to store something with an existing id
- * an exception will be thrown
- * if id is null or empty, the storage will try to create an automatic id. In all
- * case the id that has been used to store the content is returned by the method
- */
- string Store (string id, string text);
- string Store (string id, byte[] data);
- string Store (string id, Stream stream);
-
- Stream Retrieve (string id);
-
- IEnumerable<string> GetAvailableIds ();
- }
-
- public interface IDocRevisionManager
- {
- Stream RetrieveWithRevision (string id, string revision);
-
- // This should be ordered by most recent first
- IEnumerable<string> AvailableRevisionsForId (string id);
- // This can simply be implemented with above property but it can also be
- // a revision storage symbolic value like "HEAD"
- string LatestRevisionForId (string id);
-
- // A commit message for instance
- string GetRevisionDescription (string revision);
- }
-
- public static class DocRevisionManagerExtensions
- {
- public static Stream RetrieveLatestRevision (this IDocRevisionManager revManager, string id)
- {
- return revManager.RetrieveWithRevision (id, revManager.LatestRevisionForId (id));
- }
- }
-
- public static class DocStorageExtensions
- {
- public static bool TryRetrieve (this IDocStorage storage, string id, out Stream stream)
- {
- stream = null;
- try {
- stream = storage.Retrieve (id);
- return true;
- } catch {
- return false;
- }
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/storage/NullStorage.cs b/mcs/class/monodoc/Monodoc/storage/NullStorage.cs
deleted file mode 100644
index 7605aa4cf37..00000000000
--- a/mcs/class/monodoc/Monodoc/storage/NullStorage.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-using System;
-using System.IO;
-using System.Xml;
-using System.Linq;
-using System.Collections.Generic;
-
-namespace Monodoc.Storage
-{
- // A storage that doesn't store
- public class NullStorage : IDocStorage
- {
- public NullStorage ()
- {
- }
-
- public bool SupportRevision {
- get {
- return false;
- }
- }
-
- public IDocRevisionManager RevisionManager {
- get {
- return null;
- }
- }
-
- public bool SupportChange {
- get {
- return true;
- }
- }
-
- public string Store (string id, string text)
- {
- return id;
- }
-
- public string Store (string id, byte[] data)
- {
- return id;
- }
-
- public string Store (string id, Stream stream)
- {
- return id;
- }
-
- public Stream Retrieve (string id)
- {
- return null;
- }
-
- public IEnumerable<string> GetAvailableIds ()
- {
- return Enumerable.Empty<string> ();
- }
-
- public void Dispose ()
- {
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/storage/UncompiledDocStorage.cs b/mcs/class/monodoc/Monodoc/storage/UncompiledDocStorage.cs
deleted file mode 100644
index e807c022f9a..00000000000
--- a/mcs/class/monodoc/Monodoc/storage/UncompiledDocStorage.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Collections.Generic;
-
-namespace Monodoc.Storage
-{
- // A read-only storage to access ecma XML document based on a standard directory layout
- // id are relative path inside the base doc directory
- public class UncompiledDocStorage : IDocStorage
- {
- readonly string basePath;
-
- public UncompiledDocStorage (string basePath)
- {
- this.basePath = basePath;
- }
-
- public bool SupportRevision {
- get {
- return false;
- }
- }
-
- public IDocRevisionManager RevisionManager {
- get {
- return null;
- }
- }
-
- public bool SupportChange {
- get {
- return false;
- }
- }
-
- public string Store (string id, string text)
- {
- throw new NotSupportedException ();
- }
-
- public string Store (string id, byte[] data)
- {
- throw new NotSupportedException ();
- }
-
- public string Store (string id, Stream stream)
- {
- throw new NotSupportedException ();
- }
-
- public Stream Retrieve (string id)
- {
- var path = id;
- if ('/' != Path.DirectorySeparatorChar)
- path = path.Replace ('/', Path.DirectorySeparatorChar);
- return File.OpenRead (Path.Combine (basePath, path));
- }
-
- public IEnumerable<string> GetAvailableIds ()
- {
- return Directory.EnumerateFiles (basePath, "*.xml", SearchOption.AllDirectories);
- }
-
- public void Dispose ()
- {
- }
- }
-}
diff --git a/mcs/class/monodoc/Monodoc/storage/ZipStorage.cs b/mcs/class/monodoc/Monodoc/storage/ZipStorage.cs
deleted file mode 100644
index 4945dbdd3d0..00000000000
--- a/mcs/class/monodoc/Monodoc/storage/ZipStorage.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-using System;
-using System.IO;
-using System.Xml;
-using System.Linq;
-using System.Text;
-using System.Collections.Generic;
-
-using ICSharpCode.SharpZipLib.Zip;
-
-namespace Monodoc.Storage
-{
- public class ZipStorage : IDocStorage
- {
- string zipFileName;
- int code;
- ZipOutputStream zipOutput;
- ZipFile zipFile;
- // SharpZipLib use linear search to map name to index, correct that a bit
- Dictionary<string, int> entries = new Dictionary<string, int> ();
-
- public ZipStorage (string zipFileName)
- {
- this.zipFileName = zipFileName;
- }
-
- public bool SupportRevision {
- get {
- return false;
- }
- }
-
- public IDocRevisionManager RevisionManager {
- get {
- return null;
- }
- }
-
- public bool SupportChange {
- get {
- return true;
- }
- }
-
- public string Store (string id, string text)
- {
- EnsureOutput ();
- SetupEntry (zipOutput, ref id);
- var writer = new StreamWriter (zipOutput);
- writer.Write (text);
- writer.Flush ();
-
- return id;
- }
-
- public string Store (string id, byte[] data)
- {
- EnsureOutput ();
- SetupEntry (zipOutput, ref id);
- zipOutput.Write (data, 0, data.Length);
- return id;
- }
-
- public string Store (string id, Stream stream)
- {
- EnsureOutput ();
- SetupEntry (zipOutput, ref id);
- stream.CopyTo (zipOutput);
- return id;
- }
-
- void SetupEntry (ZipOutputStream zipOutput, ref string id)
- {
- if (string.IsNullOrEmpty (id))
- id = GetNewCode ();
-
- ZipEntry entry = new ZipEntry (id);
- zipOutput.PutNextEntry (entry);
- }
-
- public Stream Retrieve (string id)
- {
- EnsureInput ();
- int index;
- ZipEntry entry;
- if (!entries.TryGetValue (id, out index) || (entry = zipFile[index]) == null)
- entry = zipFile.GetEntry (id);
- if (entry != null)
- return zipFile.GetInputStream (entry);
- else
- throw new ArgumentException ("id", string.Format ("'{0}' isn't a valid id for this storage", id));
- }
-
- public IEnumerable<string> GetAvailableIds ()
- {
- EnsureInput ();
- return zipFile.Cast<ZipEntry> ().Select (ze => ze.Name);
- }
-
- void EnsureOutput ()
- {
- if (zipFile != null)
- throw new InvalidOperationException ("This ZipStorage instance is already used in read-mode");
- if (zipOutput != null)
- return;
- zipOutput = new ZipOutputStream (File.Create (zipFileName));
- }
-
- void EnsureInput ()
- {
- if (zipOutput != null)
- throw new InvalidOperationException ("This ZipStorage instance is already used in write-mode");
- if (zipFile != null)
- return;
- zipFile = new ZipFile (zipFileName);
- entries = Enumerable.Range (0, zipFile.Size).ToDictionary (i => zipFile[i].Name, i => i);
- }
-
- public void Dispose ()
- {
- if (zipOutput != null)
- zipOutput.Dispose ();
- if (zipFile != null)
- zipFile.Close ();
- }
-
- string GetNewCode ()
- {
- return String.Format ("{0}", code++);
- }
- }
-}
diff --git a/mcs/class/monodoc/Resources/.gitattributes b/mcs/class/monodoc/Resources/.gitattributes
deleted file mode 100644
index bfc0c0d4e98..00000000000
--- a/mcs/class/monodoc/Resources/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-/helper.js -crlf
diff --git a/mcs/class/monodoc/Resources/Lminus.gif b/mcs/class/monodoc/Resources/Lminus.gif
deleted file mode 100644
index 33c49d13036..00000000000
--- a/mcs/class/monodoc/Resources/Lminus.gif
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/Lplus.gif b/mcs/class/monodoc/Resources/Lplus.gif
deleted file mode 100644
index 9d2a2ac5c50..00000000000
--- a/mcs/class/monodoc/Resources/Lplus.gif
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/base.css b/mcs/class/monodoc/Resources/base.css
deleted file mode 100644
index 68941d0e651..00000000000
--- a/mcs/class/monodoc/Resources/base.css
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-* base.css: CSS applied to all the docs
-*
-* Author: Mario Sopena
-*/
-
-body, table {
- margin: 0px;
-}
-
-body, table, pre, p {
- font-family: @@FONT_FAMILY@@, sans-serif;
- /* font-size: @@FONT_SIZE@@pt; */
- font-size: 11pt;
-}
-
-div.header {
- background-color: #FAFBFD;
- font-size: 1.7em;
- font-weight: bold;
- padding: 8px 0 0 10px;
- font-family: 'Segoe UI',Verdana,Arial;
-}
-
-div.title {
- font-size: 130%;
- font-weight: bolder;
- margin-top: 0.3em;
- margin-left: 0.2em;
- margin-bottom: 0.1em;
-}
-
-.subtitle {
- font-style: italic;
-}
-
-.attributionlogo {
- display:none;
- float:right;
-}
-
-div:hover > .attributionlogo,p:hover > .attributionlogo,td:hover > .attributionlogo,blockquote:hover > .attributionlogo {
- display:inline;
- float:right;
-}
diff --git a/mcs/class/monodoc/Resources/creativecommons.png b/mcs/class/monodoc/Resources/creativecommons.png
deleted file mode 100644
index c558cbbe898..00000000000
--- a/mcs/class/monodoc/Resources/creativecommons.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/ecmaspec-html-css.xsl b/mcs/class/monodoc/Resources/ecmaspec-html-css.xsl
deleted file mode 100644
index d9c4f7b07f6..00000000000
--- a/mcs/class/monodoc/Resources/ecmaspec-html-css.xsl
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0"
- xmlns:monodoc="monodoc:///extensions"
- exclude-result-prefixes="monodoc"
- >
-<xsl:output omit-xml-declaration="yes" />
-
-<xsl:template match="/clause">
- <div class="header" id="ecmaspec">
- <div class="subtitle">ECMA-334 C# Language Specification</div>
- <div class="title"><xsl:value-of select="@number"/>: <xsl:value-of select="@title"/>
- <xsl:if test="@informative"> (informative) </xsl:if></div>
- </div>
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="paragraph">
- <p>
- <xsl:apply-templates />
- </p>
-</xsl:template>
-
-<xsl:template match="keyword">
- <span class="keyword"> <xsl:apply-templates/></span> <xsl:text> </xsl:text>
-</xsl:template>
-
-<xsl:template match="hyperlink">
- <a href="ecmaspec:{.}">
- <xsl:value-of select="." />
- </a>
-</xsl:template>
-
-<xsl:template match="list">
- <ul>
- <xsl:for-each select="list_item|list">
- <li><xsl:apply-templates /></li>
- </xsl:for-each>
- </ul>
-</xsl:template>
-
-<xsl:template match="code_example">
- <div class="code_example">
- <div class="code_ex_title">Code example</div>
- <span class="code">
- <xsl:value-of select="monodoc:Colorize(string(descendant-or-self::text()), string('csharp'))" disable-output-escaping="yes" />
- </span>
- </div>
-</xsl:template>
-
-<xsl:template match="symbol">
- <span class="symbol">
- <xsl:apply-templates />
- </span>
-</xsl:template>
-
-<xsl:template match="grammar_production">
- <dl class="nt_{name/non_terminal/.}">
- <dt><xsl:value-of select="name/non_terminal/." /></dt>
-
- <xsl:for-each select="rhs">
- <dd>
- <xsl:apply-templates select="node()" />
- </dd>
- </xsl:for-each>
- </dl>
-</xsl:template>
-
-<xsl:template match="non_terminal">
- <span class="non_terminal"><xsl:text> </xsl:text><xsl:value-of select="." /></span>
-</xsl:template>
-
-<xsl:template match="terminal">
- <span class="terminal"><xsl:text> </xsl:text><xsl:value-of select="." /></span>
-</xsl:template>
-
-<xsl:template match="opt">
- <xsl:text> (</xsl:text><span class="opt">optional</span><xsl:text>) </xsl:text>
-</xsl:template>
-
-<xsl:template match="note|example">
- <div class="note">
- <xsl:apply-templates />
- </div>
-</xsl:template>
-
-<xsl:template match="table_line">
- <xsl:apply-templates /><br />
-</xsl:template>
-
-<xsl:template match="@*|node()">
- <xsl:copy>
- <xsl:apply-templates select="@*|node()"/>
- </xsl:copy>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/mcs/class/monodoc/Resources/ecmaspec-html.xsl b/mcs/class/monodoc/Resources/ecmaspec-html.xsl
deleted file mode 100644
index 631ee03a202..00000000000
--- a/mcs/class/monodoc/Resources/ecmaspec-html.xsl
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-<xsl:output omit-xml-declaration="yes" />
-
-<xsl:template match="/clause">
- <table width="100%" cellpadding="5">
- <tr bgcolor="#b0c4de"><td>
- <i>ECMA-334 C# Language Specification</i>
-
- <h3>
- <xsl:value-of select="@number"/>: <xsl:value-of select="@title"/>
-
- <xsl:if test="@informative">
- (informative)
- </xsl:if>
- </h3>
- </td></tr>
- </table>
-
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="paragraph">
- <p>
- <xsl:apply-templates />
- </p>
-</xsl:template>
-
-<xsl:template match="keyword">
- <i> <xsl:apply-templates/></i> <xsl:text> </xsl:text>
-</xsl:template>
-
-<xsl:template match="hyperlink">
- <a href="ecmaspec:{.}">
- <xsl:value-of select="." />
- </a>
-</xsl:template>
-
-<xsl:template match="list">
- <ul>
- <xsl:for-each select="list_item|list">
- <li><xsl:apply-templates /></li>
- </xsl:for-each>
- </ul>
-</xsl:template>
-
-<xsl:template match="code_example">
- <table bgcolor="#f5f5dd" border="1" cellpadding="5">
- <tr>
- <td>
- <pre>
- <xsl:apply-templates />
- </pre>
- </td>
- </tr>
- </table>
-</xsl:template>
-
-<xsl:template match="symbol">
- <code>
- <xsl:apply-templates />
- </code>
-</xsl:template>
-
-<xsl:template match="grammar_production">
- <dl id="nt_{name/non_terminal/.}">
- <dt><xsl:value-of select="name/non_terminal/." /></dt>
-
- <xsl:for-each select="rhs">
- <dd>
- <xsl:apply-templates select="node()" />
- </dd>
- </xsl:for-each>
- </dl>
-</xsl:template>
-
-<xsl:template match="non_terminal">
-
- <code><xsl:text> </xsl:text><xsl:value-of select="." /></code>
-</xsl:template>
-
-<xsl:template match="terminal">
- <code><xsl:text> </xsl:text><xsl:value-of select="." /></code>
-</xsl:template>
-
-<xsl:template match="opt">
- <sub>opt</sub>
-</xsl:template>
-
-<xsl:template match="@*|node()">
- <xsl:copy>
- <xsl:apply-templates select="@*|node()"/>
- </xsl:copy>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/mcs/class/monodoc/Resources/ecmaspec.css b/mcs/class/monodoc/Resources/ecmaspec.css
deleted file mode 100644
index 97937fc442a..00000000000
--- a/mcs/class/monodoc/Resources/ecmaspec.css
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-* ecmaspec.css: CSS applied to ECMA C# specs
-*
-* Author: Mario Sopena
-*/
-
-#ecmaspec {
- background: #a4dda4; /*#83b183;*/
- border: 2px solid #556655;
-}
-
-p {
- margin-top: .5em;
- margin-bottom: .5em;
-}
-
-span.keyword {
- color: #a6563a;
-}
-
-a:link {
- text-decoration: none;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-div.code_example {
- background: #f5f5dd;
- border: 1px solid #cdcd82;
- border: 1px solid black;
- padding-left: 1em;
- padding-bottom: 1em;
- margin-top: 1em;
- font-family: fixed;
- white-space: pre;
- margin-bottom: 1em;
-}
-div.code_ex_title {
- position: relative;
- top: -1em;
- left: 30%;
- background: #cdcd82;
- border: 1px solid black;
- color: black;
- text-transform: uppercase;
- width: 40%;
- padding: 0.3em;
- text-align: center;
-}
-
-span.symbol {
- font-weight: bolder;
-}
-
-
-span.optional {
- font-style: italic;
-}
-
-div.note {
- background: #cdcd82;
- border: 1px solid black;
- padding: 1em;
- margin-top: 1em;
- margin-bottom: 1em;
-}
diff --git a/mcs/class/monodoc/Resources/helper.js b/mcs/class/monodoc/Resources/helper.js
deleted file mode 100755
index 2889c1b2165..00000000000
--- a/mcs/class/monodoc/Resources/helper.js
+++ /dev/null
@@ -1,12 +0,0 @@
-function toggle_display (block) {
- var w = document.getElementById (block);
- var t = document.getElementById (block + ":toggle");
- if (w.style.display == "none") {
- w.style.display = "block";
- t.getElementsByTagName("img")[0].setAttribute ("src", "xtree/images/clean/Lminus.gif"); // <img src="xtree/images/clean/Lminus.gif">
- } else {
- w.style.display = "none";
- t.getElementsByTagName("img")[0].setAttribute ("src", "xtree/images/clean/Lplus.gif"); // <img src="xtree/images/clean/Lplus.gif">
- }
-}
-
diff --git a/mcs/class/monodoc/Resources/home.html b/mcs/class/monodoc/Resources/home.html
deleted file mode 100644
index dde2ec9dead..00000000000
--- a/mcs/class/monodoc/Resources/home.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-<head>
-<link type="text/css" rel="stylesheet" href="mono-ecma.css"/>
-</head>
-
-<body>
- <div class="Content">
- <p>The following documentation collections are available:</p>
-
- <div id="docs">
- <ul>
- @@API_DOCS@@
- </ul>
- </div>
- </div>
-</body>
-</html>
diff --git a/mcs/class/monodoc/Resources/images/bc_bg.png b/mcs/class/monodoc/Resources/images/bc_bg.png
deleted file mode 100644
index 6f7bca783cf..00000000000
--- a/mcs/class/monodoc/Resources/images/bc_bg.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/bc_separator.png b/mcs/class/monodoc/Resources/images/bc_separator.png
deleted file mode 100644
index c137258bd72..00000000000
--- a/mcs/class/monodoc/Resources/images/bc_separator.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/error.png b/mcs/class/monodoc/Resources/images/error.png
deleted file mode 100644
index 628cf2dae3d..00000000000
--- a/mcs/class/monodoc/Resources/images/error.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/hatch.png b/mcs/class/monodoc/Resources/images/hatch.png
deleted file mode 100644
index 33bf2c2ecd7..00000000000
--- a/mcs/class/monodoc/Resources/images/hatch.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/headerbg.png b/mcs/class/monodoc/Resources/images/headerbg.png
deleted file mode 100644
index 15575da474f..00000000000
--- a/mcs/class/monodoc/Resources/images/headerbg.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/help.png b/mcs/class/monodoc/Resources/images/help.png
deleted file mode 100644
index 5c870176d4d..00000000000
--- a/mcs/class/monodoc/Resources/images/help.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/house.png b/mcs/class/monodoc/Resources/images/house.png
deleted file mode 100644
index fed62219f57..00000000000
--- a/mcs/class/monodoc/Resources/images/house.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/members.png b/mcs/class/monodoc/Resources/images/members.png
deleted file mode 100644
index 4a8672bde48..00000000000
--- a/mcs/class/monodoc/Resources/images/members.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/namespace.png b/mcs/class/monodoc/Resources/images/namespace.png
deleted file mode 100644
index 2bc1624cb46..00000000000
--- a/mcs/class/monodoc/Resources/images/namespace.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/privclass.png b/mcs/class/monodoc/Resources/images/privclass.png
deleted file mode 100644
index bb0c8713cb4..00000000000
--- a/mcs/class/monodoc/Resources/images/privclass.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/privdelegate.png b/mcs/class/monodoc/Resources/images/privdelegate.png
deleted file mode 100644
index a5b470e3bdd..00000000000
--- a/mcs/class/monodoc/Resources/images/privdelegate.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/privenumeration.png b/mcs/class/monodoc/Resources/images/privenumeration.png
deleted file mode 100644
index df2c3c903ca..00000000000
--- a/mcs/class/monodoc/Resources/images/privenumeration.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/privevent.png b/mcs/class/monodoc/Resources/images/privevent.png
deleted file mode 100644
index e1d3887413e..00000000000
--- a/mcs/class/monodoc/Resources/images/privevent.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/privextension.png b/mcs/class/monodoc/Resources/images/privextension.png
deleted file mode 100644
index d336ddde38b..00000000000
--- a/mcs/class/monodoc/Resources/images/privextension.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/privfield.png b/mcs/class/monodoc/Resources/images/privfield.png
deleted file mode 100644
index 0b246cf1505..00000000000
--- a/mcs/class/monodoc/Resources/images/privfield.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/privinterface.png b/mcs/class/monodoc/Resources/images/privinterface.png
deleted file mode 100644
index cde4b50fb52..00000000000
--- a/mcs/class/monodoc/Resources/images/privinterface.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/privmethod.png b/mcs/class/monodoc/Resources/images/privmethod.png
deleted file mode 100644
index d698426ff60..00000000000
--- a/mcs/class/monodoc/Resources/images/privmethod.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/privproperty.png b/mcs/class/monodoc/Resources/images/privproperty.png
deleted file mode 100644
index 41a008d0efd..00000000000
--- a/mcs/class/monodoc/Resources/images/privproperty.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/privstructure.png b/mcs/class/monodoc/Resources/images/privstructure.png
deleted file mode 100644
index ff064e61acd..00000000000
--- a/mcs/class/monodoc/Resources/images/privstructure.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/protclass.png b/mcs/class/monodoc/Resources/images/protclass.png
deleted file mode 100644
index 0c32ce00f0f..00000000000
--- a/mcs/class/monodoc/Resources/images/protclass.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/protdelegate.png b/mcs/class/monodoc/Resources/images/protdelegate.png
deleted file mode 100644
index ca44396891d..00000000000
--- a/mcs/class/monodoc/Resources/images/protdelegate.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/protenumeration.png b/mcs/class/monodoc/Resources/images/protenumeration.png
deleted file mode 100644
index 14a4cf3d167..00000000000
--- a/mcs/class/monodoc/Resources/images/protenumeration.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/protevent.png b/mcs/class/monodoc/Resources/images/protevent.png
deleted file mode 100644
index 613e88eb0fd..00000000000
--- a/mcs/class/monodoc/Resources/images/protevent.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/protextension.png b/mcs/class/monodoc/Resources/images/protextension.png
deleted file mode 100644
index f350d554b3a..00000000000
--- a/mcs/class/monodoc/Resources/images/protextension.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/protfield.png b/mcs/class/monodoc/Resources/images/protfield.png
deleted file mode 100644
index 6e085535ee6..00000000000
--- a/mcs/class/monodoc/Resources/images/protfield.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/protinterface.png b/mcs/class/monodoc/Resources/images/protinterface.png
deleted file mode 100644
index 4579a76ec2a..00000000000
--- a/mcs/class/monodoc/Resources/images/protinterface.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/protmethod.png b/mcs/class/monodoc/Resources/images/protmethod.png
deleted file mode 100644
index 4ecb6ffe021..00000000000
--- a/mcs/class/monodoc/Resources/images/protmethod.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/protproperty.png b/mcs/class/monodoc/Resources/images/protproperty.png
deleted file mode 100644
index f79838aec15..00000000000
--- a/mcs/class/monodoc/Resources/images/protproperty.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/protstructure.png b/mcs/class/monodoc/Resources/images/protstructure.png
deleted file mode 100644
index 9b806ccd37c..00000000000
--- a/mcs/class/monodoc/Resources/images/protstructure.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/pubclass.png b/mcs/class/monodoc/Resources/images/pubclass.png
deleted file mode 100644
index 75315583f96..00000000000
--- a/mcs/class/monodoc/Resources/images/pubclass.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/pubdelegate.png b/mcs/class/monodoc/Resources/images/pubdelegate.png
deleted file mode 100644
index 19368a6b35e..00000000000
--- a/mcs/class/monodoc/Resources/images/pubdelegate.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/pubenumeration.png b/mcs/class/monodoc/Resources/images/pubenumeration.png
deleted file mode 100644
index 9adab41f726..00000000000
--- a/mcs/class/monodoc/Resources/images/pubenumeration.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/pubevent.png b/mcs/class/monodoc/Resources/images/pubevent.png
deleted file mode 100644
index 7abef6379d9..00000000000
--- a/mcs/class/monodoc/Resources/images/pubevent.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/pubextension.png b/mcs/class/monodoc/Resources/images/pubextension.png
deleted file mode 100644
index 07253064960..00000000000
--- a/mcs/class/monodoc/Resources/images/pubextension.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/pubfield.png b/mcs/class/monodoc/Resources/images/pubfield.png
deleted file mode 100644
index c2fc5a2b363..00000000000
--- a/mcs/class/monodoc/Resources/images/pubfield.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/pubinterface.png b/mcs/class/monodoc/Resources/images/pubinterface.png
deleted file mode 100644
index 050ea993730..00000000000
--- a/mcs/class/monodoc/Resources/images/pubinterface.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/pubmethod.png b/mcs/class/monodoc/Resources/images/pubmethod.png
deleted file mode 100644
index 50ad06d6ca7..00000000000
--- a/mcs/class/monodoc/Resources/images/pubmethod.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/pubproperty.png b/mcs/class/monodoc/Resources/images/pubproperty.png
deleted file mode 100644
index 2f0ef15dcfa..00000000000
--- a/mcs/class/monodoc/Resources/images/pubproperty.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/pubstructure.png b/mcs/class/monodoc/Resources/images/pubstructure.png
deleted file mode 100644
index 161f2fcd671..00000000000
--- a/mcs/class/monodoc/Resources/images/pubstructure.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/reference.png b/mcs/class/monodoc/Resources/images/reference.png
deleted file mode 100644
index 9720bf8411a..00000000000
--- a/mcs/class/monodoc/Resources/images/reference.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/images/treebg.png b/mcs/class/monodoc/Resources/images/treebg.png
deleted file mode 100644
index a5588a99a0b..00000000000
--- a/mcs/class/monodoc/Resources/images/treebg.png
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Resources/mdoc-html-format.xsl b/mcs/class/monodoc/Resources/mdoc-html-format.xsl
deleted file mode 100644
index 10acd9c3b6a..00000000000
--- a/mcs/class/monodoc/Resources/mdoc-html-format.xsl
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- mdoc-html-format.xsl: HTML pass-through formatting support
-
- Author: Jonathan Pryor (jpryor@novell.com)
-
--->
-
-<xsl:stylesheet
- version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- >
-
- <!-- pass-through any other elements unchanged - they may be HTML -->
- <xsl:template match="//format[@type='text/html']//*">
- <xsl:copy>
- <xsl:copy-of select="@*" />
- <xsl:apply-templates select="*|node()" />
- </xsl:copy>
- </xsl:template>
-
-</xsl:stylesheet>
-
diff --git a/mcs/class/monodoc/Resources/mdoc-html-utils.xsl b/mcs/class/monodoc/Resources/mdoc-html-utils.xsl
deleted file mode 100644
index 43983af55cf..00000000000
--- a/mcs/class/monodoc/Resources/mdoc-html-utils.xsl
+++ /dev/null
@@ -1,2808 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- mdoc-html-utils.xsl: ECMA-style docs to HTML stylesheet transformation utils
-
- Author: Joshua Tauberer (tauberer@for.net)
- Author: Jonathan Pryor (jpryor@novell.com)
-
- This file requires that including files define the following callable
- templates:
- - CreateCodeBlock (language, content)
- - CreateEnumerationTable (content)
- - CreateHeader (content)
- - CreateListTable (header, content)
- - CreateMembersTable (content)
- - CreateSignature (content)
- - CreateTypeDocumentationTable (content)
- - GetLinkTarget (type, cref)
- - CreateEditLink (e)
-
--->
-
-<xsl:stylesheet
- version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:msxsl="urn:schemas-microsoft-com:xslt"
- exclude-result-prefixes="msxsl"
- >
- <xsl:import href="mdoc-html-format.xsl" />
-
- <!-- TEMPLATE PARAMETERS -->
- <xsl:param name="language" select="'C#'"/>
- <xsl:param name="index" />
- <xsl:param name="source-id"/>
-
- <xsl:variable name="ThisType" select="/Type"/>
-
- <!-- The namespace that the current type belongs to. -->
- <xsl:variable name="TypeNamespace" select="substring(/Type/@FullName, 1, string-length(/Type/@FullName) - string-length(/Type/@Name) - 1)"/>
-
- <!-- THE MAIN RENDERING TEMPLATE -->
-
- <!-- TYPE OVERVIEW -->
-
- <xsl:template name="CreateTypeOverview">
- <xsl:param name="implemented" />
- <xsl:param name="show-members-link" />
-
- <xsl:attribute name="id">
- <xsl:text>T:</xsl:text>
- <xsl:call-template name="GetEscapedTypeName">
- <xsl:with-param name="typename" select="@FullName" />
- </xsl:call-template>
- <xsl:text>:Summary</xsl:text>
- </xsl:attribute>
- <!-- summary -->
- <div class="msummary">
- <xsl:apply-templates select="Docs/summary" mode="notoppara"/>
- <xsl:apply-templates select="Docs/summary" mode="editlink"/>
- </div>
-
- <xsl:if test="$implemented">
- <p><b>Mono Implementation Note: </b></p>
- <blockquote>
- <xsl:value-of disable-output-escaping="yes" select="$implemented"/>
- </blockquote>
- </xsl:if>
-
- <xsl:if test="$show-members-link and not(Base/BaseTypeName='System.Enum' or Base/BaseTypeName='System.Delegate' or Base/BaseTypeName='System.MulticastDelegate') and count(Members)">
- <p>
- See Also:
- <a>
- <xsl:attribute name="href">
- <xsl:text>T</xsl:text>
- <xsl:call-template name="GetLinkId">
- <xsl:with-param name="type" select="." />
- <xsl:with-param name="member" select="." />
- </xsl:call-template>
- <xsl:text>/*</xsl:text>
- </xsl:attribute>
- <xsl:value-of select="translate(@Name, '+', '.')"/>
- <xsl:value-of select="' '" />
- <xsl:text>Members</xsl:text>
- </a>
- </p>
- </xsl:if>
-
- <!--
- Inheritance tree, but only for non-standard classes and not for interfaces
- -->
- <xsl:if test="not(Base/BaseTypeName='System.Enum' or Base/BaseTypeName='System.Delegate' or Base/BaseTypeName='System.ValueType' or Base/BaseTypeName='System.Object' or Base/BaseTypeName='System.MulticatDelegate' or count(Base/ParentType)=0)">
- <p>
- <xsl:for-each select="Base/ParentType">
- <xsl:sort select="@Order" order="descending"/>
- <xsl:variable name="p" select="position()" />
- <xsl:for-each select="parent::Base/ParentType[position() &lt; $p]">
- <xsl:value-of select="'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'" disable-output-escaping="yes"/>
- </xsl:for-each>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="GetLinkTargetHtml">
- <xsl:with-param name="type" select="@Type" />
- <xsl:with-param name="cref">
- <xsl:text>T:</xsl:text>
- <xsl:call-template name="GetEscapedTypeName">
- <xsl:with-param name="typename" select="@Type" />
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:value-of select="@Type"/>
- </a>
- <br/>
- </xsl:for-each>
-
- <xsl:for-each select="Base/ParentType">
- <xsl:value-of select="'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'" disable-output-escaping="yes"/>
- </xsl:for-each>
- <xsl:value-of select="@FullName"/>
- </p>
- </xsl:if>
- <!--
- <xsl:if test="Base/BaseTypeName='System.Enum'">
- <br/>
- The type of the values in this enumeration is
- <xsl:apply-templates select="Members/Member[@MemberName='value__']/ReturnValue/ReturnType" mode="typelink"><xsl:with-param name="wrt" select="$TypeNamespace"/></xsl:apply-templates>.
- </xsl:if>
- -->
- </xsl:template>
-
- <xsl:template name="CreateTypeSignature">
- <xsl:call-template name="CreateSignature">
- <xsl:with-param name="id">
- <xsl:text>T:</xsl:text>
- <xsl:call-template name="GetEscapedTypeName">
- <xsl:with-param name="typename" select="@FullName" />
- </xsl:call-template>
- <xsl:text>:Signature</xsl:text>
- </xsl:with-param>
- <xsl:with-param name="content">
- <!-- signature -->
- <xsl:choose>
- <xsl:when test="$language='C#'">
-
- <xsl:for-each select="Attributes/Attribute">
- <xsl:text>[</xsl:text>
- <xsl:value-of select="AttributeName"/>
- <xsl:text>]</xsl:text>
- <br/>
- </xsl:for-each>
-
- <xsl:for-each select="ReturnValue/Attributes/Attribute">
- <xsl:text>[return:</xsl:text>
- <xsl:value-of select="AttributeName"/>
- <xsl:text>]</xsl:text>
- <br/>
- </xsl:for-each>
-
- <xsl:choose>
-
- <xsl:when test="Base/BaseTypeName='System.Enum'">
- <xsl:call-template name="getmodifiers">
- <xsl:with-param name="sig" select="TypeSignature[@Language='C#']/@Value"/>
- </xsl:call-template>
-
- <xsl:text>enum </xsl:text>
-
- <!-- member name, argument list -->
- <b>
- <xsl:value-of select="translate (@Name, '+', '.')"/>
- </b>
- </xsl:when>
-
- <xsl:when test="Base/BaseTypeName='System.Delegate' or Base/BaseTypeName='System.MulticastDelegate'">
- <xsl:choose>
-
- <xsl:when test="count(Parameters) &gt; 0 and count(ReturnValue) &gt; 0">
- <!-- Only recreate the delegate signature if the appropriate information
- is present in the XML file. -->
-
- <xsl:call-template name="getmodifiers">
- <xsl:with-param name="sig" select="TypeSignature[@Language='C#']/@Value"/>
- </xsl:call-template>
-
- <xsl:text>delegate </xsl:text>
-
- <xsl:apply-templates select="ReturnValue/ReturnType" mode="typelink"><xsl:with-param name="wrt" select="$TypeNamespace"/></xsl:apply-templates>
-
- <!-- hard space -->
- <xsl:value-of select="' '"/>
-
- <!-- member name, argument list -->
- <b>
- <xsl:call-template name="GetDefinitionName">
- <xsl:with-param name="name" select="translate (@Name, '+', '.')" />
- <xsl:with-param name="TypeParameters" select="TypeParameters" />
- </xsl:call-template>
- </b>
-
- <!-- hard space -->
- <xsl:value-of select="' '"/>
-
- <xsl:value-of select="'('"/> <!-- prevents whitespace issues -->
-
- <xsl:for-each select="Parameters/Parameter">
- <xsl:call-template name="ShowParameter">
- <xsl:with-param name="Param" select="."/>
- <xsl:with-param name="TypeNamespace" select="$TypeNamespace"/>
- </xsl:call-template>
-
- <xsl:if test="not(position()=last())">, </xsl:if>
- </xsl:for-each>
-
- <xsl:value-of select="')'"/>
-
- </xsl:when>
-
- <xsl:otherwise>
- <xsl:apply-templates select="TypeSignature[@Language=$language]/@Value"/>
- </xsl:otherwise>
-
- </xsl:choose>
-
-
- </xsl:when>
-
- <xsl:otherwise>
- <xsl:call-template name="getmodifiers">
- <xsl:with-param name="sig" select="TypeSignature[@Language='C#']/@Value"/>
- <xsl:with-param name="typetype" select="true()"/>
- </xsl:call-template>
-
- <xsl:value-of select="' '"/>
-
- <b>
- <xsl:call-template name="GetDefinitionName">
- <xsl:with-param name="name" select="translate (@Name, '+', '.')" />
- <xsl:with-param name="TypeParameters" select="TypeParameters" />
- </xsl:call-template>
- </b>
-
- <xsl:variable name="HasStandardBaseType" select="Base/BaseTypeName='System.Object' or Base/BaseTypeName='System.ValueType'"/>
- <xsl:variable name="HasBaseType" select="count(Base/BaseTypeName)>0"/>
- <xsl:if test="(($HasBaseType) and not($HasStandardBaseType)) or not(count(Interfaces/Interface)=0)">
- <xsl:text> : </xsl:text>
-
- <xsl:if test="$HasBaseType and not($HasStandardBaseType)">
- <xsl:apply-templates select="Base/BaseTypeName" mode="typelink"><xsl:with-param name="wrt" select="$TypeNamespace"/></xsl:apply-templates>
- <xsl:if test="not(count(Interfaces/Interface)=0)">, </xsl:if>
- </xsl:if>
-
- <xsl:for-each select="Interfaces/Interface">
- <xsl:if test="not(position()=1)">, </xsl:if>
- <xsl:apply-templates select="InterfaceName" mode="typelink"><xsl:with-param name="wrt" select="$TypeNamespace"/></xsl:apply-templates>
- </xsl:for-each>
-
- </xsl:if>
- </xsl:otherwise>
-
- </xsl:choose>
-
- <xsl:call-template name="CreateGenericConstraints">
- <xsl:with-param name="TypeParameters" select="TypeParameters" />
- </xsl:call-template>
-
- </xsl:when>
-
- <xsl:otherwise>
- <xsl:apply-templates select="TypeSignature[@Language=$language]/@Value"/>
- </xsl:otherwise>
-
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template name="GetDefinitionName">
- <xsl:param name="name" />
- <xsl:param name="TypeParameters" />
-
- <xsl:choose>
- <!-- do NOT process explicitly implemented generic interface members
- unless they're actually generic methods. -->
- <xsl:when test="contains ($name, '&gt;') and
- '&gt;' = substring ($name, string-length ($name), 1)">
- <xsl:value-of select="substring-before ($name, '&lt;')" />
- <xsl:text>&lt;</xsl:text>
- <xsl:for-each select="$TypeParameters/TypeParameter">
- <xsl:for-each select="Attributes/Attribute">
- <xsl:text>[</xsl:text>
- <xsl:value-of select="AttributeName"/>
- <xsl:text>] </xsl:text>
- </xsl:for-each>
- <xsl:choose>
- <xsl:when test="@Name">
- <xsl:value-of select="@Name" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="." />
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="not(position()=last())">, </xsl:if>
- </xsl:for-each>
- <xsl:text>&gt;</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$name" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="CreateGenericConstraints">
- <xsl:param name="TypeParameters" />
-
- <xsl:for-each select="$TypeParameters/TypeParameter">
- <xsl:variable name="constraintsCount" select="count(Constraints/*)" />
- <xsl:if test="$constraintsCount > 0 and count(Constraints/*[.='Contravariant' or .='Covariant']) != $constraintsCount">
- <xsl:call-template name="CreateGenericParameterConstraints">
- <xsl:with-param name="constraints" select="Constraints" />
- </xsl:call-template>
- </xsl:if>
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template name="CreateGenericParameterConstraints">
- <xsl:param name="constraints" />
-
- <br />
- <xsl:text> where </xsl:text>
- <xsl:value-of select="@Name" />
- <xsl:text> : </xsl:text>
- <xsl:variable name="kind"
- select="count($constraints[ParameterAttribute='ReferenceTypeConstraint'])+
- count($constraints[ParameterAttribute='NotNullableValueTypeConstraint'])" />
- <xsl:variable name="base" select="count($constraints/BaseTypeName)" />
- <xsl:variable name="iface" select="count($constraints/InterfaceName)" />
- <xsl:variable name="struct" select="$constraints/ParameterAttribute='NotNullableValueTypeConstraint'" />
- <xsl:if test="$constraints/ParameterAttribute='ReferenceTypeConstraint'">
- <xsl:text>class</xsl:text>
- </xsl:if>
- <xsl:if test="$constraints/ParameterAttribute='NotNullableValueTypeConstraint'">
- <xsl:text>struct</xsl:text>
- </xsl:if>
- <xsl:if test="$constraints/BaseTypeName and not($struct)">
- <xsl:if test="$kind">, </xsl:if>
- <xsl:apply-templates select="$constraints/BaseTypeName" mode="typelink" />
- </xsl:if>
- <xsl:for-each select="$constraints/InterfaceName">
- <xsl:if test="position()=1">
- <xsl:if test="$kind or $base">, </xsl:if>
- </xsl:if>
- <xsl:apply-templates select="." mode="typelink" />
- <xsl:if test="not(position()=last())">, </xsl:if>
- </xsl:for-each>
- <xsl:if test="$constraints/ParameterAttribute='DefaultConstructorConstraint' and not($struct)">
- <xsl:if test="$base or $iface">, </xsl:if>
- <xsl:text>new()</xsl:text>
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="CreateMemberOverview">
- <xsl:param name="implemented" />
-
- <div class="msummary">
- <xsl:apply-templates select="Docs/summary" mode="notoppara"/>
- <xsl:apply-templates select="Docs/summary" mode="editlink"/>
- </div>
-
- <xsl:if test="$implemented">
- <p><b>Mono Implementation Note: </b></p>
- <blockquote>
- <xsl:value-of disable-output-escaping="yes" select="$implemented"/>
- </blockquote>
- </xsl:if>
-
- <!-- member value -->
- <xsl:if test="MemberValue">
- <p><b>Value: </b>
- <xsl:value-of select="MemberValue"/>
- </p>
- </xsl:if>
-
- </xsl:template>
-
- <xsl:template name="CreateRelatedSection">
- <xsl:param name="section" />
- <xsl:param name="type" />
- <xsl:if test="count(Docs/related[@type=$type])">
- <h3 class="{$type}"><xsl:value-of select="$section" /></h3>
- <ul class="{$type}">
- <xsl:for-each select="Docs/related[@type=$type]">
- <li><a href="{@href}" target="_blank"><xsl:value-of select="." /></a></li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="CreatePlatformRequirements">
- <!-- For now we only have that information in MonoTouch so only process that -->
- <xsl:if test="starts-with(/Type/@FullName, 'MonoTouch')">
- <xsl:choose>
- <!-- We first check if we have a [Since] at the member level -->
- <xsl:when test="count(Attributes/Attribute/AttributeName[starts-with(text(), 'MonoTouch.ObjCRuntime.Since')])">
- <b>Minimum iOS version: </b>
- <xsl:value-of select="translate(substring-before (substring-after (Attributes/Attribute/AttributeName[starts-with(text(), 'MonoTouch.ObjCRuntime.Since')], 'MonoTouch.ObjCRuntime.Since('), ')'), ', ', '.')" />
- <br />
- </xsl:when>
- <!-- If not, we then check at the type level -->
- <xsl:when test="count(/Type/Attributes/Attribute/AttributeName[starts-with(text(), 'MonoTouch.ObjCRuntime.Since')])">
- <b>Minimum iOS version: </b>
- <xsl:value-of select="translate(substring-before (substring-after (/Type/Attributes/Attribute/AttributeName[starts-with(text(), 'MonoTouch.ObjCRuntime.Since')], 'MonoTouch.ObjCRuntime.Since('), ')'), ', ', '.')" />
- <br />
- </xsl:when>
- </xsl:choose>
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="CreateMemberSignature">
- <xsl:param name="linkid" select="''" />
-
- <xsl:call-template name="CreateSignature">
- <xsl:with-param name="content">
- <xsl:if test="contains(MemberSignature[@Language='C#']/@Value,'this[')">
- <p><i>This is the default property for this class.</i></p>
- </xsl:if>
-
- <!-- recreate the signature -->
-
- <xsl:for-each select="Attributes/Attribute[AttributeName != 'System.Runtime.CompilerServices.Extension']">
- <xsl:text>[</xsl:text>
- <xsl:value-of select="AttributeName"/>
- <xsl:text>]</xsl:text>
- <br/>
- </xsl:for-each>
-
- <xsl:for-each select="ReturnValue/Attributes/Attribute">
- <xsl:text>[return:</xsl:text>
- <xsl:value-of select="AttributeName"/>
- <xsl:text>]</xsl:text>
- <br/>
- </xsl:for-each>
-
- <xsl:call-template name="getmodifiers">
- <xsl:with-param name="sig" select="MemberSignature[@Language='C#']/@Value"/>
- </xsl:call-template>
-
- <xsl:if test="MemberType = 'Event'">
- <xsl:text>event </xsl:text>
-
- <xsl:if test="ReturnValue/ReturnType=''">
- <xsl:value-of select="substring-before(substring-after(MemberSignature[@Language='C#']/@Value, 'event '), concat(' ', @MemberName))"/>
- </xsl:if>
- </xsl:if>
-
- <!-- return value (comes out "" where not applicable/available) -->
- <xsl:choose>
- <xsl:when test="@MemberName='op_Implicit'">
- <xsl:text>implicit operator</xsl:text>
- </xsl:when>
- <xsl:when test="@MemberName='op_Explicit'">
- <xsl:text>explicit operator</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="ReturnValue/ReturnType" mode="typelink">
- <xsl:with-param name="wrt" select="$TypeNamespace"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
-
- <!-- hard space -->
- <xsl:value-of select="' '"/>
-
- <!-- member name -->
- <xsl:choose>
-
- <!-- Constructors get the name of the class -->
- <xsl:when test="MemberType='Constructor'">
- <b>
- <xsl:call-template name="GetConstructorName">
- <xsl:with-param name="type" select="../.." />
- <xsl:with-param name="ctor" select="." />
- </xsl:call-template>
- </b>
- </xsl:when>
-
- <!-- Conversion operators get the return type -->
- <xsl:when test="@MemberName='op_Implicit' or @MemberName='op_Explicit'">
- <xsl:apply-templates select="ReturnValue/ReturnType" mode="typelink">
- <xsl:with-param name="wrt" select="$TypeNamespace"/>
- </xsl:apply-templates>
- </xsl:when>
-
- <!-- Regular operators get their symbol -->
- <xsl:when test="@MemberName='op_UnaryPlus'">operator+</xsl:when>
- <xsl:when test="@MemberName='op_UnaryNegation'">operator-</xsl:when>
- <xsl:when test="@MemberName='op_LogicalNot'">operator!</xsl:when>
- <xsl:when test="@MemberName='op_OnesComplement'">operator~</xsl:when>
- <xsl:when test="@MemberName='op_Increment'">operator++</xsl:when>
- <xsl:when test="@MemberName='op_Decrement'">operator--</xsl:when>
- <xsl:when test="@MemberName='op_True'">operator true</xsl:when>
- <xsl:when test="@MemberName='op_False'">operator false</xsl:when>
- <xsl:when test="@MemberName='op_Addition'">operator+</xsl:when>
- <xsl:when test="@MemberName='op_Subtraction'">operator-</xsl:when>
- <xsl:when test="@MemberName='op_Multiply'">operator*</xsl:when>
- <xsl:when test="@MemberName='op_Division'">operator/</xsl:when>
- <xsl:when test="@MemberName='op_Modulus'">operator%</xsl:when>
- <xsl:when test="@MemberName='op_BitwiseAnd'">operator&amp;</xsl:when>
- <xsl:when test="@MemberName='op_BitwiseOr'">operator|</xsl:when>
- <xsl:when test="@MemberName='op_ExclusiveOr'">operator^</xsl:when>
- <xsl:when test="@MemberName='op_LeftShift'">operator&lt;&lt;</xsl:when>
- <xsl:when test="@MemberName='op_RightShift'">operator&gt;&gt;</xsl:when>
- <xsl:when test="@MemberName='op_Equality'">operator==</xsl:when>
- <xsl:when test="@MemberName='op_Inequality'">operator!=</xsl:when>
- <xsl:when test="@MemberName='op_GreaterThan'">operator&gt;</xsl:when>
- <xsl:when test="@MemberName='op_LessThan'">operator&lt;</xsl:when>
- <xsl:when test="@MemberName='op_GreaterThanOrEqual'">operator&gt;=</xsl:when>
- <xsl:when test="@MemberName='op_LessThanOrEqual'">operator&lt;=</xsl:when>
-
- <xsl:when test="MemberType='Property' and count(Parameters/Parameter) &gt; 0">
- <!-- C# only permits indexer properties to have arguments -->
- <xsl:text>this</xsl:text>
- </xsl:when>
-
- <!-- Everything else just gets its name -->
- <xsl:when test="contains (@MemberName, '&lt;')">
- <b>
- <xsl:call-template name="GetDefinitionName">
- <xsl:with-param name="name" select="@MemberName" />
- <xsl:with-param name="TypeParameters" select="TypeParameters" />
- </xsl:call-template>
- </b>
- </xsl:when>
-
- <xsl:otherwise>
- <b><xsl:value-of select="@MemberName"/></b>
- </xsl:otherwise>
- </xsl:choose>
-
- <!-- hard space -->
- <xsl:value-of select="' '"/>
-
- <!-- argument list -->
- <xsl:if test="MemberType='Method' or MemberType='Constructor' or (MemberType='Property' and count(Parameters/Parameter))">
- <xsl:if test="not(MemberType='Property')">(</xsl:if>
- <xsl:if test="MemberType='Property'">[</xsl:if>
-
- <xsl:for-each select="Parameters/Parameter">
- <xsl:call-template name="ShowParameter">
- <xsl:with-param name="Param" select="."/>
- <xsl:with-param name="TypeNamespace" select="$TypeNamespace"/>
- </xsl:call-template>
-
- <xsl:if test="not(position()=last())">, </xsl:if>
- </xsl:for-each>
- <xsl:if test="not(MemberType='Property')">)</xsl:if>
- <xsl:if test="MemberType='Property'">]</xsl:if>
- </xsl:if>
-
- <xsl:if test="MemberType='Property'">
- <xsl:value-of select="' '"/>
- <xsl:text>{</xsl:text>
- <xsl:value-of select="substring-before(substring-after(MemberSignature[@Language='C#']/@Value, '{'), '}')"/>
- <xsl:text>}</xsl:text>
- </xsl:if>
- <xsl:call-template name="CreateGenericConstraints">
- <xsl:with-param name="TypeParameters" select="TypeParameters" />
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
-
- </xsl:template>
-
- <xsl:template name="GetConstructorName">
- <xsl:param name="type" />
- <xsl:param name="ctor" />
-
- <xsl:choose>
- <xsl:when test="contains($type/@Name, '&lt;')">
- <xsl:value-of select="translate (substring-before ($type/@Name, '&lt;'), '+', '.')" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="translate ($type/@Name, '+', '.')" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="ShowParameter">
- <xsl:param name="Param"/>
- <xsl:param name="TypeNamespace"/>
- <xsl:param name="prototype" select="false()"/>
-
- <xsl:if test="not($prototype)">
- <xsl:for-each select="$Param/Attributes/Attribute[not(Exclude='1') and not(AttributeName='ParamArrayAttribute' or AttributeName='System.ParamArray')]">
- <xsl:text>[</xsl:text>
- <xsl:value-of select="AttributeName"/>
- <xsl:text>]</xsl:text>
- <xsl:value-of select="' '"/>
- </xsl:for-each>
- </xsl:if>
-
- <xsl:if test="count($Param/Attributes/Attribute/AttributeName[.='ParamArrayAttribute' or .='System.ParamArray'])">
- <b>params</b>
- <xsl:value-of select="' '"/>
- </xsl:if>
-
- <xsl:if test="$Param/@RefType">
- <i><xsl:value-of select="$Param/@RefType"/></i>
- <!-- hard space -->
- <xsl:value-of select="' '"/>
- </xsl:if>
-
- <!-- parameter type link -->
- <xsl:apply-templates select="$Param/@Type" mode="typelink">
- <xsl:with-param name="wrt" select="$TypeNamespace"/>
- </xsl:apply-templates>
-
- <xsl:if test="not($prototype)">
- <!-- hard space -->
- <xsl:value-of select="' '"/>
-
- <!-- parameter name -->
- <xsl:value-of select="$Param/@Name"/>
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="DisplayDocsInformation">
- <xsl:param name="linkid" />
-
- <!-- The namespace that the current type belongs to. -->
- <xsl:variable name="TypeNamespace" select="substring(@FullName, 1, string-length(@FullName) - string-length(@Name) - 1)"/>
-
- <!-- alt member: not sure what these are for, actually -->
-
- <xsl:if test="count(Docs/altmember)">
- <xsl:call-template name="CreateH4Section">
- <xsl:with-param name="name" select="'See Also'"/>
- <xsl:with-param name="child-id" select="concat ($linkid, ':See Also')" />
- <xsl:with-param name="content">
- <xsl:for-each select="Docs/altmember">
- <div><xsl:apply-templates select="@cref" mode="cref"/></div>
- </xsl:for-each>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
-
- <!-- parameters & return & value -->
-
- <xsl:if test="count(Docs/typeparam)">
- <xsl:call-template name="CreateH4Section">
- <xsl:with-param name="name" select="'Type Parameters'"/>
- <xsl:with-param name="child-id" select="concat ($linkid, ':Type Parameters')" />
- <xsl:with-param name="content">
- <dl>
- <xsl:for-each select="Docs/typeparam">
- <dt><i><xsl:value-of select="@name"/></i></dt>
- <dd>
- <xsl:apply-templates select="." mode="notoppara"/>
- <xsl:apply-templates select="." mode="editlink"/>
- </dd>
- </xsl:for-each>
- </dl>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="count(Docs/param)">
- <xsl:call-template name="CreateH4Section">
- <xsl:with-param name="name" select="'Parameters'"/>
- <xsl:with-param name="child-id" select="concat ($linkid, ':Parameters')" />
- <xsl:with-param name="content">
- <dl>
- <xsl:for-each select="Docs/param">
- <dt><i><xsl:value-of select="@name"/></i></dt>
- <dd>
- <xsl:apply-templates select="." mode="notoppara"/>
- <xsl:apply-templates select="." mode="editlink"/>
- </dd>
- </xsl:for-each>
- </dl>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="count(Docs/returns)">
- <xsl:call-template name="CreateH4Section">
- <xsl:with-param name="name" select="'Returns'"/>
- <xsl:with-param name="child-id" select="concat ($linkid, ':Returns')" />
- <xsl:with-param name="content">
- <xsl:apply-templates select="Docs/returns" mode="notoppara"/>
- <xsl:apply-templates select="Docs/returns" mode="editlink"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="count(Docs/value)">
- <xsl:call-template name="CreateH4Section">
- <xsl:with-param name="name" select="'Value'"/>
- <xsl:with-param name="child-id" select="concat ($linkid, ':Value')" />
- <xsl:with-param name="content">
- <xsl:apply-templates select="Docs/value" mode="notoppara"/>
- <xsl:apply-templates select="Docs/value" mode="editlink"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
-
- <!-- method/property/constructor exceptions -->
-
- <xsl:if test="count(Docs/exception)">
- <xsl:call-template name="CreateH4Section">
- <xsl:with-param name="name" select="'Exceptions'"/>
- <xsl:with-param name="child-id" select="concat ($linkid, ':Exceptions')" />
- <xsl:with-param name="content">
- <xsl:call-template name="CreateTypeDocumentationTable">
- <xsl:with-param name="content">
- <xsl:for-each select="Docs/exception">
- <tr valign="top">
- <td>
- <xsl:apply-templates select="@cref" mode="typelink">
- <xsl:with-param name="wrt" select="$TypeNamespace"/>
- </xsl:apply-templates>
- </td>
- <td>
- <xsl:apply-templates select="." mode="notoppara"/>
- <xsl:apply-templates select="." mode="editlink"/>
- </td>
- </tr>
- </xsl:for-each>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
-
- <!-- remarks -->
-
- <xsl:if test="count(Docs/remarks)">
- <xsl:call-template name="CreateH2Section">
- <xsl:with-param name="name" select="'Remarks'"/>
- <xsl:with-param name="child-id" select="concat ($linkid, ':Remarks')" />
- <xsl:with-param name="content">
- <xsl:apply-templates select="Docs/remarks" mode="notoppara"/>
- <xsl:apply-templates select="Docs/remarks" mode="editlink"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
-
- <!-- thread safety -->
-
- <xsl:if test="count(ThreadingSafetyStatement)">
- <xsl:call-template name="CreateH2Section">
- <xsl:with-param name="name" select="'Thread Safety'"/>
- <xsl:with-param name="child-id" select="concat ($linkid, ':Thread Safety')" />
- <xsl:with-param name="content">
- <xsl:apply-templates select="ThreadingSafetyStatement" mode="notoppara"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
-
-
- <!-- permissions -->
-
- <xsl:if test="count(Docs/permission)">
- <xsl:call-template name="CreateH2Section">
- <xsl:with-param name="name" select="'Permissions'"/>
- <xsl:with-param name="child-id" select="concat ($linkid, ':Permissions')" />
- <xsl:with-param name="content">
- <xsl:call-template name="CreateTypeDocumentationTable">
- <xsl:with-param name="content">
- <xsl:for-each select="Docs/permission">
- <tr valign="top">
- <td>
- <xsl:apply-templates select="@cref" mode="typelink">
- <xsl:with-param name="wrt" select="$TypeNamespace"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="." mode="editlink"/>
- </td>
- <td>
- <xsl:apply-templates select="." mode="notoppara"/>
- </td>
- </tr>
- </xsl:for-each>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
-
- <!-- enumeration values -->
-
- <xsl:if test="Base/BaseTypeName = 'System.Enum'">
- <xsl:call-template name="CreateH2Section">
- <xsl:with-param name="name" select="'Members'"/>
- <xsl:with-param name="child-id" select="concat ($linkid, ':Members')" />
- <xsl:with-param name="content">
- <xsl:call-template name="CreateEnumerationTable">
- <xsl:with-param name="content">
-
- <xsl:for-each select="Members/Member[MemberType='Field']">
- <xsl:if test="not(@MemberName='value__')">
- <tr valign="top"><td>
- <xsl:attribute name="id">
- <xsl:text>F:</xsl:text>
- <xsl:value-of select="translate (/Type/@FullName, '+', '.')" />
- <xsl:text>.</xsl:text>
- <xsl:value-of select="@MemberName" />
- </xsl:attribute>
- <b>
- <xsl:value-of select="@MemberName"/>
- </b>
- </td>
- <td>
- <xsl:apply-templates select="Docs/summary" mode="notoppara"/>
- <xsl:apply-templates select="Docs/summary" mode="editlink"/>
- </td>
- </tr>
- </xsl:if>
- </xsl:for-each>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
-
- <!-- examples -->
-
- <xsl:if test="count(Docs/example)">
- <xsl:for-each select="Docs/example">
- <xsl:call-template name="CreateH2Section">
- <xsl:with-param name="name" select="'Example'"/>
- <xsl:with-param name="child-id" select="concat ($linkid, ':Example:', position())" />
- <xsl:with-param name="content">
- <xsl:apply-templates select="." mode="notoppara"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:if>
-
- <!-- related content -->
- <xsl:if test="count(Docs/related)">
- <xsl:call-template name="CreateH2Section">
- <xsl:with-param name="name" select="'Related content'" />
- <xsl:with-param name="child-id" select="concat ($linkid, ':Related:')" />
- <xsl:with-param name="content">
- <div class="related">
- <xsl:call-template name="CreateRelatedSection">
- <xsl:with-param name="section" select="'Platform Docs'" />
- <xsl:with-param name="type" select="'PlatformDocAPI'" />
- </xsl:call-template>
- <xsl:call-template name="CreateRelatedSection">
- <xsl:with-param name="section" select="'Articles'" />
- <xsl:with-param name="type" select="'article'" />
- </xsl:call-template>
- <xsl:call-template name="CreateRelatedSection">
- <xsl:with-param name="section" select="'Recipes'" />
- <xsl:with-param name="type" select="'recipe'" />
- </xsl:call-template>
- <xsl:call-template name="CreateRelatedSection">
- <xsl:with-param name="section" select="'Samples'" />
- <xsl:with-param name="type" select="'sample'" />
- </xsl:call-template>
- <xsl:call-template name="CreateRelatedSection">
- <xsl:with-param name="section" select="'Related specifications'" />
- <xsl:with-param name="type" select="'specification'" />
- </xsl:call-template>
- <xsl:call-template name="CreateRelatedSection">
- <xsl:with-param name="section" select="'External Documentation'" />
- <xsl:with-param name="type" select="'externalDocumentation'" />
- </xsl:call-template>
- </div>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
-
- <xsl:call-template name="CreateH2Section">
- <xsl:with-param name="name" select="'Requirements'"/>
- <xsl:with-param name="child-id" select="concat ($linkid, ':Version Information')" />
- <xsl:with-param name="content">
- <xsl:call-template name="CreatePlatformRequirements" />
- <b>Namespace: </b><xsl:value-of select="substring(/Type/@FullName, 1, string-length(/Type/@FullName) - string-length(/Type/@Name) - 1)" />
- <xsl:if test="count(/Type/AssemblyInfo/AssemblyName) &gt; 0">
- <br />
- <b>Assembly: </b>
- <xsl:value-of select="/Type/AssemblyInfo/AssemblyName" />
- <xsl:text> (in </xsl:text>
- <xsl:value-of select="/Type/AssemblyInfo/AssemblyName" />
- <xsl:text>.dll)</xsl:text>
- </xsl:if>
- <xsl:if test="count(AssemblyInfo/AssemblyVersion) &gt; 0">
- <br />
- <b>Assembly Versions: </b>
- <xsl:for-each select="AssemblyInfo/AssemblyVersion">
- <xsl:if test="not(position()=1)">, </xsl:if>
- <xsl:value-of select="."/>
- </xsl:for-each>
- </xsl:if>
- <xsl:if test="count(Docs/since) &gt; 0">
- <br />
- <b>Since: </b>
- <xsl:for-each select="Docs/since">
- <xsl:if test="not(position()=1)">; </xsl:if>
- <xsl:value-of select="@version"/>
- </xsl:for-each>
- </xsl:if>
- <xsl:if test="count(Docs/since)=0 and count(/Type/Docs/since) &gt; 0">
- <br />
- <b>Since: </b>
- <xsl:for-each select="/Type/Docs/since">
- <xsl:if test="not(position()=1)">; </xsl:if>
- <xsl:value-of select="@version"/>
- </xsl:for-each>
- </xsl:if>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:template>
-
-
- <!-- Transforms the contents of the selected node into a hyperlink to the type named by the node. The node can contain a type name (eg System.Object) or a type link (eg T:System.String). Use wrt parameter to specify the current namespace. -->
-
- <xsl:template match="*|@*" mode="typelink">
- <xsl:param name="wrt" select="'notset'"/>
-
- <xsl:call-template name="maketypelink">
- <xsl:with-param name="type" select="."/>
- <xsl:with-param name="wrt" select="$wrt"/>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template name="makenamespacelink">
- <xsl:param name="cref" select="''"/>
-
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="GetLinkTargetHtml">
- <xsl:with-param name="cref" select="$cref" />
- </xsl:call-template>
- </xsl:attribute>
-
- <xsl:value-of select="substring-after ($cref, 'N:')" />
- </a>
- </xsl:template>
-
- <xsl:template name="maketypelink">
- <xsl:param name="type" select="'notset'"/>
- <xsl:param name="wrt" select="'notset'"/>
- <xsl:param name="nested" select="0"/>
-
- <xsl:variable name="btype">
- <xsl:call-template name="ToBrackets">
- <xsl:with-param name="s" select="$type" />
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:variable name="array">
- <xsl:call-template name="GetArraySuffix">
- <xsl:with-param name="type" select="$type" />
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:choose>
-
- <!-- chop off T: -->
- <xsl:when test="starts-with($type, 'T:')">
- <xsl:call-template name="maketypelink">
- <xsl:with-param name="type" select="substring($type, 3)"/>
- <xsl:with-param name="wrt" select="$wrt"/>
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="contains ($type, '&amp;') and
- '&amp;' = substring ($type, string-length ($type), 1)">
- <xsl:call-template name="maketypelink">
- <xsl:with-param name="type" select="substring($type, 1, string-length($type)-1)"/>
- <xsl:with-param name="wrt" select="$wrt"/>
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="string($array)">
- <xsl:call-template name="maketypelink">
- <xsl:with-param name="type" select="substring($type, 1, string-length($type) - string-length ($array))"/>
- <xsl:with-param name="wrt" select="$wrt"/>
- </xsl:call-template>
- <xsl:value-of select="$array"/>
- </xsl:when>
-
- <xsl:when test="contains ($type, '*') and
- '*' = substring ($type, string-length ($type), 1)">
- <xsl:call-template name="maketypelink">
- <xsl:with-param name="type" select="substring($type, 1, string-length($type)-1)"/>
- <xsl:with-param name="wrt" select="$wrt"/>
- </xsl:call-template>
- <xsl:value-of select="'*'"/>
- </xsl:when>
-
- <!-- if this is a generic type parameter, don't make a link but italicize it and give it a tooltip instead -->
- <xsl:when test="count($ThisType/TypeParameters/TypeParameter[@Name=$type] |
- $ThisType/TypeParameters/TypeParameter[child::text()=$type] |
- ancestor::Member/Docs/typeparam[@name=$type]) = 1">
- <!-- note that we check if it is a generic type using /Type/TypeParameters because that will have type parameters declared in an outer class if this is a nested class, but then we get the tooltip text from the type parameters documented in this file -->
- <i title="{$ThisType/Docs/typeparam[@name=$type] | ancestor::Member/Docs/typeparam[@name=$type]}"><xsl:value-of select="$type"/></i>
- </xsl:when>
-
- <!-- if this is a generic type parameter of a base type, replace it with the type that it was instantiated with -->
- <xsl:when test="count(ancestor::Members/BaseTypeArgument[@TypeParamName=$type]) = 1">
- <!-- note that an overridden type parameter may be referenced in a type parameter within $type, but we can't replace that nicely since we can't parse generic type names here -->
- <xsl:call-template name="maketypelink">
- <xsl:with-param name="type" select="ancestor::Members/BaseTypeArgument[@TypeParamName=$type]"/>
- <xsl:with-param name="wrt" select="$wrt"/>
- </xsl:call-template>
- </xsl:when>
-
-
- <xsl:otherwise>
- <xsl:variable name="escaped-type">
- <xsl:call-template name="GetEscapedTypeName">
- <xsl:with-param name="typename" select="$btype" />
- </xsl:call-template>
- </xsl:variable>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="GetLinkTargetHtml">
- <xsl:with-param name="type" select="$escaped-type" />
- <xsl:with-param name="cref" select="concat ('T:', $escaped-type)" />
- </xsl:call-template>
- </xsl:attribute>
-
- <xsl:call-template name="GetTypeDisplayName">
- <xsl:with-param name="T" select="$btype"/>
- <xsl:with-param name="wrt" select="$wrt"/>
- </xsl:call-template>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="GetArraySuffix">
- <xsl:param name="type" />
-
- <xsl:if test="contains ($type, ']') and
- ']' = substring ($type, string-length ($type), 1)">
- <xsl:variable name="start">
- <xsl:call-template name="GetArraySuffixStart">
- <xsl:with-param name="type" select="$type" />
- <xsl:with-param name="i" select="string-length ($type) - 1" />
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="substring ($type, $start)" />
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="GetArraySuffixStart">
- <xsl:param name="type" />
- <xsl:param name="i" />
-
- <xsl:choose>
- <xsl:when test="substring ($type, $i, 1) = '['">
- <xsl:value-of select="$i" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="GetArraySuffixStart">
- <xsl:with-param name="type" select="$type" />
- <xsl:with-param name="i" select="$i - 1" />
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="GetTypeDisplayName">
- <xsl:param name="T"/>
- <xsl:param name="wrt"/>
-
- <!-- use C#-style names -->
- <xsl:choose>
- <xsl:when test="$T='System.Object'">object</xsl:when>
- <xsl:when test="$T='System.Boolean'">bool</xsl:when>
- <xsl:when test="$T='System.Byte'">byte</xsl:when>
- <xsl:when test="$T='System.Char'">char</xsl:when>
- <xsl:when test="$T='System.Decimal'">decimal</xsl:when>
- <xsl:when test="$T='System.Double'">double</xsl:when>
- <xsl:when test="$T='System.Int16'">short</xsl:when>
- <xsl:when test="$T='System.Int32'">int</xsl:when>
- <xsl:when test="$T='System.Int64'">long</xsl:when>
- <xsl:when test="$T='System.SByte'">sbyte</xsl:when>
- <xsl:when test="$T='System.Single'">float</xsl:when>
- <xsl:when test="$T='System.String'">string</xsl:when>
- <xsl:when test="$T='System.UInt16'">ushort</xsl:when>
- <xsl:when test="$T='System.UInt32'">uint</xsl:when>
- <xsl:when test="$T='System.UInt64'">ulong</xsl:when>
- <xsl:when test="$T='System.Void'">void</xsl:when>
-
- <xsl:when test="contains($T, '&lt;')">
- <xsl:call-template name="GetTypeDisplayName">
- <xsl:with-param name="T" select="substring-before ($T, '&lt;')" />
- <xsl:with-param name="wrt" select="$wrt" />
- </xsl:call-template>
- <xsl:text>&lt;</xsl:text>
- <xsl:call-template name="GetMemberArgList">
- <xsl:with-param name="arglist" select="substring-after ($T, '&lt;')" />
- <xsl:with-param name="wrt" select="$wrt" />
- </xsl:call-template>
- <!-- don't need to append &gt; as GetMemberArgList (eventually) appends it -->
- </xsl:when>
-
- <!-- if the type is in the wrt namespace, omit the namespace name -->
- <xsl:when test="not($wrt='') and starts-with($T, concat($wrt,'.')) and not(contains(substring-after($T,concat($wrt,'.')), '.'))">
- <xsl:value-of select="translate (substring-after($T,concat($wrt,'.')), '+', '.')"/>
- </xsl:when>
-
- <!-- if the type is in the System namespace, omit the namespace name -->
- <xsl:when test="starts-with($T, 'System.') and not(contains(substring-after($T, 'System.'), '.'))">
- <xsl:value-of select="translate (substring-after($T,'System.'), '+', '.')"/>
- </xsl:when>
-
- <!-- if the type is in the System.Collections namespace, omit the namespace name -->
- <xsl:when test="starts-with($T, 'System.Collections.') and not(contains(substring-after($T, 'System.Collections.'), '.'))">
- <xsl:value-of select="translate (substring-after($T,'System.Collections.'), '+', '.')"/>
- </xsl:when>
-
- <!-- if the type is in the System.Collections.Generic namespace, omit the namespace name -->
- <xsl:when test="starts-with($T, 'System.Collections.Generic.') and not(contains(substring-after($T, 'System.Collections.Generic.'), '.'))">
- <xsl:value-of select="translate (substring-after($T,'System.Collections.Generic.'), '+', '.')"/>
- </xsl:when>
-
- <xsl:otherwise>
- <xsl:value-of select="translate ($T, '+', '.')" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="GetMemberDisplayName">
- <xsl:param name="memberName" />
- <xsl:param name="isproperty" select="false()" />
-
- <xsl:choose>
- <xsl:when test="contains($memberName, '.')">
- <xsl:call-template name="GetTypeDisplayName">
- <xsl:with-param name="T">
- <xsl:call-template name="GetTypeName">
- <xsl:with-param name="type" select="$memberName"/>
- </xsl:call-template>
- </xsl:with-param>
- <xsl:with-param name="wrt" select="''" />
- </xsl:call-template>
- <xsl:text>.</xsl:text>
- <xsl:call-template name="GetMemberName">
- <xsl:with-param name="type" select="$memberName" />
- <xsl:with-param name="isproperty" select="$isproperty"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$memberName" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="ToBrackets">
- <xsl:param name="s" />
- <xsl:value-of select="translate (translate ($s, '{', '&lt;'), '}', '&gt;')" />
- </xsl:template>
-
- <xsl:template name="ToBraces">
- <xsl:param name="s" />
- <xsl:value-of select="translate (translate ($s, '&lt;', '{'), '&gt;', '}')" />
- </xsl:template>
-
- <xsl:template name="memberlinkprefix">
- <xsl:param name="member" />
- <xsl:choose>
- <xsl:when test="$member/MemberType='Constructor'">C</xsl:when>
- <xsl:when test="$member/MemberType='Method'">M</xsl:when>
- <xsl:when test="$member/MemberType='Property'">P</xsl:when>
- <xsl:when test="$member/MemberType='Field'">F</xsl:when>
- <xsl:when test="$member/MemberType='Event'">E</xsl:when>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="makememberlink">
- <xsl:param name="cref"/>
-
- <xsl:variable name="bcref">
- <xsl:call-template name="ToBrackets">
- <xsl:with-param name="s" select="$cref" />
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:variable name="fullname">
- <xsl:choose>
- <xsl:when test="starts-with($bcref, 'C:') or starts-with($bcref, 'T:')">
- <xsl:choose>
- <xsl:when test="contains($bcref, '(')">
- <xsl:value-of select="substring (substring-before ($bcref, '('), 3)" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="substring($bcref, 3)" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="GetTypeName">
- <xsl:with-param name="type" select="substring($bcref, 3)"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="memberName">
- <xsl:choose>
- <xsl:when test="starts-with($bcref, 'T:')" />
- <xsl:when test="starts-with($bcref, 'C:') and not(contains($bcref, '('))" />
- <xsl:when test="starts-with($bcref, 'C:') and contains($bcref, '(')">
- <xsl:text>(</xsl:text>
- <xsl:call-template name="GetMemberArgList">
- <xsl:with-param name="arglist" select="substring-before(substring-after($bcref, '('), ')')" />
- <xsl:with-param name="wrt" select="$TypeNamespace" />
- </xsl:call-template>
- <xsl:text>)</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>.</xsl:text>
- <xsl:call-template name="GetMemberName">
- <xsl:with-param name="type" select="substring($bcref, 3)" />
- <xsl:with-param name="wrt" select="$fullname"/>
- <xsl:with-param name="isproperty" select="starts-with($bcref, 'P:')"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="escaped-type">
- <xsl:call-template name="GetEscapedTypeName">
- <xsl:with-param name="typename">
- <xsl:call-template name="ToBrackets">
- <xsl:with-param name="s" select="$fullname" />
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="displayname">
- <xsl:call-template name="GetTypeDisplayName">
- <xsl:with-param name="T" select="$fullname" />
- <xsl:with-param name="wrt" select="$TypeNamespace"/>
- </xsl:call-template>
- </xsl:variable>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="GetLinkTargetHtml">
- <xsl:with-param name="type" select="$escaped-type" />
- <xsl:with-param name="cref">
- <xsl:call-template name="ToBraces">
- <xsl:with-param name="s" select="$cref" />
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:value-of select="translate (concat($displayname, $memberName), '+', '.')" />
- </a>
- </xsl:template>
-
- <xsl:template name="GetTypeName">
- <xsl:param name="type" />
- <xsl:variable name="prefix" select="substring-before($type, '.')" />
- <xsl:variable name="suffix" select="substring-after($type, '.')" />
- <xsl:choose>
- <xsl:when test="contains($type, '(')">
- <xsl:call-template name="GetTypeName">
- <xsl:with-param name="type" select="substring-before($type, '(')" />
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="not(contains($suffix, '.'))">
- <xsl:value-of select="$prefix" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$prefix" />
- <xsl:text>.</xsl:text>
- <xsl:call-template name="GetTypeName">
- <xsl:with-param name="type" select="$suffix" />
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="GetMemberName">
- <xsl:param name="type" />
- <xsl:param name="isproperty" select="0"/>
- <xsl:variable name="prefix" select="substring-before($type, '.')" />
- <xsl:variable name="suffix" select="substring-after($type, '.')" />
- <xsl:choose>
- <xsl:when test="contains($type, '(')">
- <xsl:call-template name="GetMemberName">
- <xsl:with-param name="type" select="substring-before($type, '(')" />
- </xsl:call-template>
- <xsl:text>(</xsl:text>
- <xsl:call-template name="GetMemberArgList">
- <xsl:with-param name="arglist" select="substring-before(substring-after($type, '('), ')')" />
- <xsl:with-param name="wrt" select="$TypeNamespace" />
- </xsl:call-template>
- <xsl:text>)</xsl:text>
- </xsl:when>
- <xsl:when test="not(contains($suffix, '.'))">
- <xsl:value-of select="$suffix" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="GetMemberName">
- <xsl:with-param name="type" select="$suffix" />
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="GetMemberArgList">
- <xsl:param name="arglist" />
- <xsl:param name="wrt" select="''"/>
-
- <xsl:variable name="_arglist">
- <xsl:choose>
- <xsl:when test="starts-with ($arglist, ',')">
- <xsl:value-of select="substring-after ($arglist, ',')" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$arglist" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:if test="starts-with ($arglist, ',')">
- <xsl:text>, </xsl:text>
- </xsl:if>
-
- <xsl:variable name="c" select="substring-before ($_arglist, ',')" />
- <xsl:variable name="lt" select="substring-before ($_arglist, '&lt;')" />
- <xsl:variable name="gt" select="substring-before ($_arglist, '&gt;')" />
-
- <xsl:choose>
- <!-- Need to insert ',' between type arguments -->
- <xsl:when test="
- ($c != '' and $lt != '' and $gt != '' and
- string-length ($c) &lt; string-length ($lt) and
- string-length ($c) &lt; string-length ($gt)) or
- ($c != '' and $lt != '' and $gt = '' and
- string-length ($c) &lt; string-length ($lt)) or
- ($c != '' and $lt = '' and $gt != '' and
- string-length ($c) &lt; string-length ($gt)) or
- ($c != '' and $lt = '' and $gt = '')">
- <xsl:call-template name="GetTypeDisplayName">
- <xsl:with-param name="T" select="$c"/>
- <xsl:with-param name="wrt" select="$wrt"/>
- </xsl:call-template>
- <xsl:text>, </xsl:text>
- <xsl:call-template name="GetMemberArgList">
- <xsl:with-param name="arglist" select="substring-after($_arglist, ',')" />
- <xsl:with-param name="wrt" select="$wrt" />
- </xsl:call-template>
- </xsl:when>
-
- <!-- start of nested type argument list < -->
- <xsl:when test="
- ($c != '' and $lt != '' and $gt != '' and
- string-length ($lt) &lt; string-length ($c) and
- string-length ($lt) &lt; string-length ($gt)) or
- ($c != '' and $lt != '' and $gt = '' and
- string-length ($lt) &lt; string-length ($c)) or
- ($c = '' and $lt != '' and $gt != '' and
- string-length ($lt) &lt; string-length ($gt))">
- <xsl:call-template name="GetTypeDisplayName">
- <xsl:with-param name="T" select="$lt"/>
- <xsl:with-param name="wrt" select="$wrt"/>
- </xsl:call-template>
- <xsl:text>&lt;</xsl:text>
- <xsl:call-template name="GetMemberArgList">
- <xsl:with-param name="arglist" select="substring-after($_arglist, '&lt;')" />
- <xsl:with-param name="wrt" select="$wrt" />
- </xsl:call-template>
- </xsl:when>
-
- <!-- end of (nested?) type argument list > -->
- <xsl:when test="
- ($c != '' and $lt != '' and $gt != '' and
- string-length ($gt) &lt; string-length ($c) and
- string-length ($gt) &lt; string-length ($lt)) or
- ($c != '' and $lt = '' and $gt = '' and
- string-length ($gt) &lt; string-length ($c)) or
- ($c = '' and $lt != '' and $gt != '' and
- string-length ($gt) &lt; string-length ($lt)) or
- ($c = '' and $lt = '' and $gt != '')">
- <xsl:call-template name="GetTypeDisplayName">
- <xsl:with-param name="T" select="$gt"/>
- <xsl:with-param name="wrt" select="$wrt"/>
- </xsl:call-template>
- <xsl:text>&gt;</xsl:text>
- <xsl:call-template name="GetMemberArgList">
- <xsl:with-param name="arglist" select="substring-after($_arglist, '&gt;')" />
- <xsl:with-param name="wrt" select="$wrt" />
- </xsl:call-template>
- </xsl:when>
-
- <!-- nothing left to do -->
- <xsl:otherwise>
- <xsl:call-template name="GetTypeDisplayName">
- <xsl:with-param name="T" select="$_arglist"/>
- <xsl:with-param name="wrt" select="$wrt"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- Transforms the contents of the selected node containing a cref into a hyperlink. -->
- <xsl:template match="*|@*" mode="cref">
- <xsl:call-template name="makememberlink">
- <xsl:with-param name="cref" select="."/>
- </xsl:call-template>
- <!--
- <a>
- <xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute>
- <xsl:value-of select="substring-after(., ':')"/></a>
- -->
- </xsl:template>
-
- <xsl:template name="membertypeplural">
- <xsl:param name="name"/>
- <xsl:choose>
- <xsl:when test="$name='ExtensionMethod'">Extension Methods</xsl:when>
- <xsl:when test="$name='Constructor'">Constructors</xsl:when>
- <xsl:when test="$name='Property'">Properties</xsl:when>
- <xsl:when test="$name='Method'">Methods</xsl:when>
- <xsl:when test="$name='Field'">Fields</xsl:when>
- <xsl:when test="$name='Event'">Events</xsl:when>
- <xsl:when test="$name='Operator'">Operators</xsl:when>
- <xsl:when test="$name='Explicit'">Explicitly Implemented Interface Members</xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="membertypeplurallc">
- <xsl:param name="name"/>
- <xsl:choose>
- <xsl:when test="$name='ExtensionMethod'">extension methods</xsl:when>
- <xsl:when test="$name='Constructor'">constructors</xsl:when>
- <xsl:when test="$name='Property'">properties</xsl:when>
- <xsl:when test="$name='Method'">methods</xsl:when>
- <xsl:when test="$name='Field'">fields</xsl:when>
- <xsl:when test="$name='Event'">events</xsl:when>
- <xsl:when test="$name='Operator'">operators</xsl:when>
- <xsl:when test="$name='Explicit'">explicitly implemented interface members</xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="gettypetype">
- <xsl:variable name="sig" select="concat(' ', TypeSignature[@Language='C#']/@Value, ' ')"/>
- <xsl:choose>
- <xsl:when test="contains($sig,'class')">Class</xsl:when>
- <xsl:when test="contains($sig,'enum')">Enumeration</xsl:when>
- <xsl:when test="contains($sig,'struct')">Structure</xsl:when>
- <xsl:when test="contains($sig,'delegate')">Delegate</xsl:when>
- </xsl:choose>
- </xsl:template>
-
- <!-- Ensures that the resuting node is not surrounded by a para tag. -->
- <xsl:template match="*|@*" mode="editlink">
- <xsl:call-template name="CreateEditLink">
- <xsl:with-param name="e" select="." />
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template match="*" mode="notoppara">
- <xsl:choose>
- <xsl:when test="starts-with (string(.), 'To be added')">
- <span class="NotEntered">Documentation for this section has not yet been entered.</span>
- </xsl:when>
- <xsl:when test="count(*) = 1 and count(para)=1">
- <xsl:apply-templates select="para/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="para">
- <p>
- <xsl:apply-templates/>
- </p>
- </xsl:template>
-
- <xsl:template match="attribution">
- <a href="http://creativecommons.org/licenses/by/4.0/" class="attributionlogo">
- <xsl:attribute name="title">
- <xsl:choose>
- <xsl:when test="@modified='false'"><xsl:value-of select="concat('This content is licensed Creative Commons By ', @from)" /></xsl:when>
- <xsl:otherwise><xsl:value-of select="concat('This content has been modified under a Creative Commons license from ', @from)" /></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <img src="mdocimages/creativecommons.png" />
- </a>
- </xsl:template>
-
- <xsl:template match="paramref">
- <i><xsl:value-of select="@name"/>
- <xsl:apply-templates/>
- </i>
- </xsl:template>
-
- <xsl:template match="typeparamref">
- <i><xsl:value-of select="@name"/>
- <xsl:apply-templates/>
- </i>
- </xsl:template>
-
- <xsl:template match="block[@type='note']">
- <div>
- <i>Note: </i>
- <xsl:apply-templates/>
- </div>
- </xsl:template>
- <xsl:template match="block[@type='behaviors']">
- <h5 class="Subsection">Operation</h5>
- <xsl:apply-templates/>
- </xsl:template>
- <xsl:template match="block[@type='overrides']">
- <h5 class="Subsection">Note to Inheritors</h5>
- <xsl:apply-templates/>
- </xsl:template>
- <xsl:template match="block[@type='usage']">
- <h5 class="Subsection">Usage</h5>
- <xsl:apply-templates/>
- </xsl:template>
-
- <xsl:template match="c">
- <tt>
- <xsl:apply-templates/>
- </tt>
- </xsl:template>
- <xsl:template match="c//para">
- <xsl:apply-templates/><br/>
- </xsl:template>
-
- <xsl:template match="code">
- <xsl:call-template name="CreateCodeBlock">
- <xsl:with-param name="language" select="@lang" />
- <xsl:with-param name="content" select="string(descendant-or-self::text())" />
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="img">
- <p>
- <img>
- <xsl:attribute name="src">
- <!-- we recognize two types of images:
- - those with src attribute that reference directly an external image
- - those with a href attributes which are internally available as part of the doc bundle
- -->
- <xsl:choose>
- <xsl:when test="count(@src)&gt;0">
- <xsl:value-of select="@src" />
- </xsl:when>
- <xsl:when test="count(@href)&gt;0">
- <xsl:value-of select="concat('source-id:', $source-id, ':', @href)" />
- </xsl:when>
- </xsl:choose>
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="count(@class)&gt;0">
- <xsl:value-of select="@class" />
- </xsl:when>
- <xsl:otherwise>picture</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </img>
- </p>
- </xsl:template>
-
- <xsl:template match="onequarter">¼</xsl:template>
- <xsl:template match="pi">Ï€</xsl:template>
- <xsl:template match="theta">θ</xsl:template>
- <xsl:template match="leq">≤</xsl:template>
- <xsl:template match="geq">≥</xsl:template>
- <xsl:template match="subscript">
- <sub><xsl:value-of select="@term"/></sub>
- </xsl:template>
- <xsl:template match="superscript">
- <sup><xsl:value-of select="@term"/></sup>
- </xsl:template>
-
- <!-- tabular data
- example:
-
- <list type="table">
- <listheader>
- <term>First Col Header</term>
- <description>Second Col Header</description>
- <description>Third Col Header</description>
- </listheader>
- <item>
- <term>First Row First Col</term>
- <description>First Row Second Col</description>
- <description>First Row Third Col</description>
- </item>
- <item>
- <term>Second Row First Col</term>
- <description>Second Row Second Col</description>
- <description>Second Row Third Col</description>
- </item>
- </list>
- -->
-
- <xsl:template match="list[@type='table']">
- <xsl:call-template name="CreateListTable">
- <xsl:with-param name="header">
- <th><xsl:apply-templates select="listheader/term" mode="notoppara"/></th>
- <xsl:for-each select="listheader/description">
- <th><xsl:apply-templates mode="notoppara"/></th>
- </xsl:for-each>
- </xsl:with-param>
-
- <xsl:with-param name="content">
- <xsl:for-each select="item">
- <tr valign="top">
- <td>
- <xsl:apply-templates select="term" mode="notoppara"/>
- </td>
- <xsl:for-each select="description">
- <td>
- <xsl:apply-templates mode="notoppara"/>
- </td>
- </xsl:for-each>
- </tr>
- </xsl:for-each>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template match="list[@type='bullet']">
- <ul>
- <xsl:for-each select="item">
- <li>
- <xsl:apply-templates select="term" mode="notoppara"/>
- <xsl:apply-templates select="para" mode="notoppara"/>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:template>
- <xsl:template match="list[@type='number']">
- <ol>
- <xsl:for-each select="item">
- <li>
- <xsl:apply-templates select="term" mode="notoppara"/>
- </li>
- </xsl:for-each>
- </ol>
- </xsl:template>
-
- <xsl:template match="list">
- [<i>The '<xsl:value-of select="@type"/>' type of list has not been implemented in the ECMA stylesheet.</i>]
-
- <xsl:message>
- [<i>The '<xsl:value-of select="@type"/>' type of list has not been implemented in the ECMA stylesheet.</i>]
- </xsl:message>
- </xsl:template>
-
- <xsl:template match="see[@cref]">
- <xsl:choose>
- <xsl:when test="not(substring-after(@cref, 'T:')='')">
- <xsl:call-template name="maketypelink">
- <xsl:with-param name="type" select="normalize-space (@cref)"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="not(substring-after(@cref, 'N:')='')">
- <xsl:call-template name="makenamespacelink">
- <xsl:with-param name="cref" select="normalize-space (@cref)"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="makememberlink">
- <xsl:with-param name="cref" select="normalize-space (@cref)"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="see[@langword]">
- <tt><xsl:value-of select="@langword"/></tt>
- </xsl:template>
-
- <xsl:template name="GetInheritedMembers">
- <xsl:param name="declaringtype"/>
- <xsl:param name="generictypereplacements"/>
- <xsl:param name="listmembertype"/>
- <xsl:param name="showprotected"/>
- <xsl:param name="overloads-mode" select="false()" />
- <xsl:param name="showstatic" select='1'/>
-
- <xsl:choose>
- <xsl:when test="$listmembertype='ExtensionMethod' and $showprotected=false()">
- <xsl:for-each select="$declaringtype/Members/Member[MemberType=$listmembertype]">
- <Members Name="Link/@Type" FullName="Link/@Type">
- <Member MemberName="{@MemberName}">
- <xsl:attribute name="ExplicitMemberName">
- <xsl:call-template name="GetMemberNameWithoutGenericTypes">
- <xsl:with-param name="m" select="@MemberName" />
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="TypeParameters">
- <xsl:call-template name="GetTypeParameterNames">
- <xsl:with-param name="member" select="." />
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="Parameters">
- <xsl:call-template name="GetParameterTypes">
- <xsl:with-param name="member" select="." />
- </xsl:call-template>
- </xsl:attribute>
- <xsl:copy-of select="./*" />
- </Member>
- </Members>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <Members Name="{$declaringtype/@Name}" FullName="{$declaringtype/@FullName}">
-
- <xsl:copy-of select="$generictypereplacements"/>
-
- <!-- Get all members in this type that are of listmembertype and are either
- protected or not protected according to showprotected. -->
- <xsl:choose>
- <xsl:when test="$listmembertype = 'Explicit'">
- <xsl:for-each select="$declaringtype/Members/Member
- [MemberType != 'Constructor']
- [contains (@MemberName, '.')]">
- <Member MemberName="{@MemberName}">
- <xsl:attribute name="ExplicitMemberName">
- <xsl:call-template name="GetMemberName">
- <xsl:with-param name="type" select="@MemberName" />
- <xsl:with-param name="isproperty" select="$listmembertype = 'Property'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="TypeParameters">
- <xsl:call-template name="GetTypeParameterNames">
- <xsl:with-param name="member" select="." />
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="Parameters">
- <xsl:call-template name="GetParameterTypes">
- <xsl:with-param name="member" select="." />
- </xsl:call-template>
- </xsl:attribute>
- <xsl:copy-of select="./*" />
- </Member>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:for-each select="$declaringtype/Members/Member
- [(MemberType=$listmembertype or ($listmembertype='Operator' and MemberType='Method'))]
- [(not($overloads-mode) or @MemberName=$index or
- ($index='Conversion' and (@MemberName='op_Implicit' or @MemberName='op_Explicit'))) ]
- [$showprotected=starts-with(MemberSignature[@Language='C#']/@Value, 'protected ')]
- [($listmembertype='Method' and not(starts-with(@MemberName,'op_')))
- or ($listmembertype='Operator' and starts-with(@MemberName,'op_'))
- or (not($listmembertype='Method') and not($listmembertype='Operator'))]
- [$showstatic or not(contains(MemberSignature[@Language='C#']/@Value,' static '))]
- [$listmembertype = 'Constructor' or not(contains(@MemberName, '.'))]
- ">
- <Member MemberName="{@MemberName}">
- <xsl:attribute name="ExplicitMemberName">
- <xsl:call-template name="GetMemberNameWithoutGenericTypes">
- <xsl:with-param name="m" select="@MemberName" />
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="TypeParameters">
- <xsl:call-template name="GetTypeParameterNames">
- <xsl:with-param name="member" select="." />
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="Parameters">
- <xsl:call-template name="GetParameterTypes">
- <xsl:with-param name="member" select="." />
- </xsl:call-template>
- </xsl:attribute>
- <xsl:copy-of select="./*" />
- </Member>
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
-
- <Docs>
- <xsl:copy-of select="$declaringtype/Docs/typeparam" />
- </Docs>
-
- </Members>
- </xsl:otherwise>
- </xsl:choose>
-
- <xsl:if test="not($listmembertype='Constructor') and count($declaringtype/Base/BaseTypeName)=1">
- <xsl:variable name="basedocsfile">
- <xsl:call-template name="GetLinkTarget">
- <xsl:with-param name="type">
- <xsl:call-template name="GetEscapedTypeName">
- <xsl:with-param name="typename" select="$declaringtype/Base/BaseTypeName" />
- </xsl:call-template>
- </xsl:with-param>
- <xsl:with-param name="cref">
- </xsl:with-param>
- <xsl:with-param name="local-suffix" />
- <xsl:with-param name="remote"/>
- <xsl:with-param name="xmltarget" select='1'/>
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:if test="not(string($basedocsfile) = '')">
- <xsl:call-template name="GetInheritedMembers">
- <xsl:with-param name="listmembertype" select="$listmembertype"/>
- <xsl:with-param name="showprotected" select="$showprotected"/>
- <xsl:with-param name="declaringtype" select="document(string($basedocsfile),.)/Type"/>
- <xsl:with-param name="generictypereplacements" select="$declaringtype/Base/BaseTypeArguments/*"/>
- <xsl:with-param name="showstatic" select='0'/>
- </xsl:call-template>
- </xsl:if>
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="GetMemberNameWithoutGenericTypes">
- <xsl:param name="m" />
- <xsl:choose>
- <xsl:when test="contains ($m, '&lt;')">
- <xsl:value-of select="substring-before ($m, '&lt;')" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$m" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="GetTypeParameterNames">
- <xsl:param name="member" />
-
- <xsl:for-each select="$member/TypeParameters/TypeParameter">
- <xsl:if test="not(position()=1)">, </xsl:if>
- <xsl:value-of select="@Name" />
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template name="GetParameterTypes">
- <xsl:param name="member" />
-
- <xsl:for-each select="$member/Parameters/Parameter">
- <xsl:if test="not(position()=1)">, </xsl:if>
- <xsl:value-of select="@Type" />
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template name="ListAllMembers">
- <xsl:param name="html-anchor" select="false()" />
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="'Constructor'"/>
- <xsl:with-param name="showprotected" select="false()"/>
- <xsl:with-param name="html-anchor" select="$html-anchor" />
- </xsl:call-template>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="'Constructor'"/>
- <xsl:with-param name="showprotected" select="true()"/>
- <xsl:with-param name="html-anchor" select="$html-anchor" />
- </xsl:call-template>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="'Field'"/>
- <xsl:with-param name="showprotected" select="false()"/>
- <xsl:with-param name="html-anchor" select="$html-anchor" />
- </xsl:call-template>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="'Field'"/>
- <xsl:with-param name="showprotected" select="true()"/>
- <xsl:with-param name="html-anchor" select="$html-anchor" />
- </xsl:call-template>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="'Property'"/>
- <xsl:with-param name="showprotected" select="false()"/>
- <xsl:with-param name="html-anchor" select="$html-anchor" />
- </xsl:call-template>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="'Property'"/>
- <xsl:with-param name="showprotected" select="true()"/>
- <xsl:with-param name="html-anchor" select="$html-anchor" />
- </xsl:call-template>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="'Method'"/>
- <xsl:with-param name="showprotected" select="false()"/>
- <xsl:with-param name="html-anchor" select="$html-anchor" />
- </xsl:call-template>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="'Method'"/>
- <xsl:with-param name="showprotected" select="true()"/>
- <xsl:with-param name="html-anchor" select="$html-anchor" />
- </xsl:call-template>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="'Event'"/>
- <xsl:with-param name="showprotected" select="false()"/>
- <xsl:with-param name="html-anchor" select="$html-anchor" />
- </xsl:call-template>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="'Event'"/>
- <xsl:with-param name="showprotected" select="true()"/>
- <xsl:with-param name="html-anchor" select="$html-anchor" />
- </xsl:call-template>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="'Operator'"/>
- <xsl:with-param name="showprotected" select="false()"/>
- <xsl:with-param name="html-anchor" select="$html-anchor" />
- </xsl:call-template>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="'Explicit'"/>
- <xsl:with-param name="showprotected" select="true()"/>
- <xsl:with-param name="html-anchor" select="$html-anchor" />
- </xsl:call-template>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="'ExtensionMethod'"/>
- <xsl:with-param name="showprotected" select="false()"/>
- <xsl:with-param name="html-anchor" select="$html-anchor" />
- </xsl:call-template>
- </xsl:template>
-
- <!-- Lists the members in the current Type node.
- Only lists members of type listmembertype.
- Displays the signature in siglanguage.
- showprotected = true() or false()
- -->
- <xsl:template name="ListMembers">
- <xsl:param name="listmembertype"/>
- <xsl:param name="showprotected"/>
- <xsl:param name="overloads-mode" select="false()" />
- <xsl:param name="html-anchor" select="false()" />
-
- <!-- get name and namespace of current type -->
- <xsl:variable name="TypeFullName" select="@FullName"/>
- <xsl:variable name="TypeName" select="@Name"/>
- <xsl:variable name="TypeNamespace" select="substring-before(@FullName, concat('.',@Name))"/>
-
- <xsl:variable name="MEMBERS-rtf">
- <xsl:call-template name="GetInheritedMembers">
- <xsl:with-param name="listmembertype" select="$listmembertype"/>
- <xsl:with-param name="showprotected" select="$showprotected"/>
- <xsl:with-param name="declaringtype" select="."/>
- <xsl:with-param name="overloads-mode" select="$overloads-mode" />
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="MEMBERS" select="msxsl:node-set($MEMBERS-rtf)" />
-
- <!--
- <xsl:variable name="MEMBERS" select="
- $ALLMEMBERS/Member
- [(MemberType=$listmembertype or ($listmembertype='Operator' and MemberType='Method'))]
- [$showprotected=contains(MemberSignature[@Language='C#']/@Value,'protected')]
- [($listmembertype='Method' and not(starts-with(@MemberName,'op_')))
- or ($listmembertype='Operator' and starts-with(@MemberName,'op_'))
- or (not($listmembertype='Method') and not($listmembertype='Operator'))]
- "/>
- -->
-
- <!-- if there aren't any, skip this -->
- <xsl:if test="count($MEMBERS//Member)">
-
- <xsl:variable name="SectionName">
- <xsl:if test="$listmembertype != 'Explicit' and $listmembertype != 'ExtensionMethod'">
- <xsl:if test="$showprotected">Protected </xsl:if>
- <xsl:if test="not($showprotected)">Public </xsl:if>
- </xsl:if>
- <xsl:call-template name="membertypeplural"><xsl:with-param name="name" select="$listmembertype"/></xsl:call-template>
- </xsl:variable>
-
- <!-- header -->
- <xsl:call-template name="CreateH2Section">
- <xsl:with-param name="name" select="$SectionName" />
- <xsl:with-param name="child-id" select="$SectionName" />
- <xsl:with-param name="content">
- <div class="SubsectionBox">
- <xsl:call-template name="CreateMembersTable">
- <xsl:with-param name="content">
-
- <xsl:for-each select="$MEMBERS/Members/Member">
- <!--<xsl:sort select="contains(MemberSignature[@Language='C#']/@Value,' static ')" data-type="text"/>-->
- <xsl:sort select="@MemberName = 'op_Implicit' or @MemberName = 'op_Explicit'"/>
- <xsl:sort select="@ExplicitMemberName" data-type="text"/>
- <xsl:sort select="count(TypeParameters/TypeParameter)"/>
- <xsl:sort select="@TypeParameters"/>
- <xsl:sort select="count(Parameters/Parameter)"/>
- <xsl:sort select="@Parameters"/>
-
- <xsl:variable name="local-id">
- <xsl:choose>
- <xsl:when test="count(Link) = 1">
- <xsl:value-of select="Link/@Member" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="GetLinkId" >
- <xsl:with-param name="type" select="parent::Members" />
- <xsl:with-param name="member" select="." />
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="linkfile">
- <xsl:if test="not(parent::Members/@FullName = $TypeFullName)">
- <xsl:call-template name="GetLinkTargetHtml">
- <xsl:with-param name="type">
- <xsl:choose>
- <xsl:when test="count(Link) = 1">
- <xsl:value-of select="Link/@Type"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="GetEscapedTypeName">
- <xsl:with-param name="typename" select="parent::Members/@FullName" />
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="cref" />
- </xsl:call-template>
- </xsl:if>
- </xsl:variable>
-
- <xsl:variable name="linkid">
- <xsl:if test="$html-anchor">
- <xsl:value-of select="$linkfile" />
- <xsl:text>#</xsl:text>
- </xsl:if>
- <xsl:value-of select="$local-id" />
- </xsl:variable>
-
- <xsl:variable name="isinherited">
- <xsl:if test="$listmembertype != 'ExtensionMethod' and not(parent::Members/@FullName = $TypeFullName)">
- <xsl:text> (</xsl:text>
- <i>
- <xsl:text>Inherited from </xsl:text>
- <xsl:call-template name="maketypelink">
- <xsl:with-param name="type" select="parent::Members/@FullName"/>
- <xsl:with-param name="wrt" select="$TypeNamespace"/>
- </xsl:call-template>
- <xsl:text>.</xsl:text>
- </i>
- <xsl:text>)</xsl:text>
- </xsl:if>
- </xsl:variable>
-
- <tr valign="top">
- <td>
- <!-- random info -->
-
- <!-- check if it has get and set accessors -->
- <xsl:if test="MemberType='Property' and not(contains(MemberSignature[@Language='C#']/@Value, 'set;'))">
- <xsl:text>[read-only]</xsl:text>
- </xsl:if>
- <xsl:if test="MemberType='Property' and not(contains(MemberSignature[@Language='C#']/@Value, 'get;'))">
- <xsl:text>[write-only]</xsl:text>
- </xsl:if>
-
- <xsl:if test="contains(MemberSignature[@Language='C#']/@Value,'this[')">
- <div><i>default property</i></div>
- </xsl:if>
-
- <div>
- <xsl:call-template name="getmodifiers">
- <xsl:with-param name="sig" select="MemberSignature[@Language='C#']/@Value"/>
- <xsl:with-param name="protection" select="false()"/>
- <xsl:with-param name="inheritance" select="true()"/>
- <xsl:with-param name="extra" select="false()"/>
- </xsl:call-template>
- </div>
- </td>
-
- <xsl:choose>
- <!-- constructor listing -->
- <xsl:when test="MemberType='Constructor'">
- <!-- link to constructor page -->
- <td>
- <div>
- <b>
- <a href="{$linkid}">
- <xsl:call-template name="GetConstructorName">
- <xsl:with-param name="type" select="parent::Members" />
- <xsl:with-param name="ctor" select="." />
- </xsl:call-template>
- </a>
- </b>
-
- <!-- argument list -->
- <xsl:value-of select="'('"/>
- <xsl:for-each select="Parameters/Parameter">
- <xsl:if test="not(position()=1)">, </xsl:if>
-
- <xsl:call-template name="ShowParameter">
- <xsl:with-param name="Param" select="."/>
- <xsl:with-param name="TypeNamespace" select="$TypeNamespace"/>
- <xsl:with-param name="prototype" select="true()"/>
- </xsl:call-template>
- </xsl:for-each>
- <xsl:value-of select="')'"/>
- </div>
-
- <!-- TODO: $implemented? -->
-
- </td>
- </xsl:when>
-
- <xsl:when test="$listmembertype = 'Explicit'">
- <td>
- <a href="{$linkid}">
- <b>
- <xsl:call-template name="GetMemberDisplayName">
- <xsl:with-param name="memberName" select="@MemberName" />
- <xsl:with-param name="isproperty" select="MemberType='Property'" />
- </xsl:call-template>
- </b>
- </a>
- </td>
- </xsl:when>
-
- <!-- field, property and event listing -->
- <xsl:when test="MemberType='Field' or MemberType='Property' or MemberType='Event'">
- <td>
-
- <!-- link to member page -->
- <b>
- <a href="{$linkid}">
- <xsl:call-template name="GetMemberDisplayName">
- <xsl:with-param name="memberName" select="@MemberName" />
- <xsl:with-param name="isproperty" select="MemberType='Property'" />
- </xsl:call-template>
- </a>
- </b>
-
- <!-- argument list for accessors -->
- <xsl:if test="Parameters/Parameter">
- <xsl:value-of select="'('"/>
- <xsl:for-each select="Parameters/Parameter">
- <xsl:if test="not(position()=1)">, </xsl:if>
-
- <xsl:call-template name="ShowParameter">
- <xsl:with-param name="Param" select="."/>
- <xsl:with-param name="TypeNamespace" select="$TypeNamespace"/>
- <xsl:with-param name="prototype" select="true()"/>
- </xsl:call-template>
-
- </xsl:for-each>
- <xsl:value-of select="')'"/>
- </xsl:if>
-
- </td>
- </xsl:when>
-
- <!-- method listing -->
- <xsl:when test="$listmembertype='Method' or $listmembertype = 'ExtensionMethod'">
- <td colspan="2">
-
- <!-- link to method page -->
- <b>
- <a href="{$linkid}">
- <xsl:call-template name="GetMemberDisplayName">
- <xsl:with-param name="memberName" select="@MemberName" />
- <xsl:with-param name="isproperty" select="MemberType='Property'" />
- </xsl:call-template>
- </a>
- </b>
-
- <!-- argument list -->
- <xsl:value-of select="'('"/>
- <xsl:for-each select="Parameters/Parameter">
- <xsl:if test="not(position()=1)">, </xsl:if>
-
- <xsl:call-template name="ShowParameter">
- <xsl:with-param name="Param" select="."/>
- <xsl:with-param name="TypeNamespace" select="$TypeNamespace"/>
- <xsl:with-param name="prototype" select="true()"/>
- </xsl:call-template>
-
- </xsl:for-each>
- <xsl:value-of select="')'"/>
-
- <!-- return type -->
- <xsl:if test="not(ReturnValue/ReturnType='System.Void')">
- <nobr>
- <xsl:text> : </xsl:text>
- <xsl:apply-templates select="ReturnValue/ReturnType" mode="typelink"><xsl:with-param name="wrt" select="$TypeNamespace"/></xsl:apply-templates>
- </nobr>
- </xsl:if>
-
- <blockquote>
- <xsl:apply-templates select="Docs/summary" mode="notoppara"/>
- <xsl:copy-of select="$isinherited"/>
- </blockquote>
- </td>
- </xsl:when>
-
- <xsl:when test="$listmembertype='Operator'">
- <td>
-
- <!-- link to operator page -->
- <xsl:choose>
- <xsl:when test="@MemberName='op_Implicit' or @MemberName='op_Explicit'">
- <b>
- <a href="{$linkid}">
- <xsl:text>Conversion</xsl:text>
- <xsl:choose>
- <xsl:when test="ReturnValue/ReturnType = //Type/@FullName">
- <xsl:text> From </xsl:text>
- <xsl:value-of select="Parameters/Parameter/@Type"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text> to </xsl:text>
- <xsl:value-of select="ReturnValue/ReturnType"/>
- </xsl:otherwise>
- </xsl:choose>
- </a>
- </b>
-
- <xsl:choose>
- <xsl:when test="@MemberName='op_Implicit'">
- <xsl:text>(Implicit)</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>(Explicit)</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="count(Parameters/Parameter)=1">
- <b>
- <a href="{$linkid}">
- <xsl:value-of select="substring-after(@MemberName, 'op_')"/>
- </a>
- </b>
- </xsl:when>
- <xsl:otherwise>
- <b>
- <a href="{$linkid}">
- <xsl:value-of select="substring-after(@MemberName, 'op_')"/>
- </a>
- </b>
- <xsl:value-of select="'('"/>
- <xsl:for-each select="Parameters/Parameter">
- <xsl:if test="not(position()=1)">, </xsl:if>
-
- <xsl:call-template name="ShowParameter">
- <xsl:with-param name="Param" select="."/>
- <xsl:with-param name="TypeNamespace" select="$TypeNamespace"/>
- <xsl:with-param name="prototype" select="true()"/>
- </xsl:call-template>
-
- </xsl:for-each>
- <xsl:value-of select="')'"/>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </xsl:when>
-
- <xsl:otherwise>
- <!-- Other types: just provide a link -->
- <td>
- <a href="{$linkid}">
- <xsl:call-template name="GetMemberDisplayName">
- <xsl:with-param name="memberName" select="@MemberName" />
- <xsl:with-param name="isproperty" select="MemberType='Property'" />
- </xsl:call-template>
- </a>
- </td>
- </xsl:otherwise>
- </xsl:choose>
-
- <xsl:if test="$listmembertype != 'Method' and $listmembertype != 'ExtensionMethod'">
- <td>
- <!-- description -->
- <xsl:if test="MemberType='Field' or MemberType = 'Property'">
- <i><xsl:apply-templates select="ReturnValue/ReturnType" mode="typelink"><xsl:with-param name="wrt" select="$TypeNamespace"/></xsl:apply-templates></i>
- <xsl:if test="MemberValue"> (<xsl:value-of select="MemberValue"/>)</xsl:if>
- <xsl:text>. </xsl:text>
- </xsl:if>
-
- <xsl:apply-templates select="Docs/summary" mode="notoppara"/>
- <xsl:copy-of select="$isinherited"/>
- </td>
- </xsl:if>
-
- </tr>
- </xsl:for-each>
-
- </xsl:with-param>
- </xsl:call-template>
- </div>
- </xsl:with-param>
- </xsl:call-template>
-
- </xsl:if>
-
- </xsl:template>
-
- <xsl:template name="GetLinkName">
- <xsl:param name="type"/>
- <xsl:param name="member"/>
- <xsl:call-template name="memberlinkprefix">
- <xsl:with-param name="member" select="$member"/>
- </xsl:call-template>
- <xsl:text>:</xsl:text>
- <xsl:call-template name="GetEscapedTypeName">
- <xsl:with-param name="typename" select="$type/@FullName" />
- </xsl:call-template>
- <xsl:if test="$member/MemberType != 'Constructor'">
- <xsl:text>.</xsl:text>
- <xsl:variable name="memberName">
- <xsl:call-template name="GetGenericName">
- <xsl:with-param name="membername" select="$member/@MemberName" />
- <xsl:with-param name="member" select="$member" />
- </xsl:call-template>
- </xsl:variable>
- <xsl:call-template name="Replace">
- <xsl:with-param name="s">
- <xsl:call-template name="ToBraces">
- <xsl:with-param name="s" select="$memberName" />
- </xsl:call-template>
- </xsl:with-param>
- <xsl:with-param name="from">.</xsl:with-param>
- <xsl:with-param name="to">#</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="GetGenericName">
- <xsl:param name="membername" />
- <xsl:param name="member" />
- <xsl:variable name="numgenargs" select="count($member/Docs/typeparam)" />
- <xsl:choose>
- <xsl:when test="$numgenargs = 0">
- <xsl:value-of select="$membername" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="contains($membername, '&lt;')">
- <xsl:value-of select="substring-before ($membername, '&lt;')" />
- </xsl:if>
- <xsl:text>``</xsl:text>
- <xsl:value-of select="$numgenargs" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="GetEscapedTypeName">
- <xsl:param name="typename" />
- <xsl:variable name="base" select="substring-before ($typename, '&lt;')" />
-
- <xsl:choose>
- <xsl:when test="$base != ''">
- <xsl:value-of select="translate ($base, '+', '.')" />
- <xsl:text>`</xsl:text>
- <xsl:call-template name="GetGenericArgumentCount">
- <xsl:with-param name="arglist" select="substring-after ($typename, '&lt;')" />
- <xsl:with-param name="count">1</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="translate ($typename, '+', '.')" /></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="GetGenericArgumentCount">
- <xsl:param name="arglist" />
- <xsl:param name="count" />
-
- <xsl:variable name="rest-rtf">
- <xsl:call-template name="SkipTypeArgument">
- <xsl:with-param name="s" select="$arglist" />
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="rest" select="string($rest-rtf)" />
-
- <xsl:choose>
- <xsl:when test="$arglist != '' and $rest = ''">
- <xsl:value-of select="$count" />
- </xsl:when>
- <xsl:when test="$arglist = '' and $rest = ''">
- <xsl:message terminate="yes">
-!WTF? arglist=<xsl:value-of select="$arglist" />; rest=<xsl:value-of select="$rest" />
- </xsl:message>
- </xsl:when>
- <xsl:when test="starts-with ($rest, '>')">
- <xsl:value-of select="$count" />
- <xsl:call-template name="GetEscapedTypeName">
- <xsl:with-param name="typename" select="substring-after ($rest, '>')" />
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="starts-with ($rest, ',')">
- <xsl:call-template name="GetGenericArgumentCount">
- <xsl:with-param name="arglist" select="substring-after ($rest, ',')" />
- <xsl:with-param name="count" select="$count+1" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">
-!WTF 2? arglist=<xsl:value-of select="$arglist" />; rest=<xsl:value-of select="$rest" />
- </xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="SkipTypeArgument">
- <xsl:param name="s" />
-
- <xsl:variable name="p-rtf">
- <xsl:call-template name="GetCLtGtPositions">
- <xsl:with-param name="s" select="$s" />
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="p" select="msxsl:node-set($p-rtf)"/>
-
- <xsl:choose>
- <!--
- Have to select between three `s' patterns:
- A,B>: need to return ",B>"
- Foo<A,B>>: Need to forward to SkipGenericArgument to eventually return ">"
- Foo<A,B>+C>: Need to forward to SkipGenericArgument to eventually return ">"
- -->
- <xsl:when test="starts-with ($s, '>')">
- <xsl:message terminate="yes">
-SkipTypeArgument: invalid type substring '<xsl:value-of select="$s" />'
- </xsl:message>
- </xsl:when>
- <xsl:when test="$p/Comma/@Length > 0 and
- ($p/Lt/@Length = 0 or $p/Comma/@Length &lt; $p/Lt/@Length) and
- ($p/Gt/@Length > 0 and $p/Comma/@Length &lt; $p/Gt/@Length)">
- <xsl:text>,</xsl:text>
- <xsl:value-of select="substring-after ($s, ',')" />
- </xsl:when>
- <xsl:when test="$p/Lt/@Length > 0 and $p/Lt/@Length &lt; $p/Gt/@Length">
- <xsl:variable name="r">
- <xsl:call-template name="SkipGenericArgument">
- <xsl:with-param name="s" select="substring-after ($s, '&lt;')" />
- </xsl:call-template>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="starts-with ($r, '>') or starts-with ($r, '+')">
- <xsl:value-of select="substring-after ($r, '&gt;')" />
- </xsl:when>
- <xsl:when test="starts-with ($r, ',')">
- <xsl:value-of select="$r" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>
-! WTF3: s=<xsl:value-of select="$s" />; r=<xsl:value-of select="$r" />
- </xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$p/Gt/@Length > 0">
- <xsl:text>&gt;</xsl:text>
- <xsl:value-of select="substring-after ($s, '&gt;')" />
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="$s" /></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="GetCLtGtPositions">
- <xsl:param name="s" />
-
- <xsl:variable name="c" select="substring-before ($s, ',')" />
- <xsl:variable name="lt" select="substring-before ($s, '&lt;')" />
- <xsl:variable name="gt" select="substring-before ($s, '&gt;')" />
-
- <Comma String="{$c}" Length="{string-length ($c)}" />
- <Lt String="{$lt}" Length="{string-length ($lt)}" />
- <Gt String="{$gt}" Length="{string-length ($gt)}" />
- </xsl:template>
-
- <!--
- when given 'Foo<A,Bar<Baz<C,D,E>>>>', returns '>'
- when given 'Bar<C>+Nested>', returns '>'
- when given 'Foo<A,Bar<Baz<C,D,E>>>,', returns ','
- (basically, it matches '<' to '>' and "skips" the intermediate type-name contents.
- -->
- <xsl:template name="SkipGenericArgument">
- <xsl:param name="s" />
-
- <xsl:variable name="p-rtf">
- <xsl:call-template name="GetCLtGtPositions">
- <xsl:with-param name="s" select="$s" />
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="p" select="msxsl:node-set($p-rtf)" />
-
- <xsl:choose>
- <xsl:when test="starts-with ($s, '>')">
- <xsl:message terminate="yes">
-SkipGenericArgument: invalid type substring '<xsl:value-of select="$s" />'
- </xsl:message>
- </xsl:when>
- <xsl:when test="$p/Lt/@Length > 0 and $p/Lt/@Length &lt; $p/Gt/@Length">
- <!-- within 'Foo<A...'; look for matching '>' -->
- <xsl:variable name="r">
- <xsl:call-template name="SkipGenericArgument">
- <xsl:with-param name="s" select="substring-after ($s, '&lt;')" />
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="substring-after ($r, '&gt;')" />
- </xsl:when>
- <xsl:when test="$p/Gt/@Length > 0">
- <!--<xsl:value-of select="substring ($s, string-length ($gt)+1)" />-->
- <xsl:value-of select="substring-after ($s, '&gt;')" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$s" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="GetEscapedParameter">
- <xsl:param name="orig-parameter-type" />
- <xsl:param name="parameter-type" />
- <xsl:param name="parameter-types" />
- <xsl:param name="escape" />
- <xsl:param name="index" />
-
- <xsl:choose>
- <xsl:when test="$index &gt; count($parameter-types)">
- <xsl:if test="$parameter-type != $orig-parameter-type">
- <xsl:value-of select="$parameter-type" />
- </xsl:if>
- <!-- ignore -->
- </xsl:when>
- <xsl:when test="$parameter-types[position() = $index]/@name = $parameter-type">
- <xsl:value-of select="concat ($escape, $index - 1)" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="typeparam" select="$parameter-types[position() = $index]/@name" />
- <xsl:call-template name="GetEscapedParameter">
- <xsl:with-param name="orig-parameter-type" select="$orig-parameter-type" />
- <xsl:with-param name="parameter-type">
- <xsl:call-template name="Replace">
- <xsl:with-param name="s">
- <xsl:call-template name="Replace">
- <xsl:with-param name="s">
- <xsl:call-template name="Replace">
- <xsl:with-param name="s">
- <xsl:call-template name="Replace">
- <xsl:with-param name="s" select="$parameter-type"/>
- <xsl:with-param name="from" select="concat('&lt;', $typeparam, '&gt;')" />
- <xsl:with-param name="to" select="concat('&lt;', $escape, $index - 1, '&gt;')" />
- </xsl:call-template>
- </xsl:with-param>
- <xsl:with-param name="from" select="concat('&lt;', $typeparam, ',')" />
- <xsl:with-param name="to" select="concat('&lt;', $escape, $index - 1, ',')" />
- </xsl:call-template>
- </xsl:with-param>
- <xsl:with-param name="from" select="concat (',', $typeparam, '&gt;')" />
- <xsl:with-param name="to" select="concat(',', $escape, $index - 1, '&gt;')" />
- </xsl:call-template>
- </xsl:with-param>
- <xsl:with-param name="from" select="concat (',', $typeparam, ',')" />
- <xsl:with-param name="to" select="concat(',', $escape, $index - 1, ',')" />
- </xsl:call-template>
- </xsl:with-param>
- <xsl:with-param name="parameter-types" select="$parameter-types" />
- <xsl:with-param name="typeparam" select="$typeparam" />
- <xsl:with-param name="escape" select="$escape" />
- <xsl:with-param name="index" select="$index + 1" />
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="GetLinkId">
- <xsl:param name="type"/>
- <xsl:param name="member"/>
- <xsl:call-template name="GetLinkName">
- <xsl:with-param name="type" select="$type" />
- <xsl:with-param name="member" select="$member" />
- </xsl:call-template>
- <xsl:if test="count($member/Parameters/Parameter) &gt; 0 or $member/MemberType='Method' or $member/MemberType='Constructor'">
- <xsl:text>(</xsl:text>
- <xsl:for-each select="Parameters/Parameter">
- <xsl:if test="not(position()=1)">,</xsl:if>
- <xsl:call-template name="GetParameterType">
- <xsl:with-param name="type" select="$type" />
- <xsl:with-param name="member" select="$member" />
- <xsl:with-param name="parameter" select="." />
- </xsl:call-template>
- </xsl:for-each>
- <xsl:text>)</xsl:text>
- </xsl:if>
- <xsl:if test="$member/@MemberName='op_Implicit' or $member/@MemberName='op_Explicit'">
- <xsl:text>~</xsl:text>
- <xsl:variable name="parameter-rtf">
- <Parameter Type="{$member/ReturnValue/ReturnType}" />
- </xsl:variable>
- <xsl:call-template name="GetParameterType">
- <xsl:with-param name="type" select="$type" />
- <xsl:with-param name="member" select="$member" />
- <xsl:with-param name="parameter" select="msxsl:node-set($parameter-rtf)/Parameter" />
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
-
- <!--
- - what should be <xsl:value-of select="@Type" /> becomes a nightmare once
- - generics enter the picture, since a parameter type could come from the
- - type itelf (becoming `N) or from the method (becoming ``N).
- -->
- <xsl:template name="GetParameterType">
- <xsl:param name="type" />
- <xsl:param name="member" />
- <xsl:param name="parameter" />
-
- <!-- the actual parameter type -->
- <xsl:variable name="ptype">
- <xsl:choose>
- <xsl:when test="contains($parameter/@Type, '[')">
- <xsl:value-of select="substring-before ($parameter/@Type, '[')" />
- </xsl:when>
- <xsl:when test="contains($parameter/@Type, '&amp;')">
- <xsl:value-of select="substring-before ($parameter/@Type, '&amp;')" />
- </xsl:when>
- <xsl:when test="contains($parameter/@Type, '*')">
- <xsl:value-of select="substring-before ($parameter/@Type, '*')" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$parameter/@Type" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <!-- parameter modifiers -->
- <xsl:variable name="pmodifier">
- <xsl:call-template name="Replace">
- <xsl:with-param name="s" select="substring-after ($parameter/@Type, $ptype)" />
- <xsl:with-param name="from">&amp;</xsl:with-param>
- <xsl:with-param name="to">@</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:variable name="gen-type">
- <xsl:call-template name="GetEscapedParameter">
- <xsl:with-param name="orig-parameter-type" select="$ptype" />
- <xsl:with-param name="parameter-type">
- <xsl:variable name="nested">
- <xsl:call-template name="GetEscapedParameter">
- <xsl:with-param name="orig-parameter-type" select="$ptype" />
- <xsl:with-param name="parameter-type" select="$ptype" />
- <xsl:with-param name="parameter-types" select="$type/Docs/typeparam" />
- <xsl:with-param name="escape" select="'`'" />
- <xsl:with-param name="index" select="1" />
- </xsl:call-template>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$nested != ''">
- <xsl:value-of select="$nested" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$ptype" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="parameter-types" select="$member/Docs/typeparam" />
- <xsl:with-param name="escape" select="'``'" />
- <xsl:with-param name="index" select="1" />
- </xsl:call-template>
- </xsl:variable>
-
- <!-- the actual parameter type -->
- <xsl:variable name="parameter-type">
- <xsl:choose>
- <xsl:when test="$gen-type != ''">
- <xsl:value-of select="$gen-type" />
- <xsl:value-of select="$pmodifier" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($ptype, $pmodifier)" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <!-- s/</{/g; s/>/}/g; so that less escaping is needed. -->
- <xsl:call-template name="Replace">
- <xsl:with-param name="s">
- <xsl:call-template name="Replace">
- <xsl:with-param name="s" select="translate ($parameter-type, '+', '.')" />
- <xsl:with-param name="from">&gt;</xsl:with-param>
- <xsl:with-param name="to">}</xsl:with-param>
- </xsl:call-template>
- </xsl:with-param>
- <xsl:with-param name="from">&lt;</xsl:with-param>
- <xsl:with-param name="to">{</xsl:with-param>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template name="Replace">
- <xsl:param name="s" />
- <xsl:param name="from" />
- <xsl:param name="to" />
- <xsl:choose>
- <xsl:when test="not(contains($s, $from))">
- <xsl:value-of select="$s" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="prefix" select="substring-before($s, $from)"/>
- <xsl:variable name="suffix" select="substring-after($s, $from)" />
- <xsl:value-of select="$prefix" />
- <xsl:value-of select="$to" />
- <xsl:call-template name="Replace">
- <xsl:with-param name="s" select="$suffix" />
- <xsl:with-param name="from" select="$from" />
- <xsl:with-param name="to" select="$to" />
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="getmodifiers">
- <xsl:param name="sig"/>
- <xsl:param name="protection" select="true()"/>
- <xsl:param name="inheritance" select="true()"/>
- <xsl:param name="extra" select="true()"/>
- <xsl:param name="typetype" select="false()"/>
-
- <xsl:variable name="Sig">
- <xsl:text> </xsl:text>
- <xsl:choose>
- <xsl:when test="contains($sig, '{')">
- <xsl:value-of select="substring-before ($sig, '{')" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$sig" />
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text> </xsl:text>
- </xsl:variable>
-
- <xsl:if test="$protection">
- <xsl:if test="contains($Sig, ' public ')">public </xsl:if>
- <xsl:if test="contains($Sig, ' private ')">private </xsl:if>
- <xsl:if test="contains($Sig, ' protected ')">protected </xsl:if>
- <xsl:if test="contains($Sig, ' internal ')">internal </xsl:if>
- </xsl:if>
-
- <xsl:if test="contains($Sig, ' static ')">static </xsl:if>
- <xsl:if test="contains($Sig, ' abstract ')">abstract </xsl:if>
- <xsl:if test="contains($Sig, ' operator ')">operator </xsl:if>
-
- <xsl:if test="contains($Sig, ' const ')">const </xsl:if>
- <xsl:if test="contains($Sig, ' readonly ')">readonly </xsl:if>
-
- <xsl:if test="$inheritance">
- <xsl:if test="contains($Sig, ' override ')">override </xsl:if>
- <xsl:if test="contains($Sig, ' new ')">new </xsl:if>
- </xsl:if>
-
- <xsl:if test="$extra">
- <xsl:if test="contains($Sig, ' sealed ')">sealed </xsl:if>
- <xsl:if test="contains($Sig, ' virtual ')">virtual </xsl:if>
-
- <xsl:if test="contains($Sig, ' extern ')">extern </xsl:if>
- <xsl:if test="contains($Sig, ' checked ')">checked </xsl:if>
- <xsl:if test="contains($Sig, ' unsafe ')">unsafe </xsl:if>
- <xsl:if test="contains($Sig, ' volatile ')">volatile </xsl:if>
- <xsl:if test="contains($Sig, ' explicit ')">explicit </xsl:if>
- <xsl:if test="contains($Sig, ' implicit ')">implicit </xsl:if>
- </xsl:if>
-
- <xsl:if test="$typetype">
- <xsl:if test="contains($Sig, ' class ')">class </xsl:if>
- <xsl:if test="contains($Sig, ' interface ')">interface </xsl:if>
- <xsl:if test="contains($Sig, ' struct ')">struct </xsl:if>
- <xsl:if test="contains($Sig, ' delegate ')">delegate </xsl:if>
- <xsl:if test="contains($Sig, ' enum ')">enum </xsl:if>
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="GetTypeDescription">
- <xsl:variable name="sig" select="TypeSignature[@Language='C#']/@Value"/>
- <xsl:choose>
- <xsl:when test="contains($sig, ' class ')">Class</xsl:when>
- <xsl:when test="contains($sig, ' interface ')">Interface</xsl:when>
- <xsl:when test="contains($sig, ' struct ')">Struct</xsl:when>
- <xsl:when test="contains($sig, ' delegate ')">Delegate</xsl:when>
- <xsl:when test="contains($sig, ' enum ')">Enum</xsl:when>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="since">
- <p>
- <i>Note: This namespace, class, or member is supported only in version <xsl:value-of select="@version" />
- and later.</i>
- </p>
- </xsl:template>
-
- <xsl:template name="GetLinkTargetHtml">
- <xsl:param name="type" />
- <xsl:param name="cref" />
-
- <xsl:variable name="href">
- <xsl:call-template name="GetLinkTarget">
- <xsl:with-param name="type" select="$type" />
- <xsl:with-param name="cref" select="$cref" />
- </xsl:call-template>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="string($href) = ''">
- <xsl:text>javascript:alert("Documentation not found.")</xsl:text>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="$href" /></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/mcs/class/monodoc/Resources/mdoc-sections-css.xsl b/mcs/class/monodoc/Resources/mdoc-sections-css.xsl
deleted file mode 100644
index 243406214ce..00000000000
--- a/mcs/class/monodoc/Resources/mdoc-sections-css.xsl
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- mdoc-sections-css.xsl: Common CSS implementation of mdoc-html-utils.xsl
- required functions.
-
-
- Including XSLT files need to provide the following functions:
-
- - CreateExpandedToggle()
-
- Author: Jonathan Pryor <jpryor@novell.com>
--->
-
-<xsl:stylesheet
- version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:monodoc="monodoc:///extensions"
- exclude-result-prefixes="monodoc"
- >
-
- <xsl:template name="CreateH2Section">
- <xsl:param name="name" />
- <xsl:param name="id" select="''" />
- <xsl:param name="child-id" select="generate-id (.)" />
- <xsl:param name="content" />
-
- <h2 class="Section">
- <xsl:if test="$id != ''">
- <xsl:attribute name="id">
- <xsl:value-of select="$id" />
- </xsl:attribute>
- </xsl:if>
- <xsl:value-of select="$name" />
- </h2>
- <div class="SectionBox" id="{$child-id}">
- <xsl:copy-of select="$content" />
- </div>
- </xsl:template>
-
- <xsl:template name="CreateH3Section">
- <xsl:param name="name" />
- <xsl:param name="id" select="''" />
- <xsl:param name="class" select="''" />
- <xsl:param name="child-id" select="generate-id (.)" />
- <xsl:param name="content" />
-
- <h3>
- <xsl:if test="$class != ''">
- <xsl:attribute name="class">
- <xsl:value-of select="$class" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="$id != ''">
- <xsl:attribute name="id">
- <xsl:value-of select="$id" />
- </xsl:attribute>
- </xsl:if>
- <xsl:value-of select="$name" />
- </h3>
- <blockquote id="{$child-id}">
- <xsl:copy-of select="$content" />
- </blockquote>
- </xsl:template>
-
- <xsl:template name="CreateH4Section">
- <xsl:param name="name" />
- <xsl:param name="id" select="''" />
- <xsl:param name="child-id" select="generate-id (.)" />
- <xsl:param name="content" />
-
- <h4 class="Subsection">
- <xsl:if test="$id != ''">
- <xsl:attribute name="id">
- <xsl:value-of select="$id" />
- </xsl:attribute>
- </xsl:if>
- <xsl:value-of select="$name" />
- </h4>
- <blockquote class="SubsectionBox" id="{$child-id}">
- <xsl:copy-of select="$content" />
- </blockquote>
- </xsl:template>
-
- <xsl:template name="CreateEnumerationTable">
- <xsl:param name="content" />
- <table class="Enumeration">
- <tr><th>Member Name</th><th>Description</th></tr>
- <xsl:copy-of select="$content" />
- </table>
- </xsl:template>
-
- <xsl:template name="CreateHeader">
- <xsl:param name="content" />
- <xsl:copy-of select="$content" />
- </xsl:template>
-
- <xsl:template name="CreateListTable">
- <xsl:param name="header" />
- <xsl:param name="content" />
- <table class="Documentation">
- <tr><xsl:copy-of select="$header" /></tr>
- <xsl:copy-of select="$content" />
- </table>
- </xsl:template>
-
- <xsl:template name="CreateMembersTable">
- <xsl:param name="content" />
- <table class="TypeMembers">
- <xsl:copy-of select="$content" />
- </table>
- </xsl:template>
-
- <xsl:template name="CreateSignature">
- <xsl:param name="content" />
- <xsl:param name="id" />
- <h2>Syntax</h2>
- <div class="Signature">
- <xsl:if test="$id != ''">
- <xsl:attribute name="id">
- <xsl:copy-of select="$id" />
- </xsl:attribute>
- </xsl:if>
- <xsl:copy-of select="$content" />
- </div>
- </xsl:template>
-
- <xsl:template name="CreateTypeDocumentationTable">
- <xsl:param name="content" />
- <table class="TypeDocumentation">
- <tr><th>Type</th><th>Reason</th></tr>
- <xsl:copy-of select="$content" />
- </table>
- </xsl:template>
-
-</xsl:stylesheet>
-
diff --git a/mcs/class/monodoc/Resources/mdoc-sections.xsl b/mcs/class/monodoc/Resources/mdoc-sections.xsl
deleted file mode 100644
index 894faeaf9ee..00000000000
--- a/mcs/class/monodoc/Resources/mdoc-sections.xsl
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- mdoc-sections.xsl: Common non-CSS implementation of mdoc-html-utils.xsl
- required functions.
-
- Author: Jonathan Pryor <jpryor@novell.com>
-
--->
-
-<xsl:stylesheet
- version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:monodoc="monodoc:///extensions"
- exclude-result-prefixes="monodoc"
- >
- <xsl:template name="CreateH2Section">
- <xsl:param name="name" />
- <xsl:param name="id" select="''" />
- <xsl:param name="child-id" select="generate-id (.)" />
- <xsl:param name="content" />
-
- <h2 class="Section">
- <xsl:value-of select="$name" />
- </h2>
- <blockquote id="{$child-id}">
- <xsl:copy-of select="$content" />
- </blockquote>
- </xsl:template>
-
- <xsl:template name="CreateH3Section">
- <xsl:param name="name" />
- <xsl:param name="id" select="''" />
- <xsl:param name="class" select="''" />
- <xsl:param name="child-id" select="generate-id (.)" />
- <xsl:param name="content" />
-
- <h3>
- <xsl:value-of select="$name" />
- </h3>
- <blockquote id="{$child-id}">
- <xsl:copy-of select="$content" />
- </blockquote>
- </xsl:template>
-
- <xsl:template name="CreateH4Section">
- <xsl:param name="name" />
- <xsl:param name="id" select="''" />
- <xsl:param name="child-id" select="generate-id (.)" />
- <xsl:param name="content" />
-
- <h4 class="Subsection">
- <xsl:value-of select="$name" />
- </h4>
- <blockquote class="SubsectionBox" id="{$child-id}">
- <xsl:copy-of select="$content" />
- </blockquote>
- </xsl:template>
-
- <xsl:template name="CreateEnumerationTable">
- <xsl:param name="content" />
- <table class="EnumerationsTable" border="1" cellpadding="10" width="100%">
- <tr bgcolor="#f2f2f2">
- <th>Member Name</th>
- <th>Description</th>
- </tr>
- <xsl:copy-of select="$content" />
- </table>
- </xsl:template>
-
- <xsl:template name="CreateHeader">
- <xsl:param name="content" />
- <table class="HeaderTable" width="100%" cellpadding="5">
- <tr bgcolor="#b0c4de">
- <td>
- <xsl:copy-of select="$content" />
- </td>
- </tr>
- </table>
- </xsl:template>
-
- <xsl:template name="CreateListTable">
- <xsl:param name="header" />
- <xsl:param name="content" />
- <table border="1" cellpadding="3" width="100%">
- <tr bgcolor="#f2f2f2" valign="top">
- <xsl:copy-of select="$header" />
- </tr>
- <xsl:copy-of select="$content" />
- </table>
- </xsl:template>
-
- <xsl:template name="CreateMembersTable">
- <xsl:param name="content" />
- <table border="1" cellpadding="6" width="100%">
- <xsl:copy-of select="$content" />
- </table>
- </xsl:template>
-
- <xsl:template name="CreateSignature">
- <xsl:param name="content" />
- <xsl:param name="id" />
- <table class="SignatureTable" bgcolor="#c0c0c0" cellspacing="0" width="100%">
- <xsl:attribute name="id">
- <xsl:copy-of select="$id" />
- </xsl:attribute>
- <tr><td>
- <table class="InnerSignatureTable" cellpadding="10" cellspacing="0" width="100%">
- <tr bgcolor="#f2f2f2">
- <td>
- <xsl:copy-of select="$content" />
- </td></tr>
- </table>
- </td></tr>
- </table>
- <br />
- </xsl:template>
-
- <xsl:template name="CreateTypeDocumentationTable">
- <xsl:param name="content" />
- <table class="TypePermissionsTable" border="1" cellpadding="6" width="100%">
- <tr bgcolor="#f2f2f2"><th>Type</th><th>Reason</th></tr>
- <xsl:copy-of select="$content" />
- </table>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/mcs/class/monodoc/Resources/mono-ecma-css.xsl b/mcs/class/monodoc/Resources/mono-ecma-css.xsl
deleted file mode 100644
index 017699de200..00000000000
--- a/mcs/class/monodoc/Resources/mono-ecma-css.xsl
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- mono-ecma-css.xsl: ECMA-style docs to HTML+CSS stylesheet trasformation
- based on mono-ecma.xsl by Joshua Tauberer
-
- Author: Joshua Tauberer (tauberer@for.net)
- Author: Mario Sopena Novales (mario.sopena@gmail.com)
-
- TODO:
- split this into multiple files
--->
-
-<xsl:stylesheet
- version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:monodoc="monodoc:///extensions"
- exclude-result-prefixes="monodoc"
- >
- <xsl:include href="mdoc-sections-css.xsl" />
- <xsl:include href="mono-ecma-impl.xsl" />
-
- <xsl:output omit-xml-declaration="yes" />
-
- <xsl:template name="CreateExpandedToggle">
- <img src="xtree/images/clean/Lminus.gif" border="0" align="top"/>
- </xsl:template>
-
- <xsl:template name="CreateCodeBlock">
- <xsl:param name="language" />
- <xsl:param name="content" />
-
- <div class="CodeExample">
- <p><b><xsl:value-of select="$language"/> Example</b></p>
- <div>
- <pre>
- <!--
- <xsl:value-of select="monodoc:Colorize($content, string($language))"
- disable-output-escaping="yes" />
- -->
- <xsl:value-of select="$content" />
- </pre>
- </div>
- </div>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/mcs/class/monodoc/Resources/mono-ecma-impl.xsl b/mcs/class/monodoc/Resources/mono-ecma-impl.xsl
deleted file mode 100644
index a34c39d2761..00000000000
--- a/mcs/class/monodoc/Resources/mono-ecma-impl.xsl
+++ /dev/null
@@ -1,539 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- mono-ecma-impl.xsl: ECMA-style docs to HTML stylesheet trasformation
-
- Author: Joshua Tauberer (tauberer@for.net)
- Author: Jonathan Pryor (jpryor@novell.com)
-
- This file requires that including files define the following callable
- templates:
- - CreateCodeBlock (language, content)
- - CreateEnumerationTable (content)
- - CreateHeader (content)
- - CreateListTable (header, content)
- - CreateMembersTable (content)
- - CreateSignature (content)
- - CreateTypeDocumentationTable (content)
-
--->
-
-<xsl:stylesheet
- version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:monodoc="monodoc:///extensions"
- exclude-result-prefixes="monodoc"
- >
- <xsl:include href="mdoc-html-utils.xsl" />
-
- <!-- TEMPLATE PARAMETERS -->
-
- <xsl:param name="show"/>
- <xsl:param name="membertype"/>
- <xsl:param name="namespace"/>
-
- <!-- THE MAIN RENDERING TEMPLATE -->
-
- <xsl:template match="Type|elements">
- <!-- The namespace that the current type belongs to. -->
- <xsl:variable name="TypeNamespace" select="substring(@FullName, 1, string-length(@FullName) - string-length(@Name) - 1)"/>
-
- <!-- HEADER -->
-
- <xsl:variable name="typename" select="translate (@FullName, '+', '.')" />
- <xsl:variable name="typelink">
- <xsl:call-template name="GetEscapedTypeName">
- <xsl:with-param name="typename" select="@FullName" />
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="basename">
- <xsl:if test="Base/BaseTypeName">
- <xsl:value-of select="translate (Base/BaseTypeName, '+', '.')" />
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="baselink">
- <xsl:if test="Base/BaseTypeName">
- <xsl:call-template name="GetEscapedTypeName">
- <xsl:with-param name="typename" select="Base/BaseTypeName" />
- </xsl:call-template>
- </xsl:if>
- </xsl:variable>
-
- <xsl:call-template name="CreateHeader">
- <xsl:with-param name="content">
- <ul class="breadcrumb">
- <xsl:choose>
- <xsl:when test="$show='masteroverview'">
- <li class="namespace">
- <xsl:text>Namespaces in this Collection</xsl:text>
- </li>
- </xsl:when>
- <xsl:when test="$show='typeoverview'">
- <li class="namespace">
- <a>
- <xsl:attribute name="href">N:<xsl:value-of select="$TypeNamespace"/></xsl:attribute>
- <xsl:value-of select="$TypeNamespace"/></a>
- </li>
- <li class="pubclass">
- <xsl:value-of select="@Name"/>
- </li>
- </xsl:when>
- <xsl:when test="$show='members'">
- <li class="namespace">
- <a>
- <xsl:attribute name="href">N:<xsl:value-of select="$TypeNamespace"/></xsl:attribute>
- <xsl:value-of select="$TypeNamespace"/>
- </a>
- </li>
- <li class="pubclass">
- <a>
- <xsl:attribute name="href">
- <xsl:text>T:</xsl:text>
- <xsl:value-of select="$typelink" />
- </xsl:attribute>
- <xsl:value-of select="@Name"/>
- </a>
- </li>
- <li class="members">
- Members
- </li>
- </xsl:when>
- <xsl:when test="$show='member' or $show='overloads'">
- <li class="namespace">
- <a>
- <xsl:attribute name="href">N:<xsl:value-of select="$TypeNamespace"/></xsl:attribute>
- <xsl:value-of select="$TypeNamespace"/></a>
- </li>
- <li class="pubclass">
- <a>
- <xsl:attribute name="href">
- <xsl:text>T:</xsl:text>
- <xsl:value-of select="$typelink" />
- </xsl:attribute>
- <xsl:value-of select="@Name"/>
- </a>
- </li>
- <li class="pubproperty">
- <xsl:choose>
- <xsl:when test="$membertype='Operator'">
- <xsl:value-of select="$typename"/>
- <xsl:value-of select="' '"/> <!-- hard space -->
- <xsl:value-of select="substring-after(Members/Member[MemberType='Method'][position()=$index+1]/@MemberName, 'op_')"/>
- </xsl:when>
- <xsl:when test="$membertype='Constructor'">
- <xsl:value-of select="$typename"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="Members/Member[MemberType=$membertype][position()=$index+1]/@MemberName"/>
- </xsl:otherwise>
- </xsl:choose>
- </li>
- </xsl:when>
- <xsl:when test="$show='namespace'">
- <li class="namespace">
- <xsl:value-of select="$namespace"/>
- </li>
- </xsl:when>
- </xsl:choose>
- </ul>
- <div class="named-header">
- <xsl:choose>
- <xsl:when test="$show='masteroverview'">
- <xsl:text>Master Overview</xsl:text>
- </xsl:when>
- <xsl:when test="$show='typeoverview'">
- <xsl:value-of select="$typename"/>
- <xsl:value-of select="' '"/>
- <xsl:call-template name="gettypetype"/>
- </xsl:when>
- <xsl:when test="$show='members' and $membertype='All'">
- <xsl:value-of select="$typename"/>
- <xsl:text> Members</xsl:text>
- </xsl:when>
- <xsl:when test="$show='members'">
- <xsl:value-of select="$typename"/>
- <xsl:text>: </xsl:text>
- <xsl:value-of select="$membertype"/>
- <xsl:text> Members</xsl:text>
- </xsl:when>
- <xsl:when test="$show='member'">
- <xsl:choose>
- <xsl:when test="$membertype='Operator'">
- <xsl:value-of select="$typename"/>
- <xsl:value-of select="' '"/> <!-- hard space -->
- <xsl:value-of select="substring-after(Members/Member[MemberType='Method'][position()=$index+1]/@MemberName, 'op_')"/>
- </xsl:when>
- <xsl:when test="$membertype='Constructor'">
- <xsl:value-of select="$typename"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$typename"/>.<xsl:value-of select="Members/Member[MemberType=$membertype][position()=$index+1]/@MemberName"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="' '"/>
- <xsl:value-of select="$membertype"/>
- </xsl:when>
-
- <xsl:when test="$show='namespace'">
- <xsl:value-of select="$namespace"/>
- <xsl:text> Namespace</xsl:text>
- </xsl:when>
-
- <xsl:when test="$show='overloads'">
- <xsl:value-of select="$typename"/>.<xsl:value-of select="$index"/> Overloads
- </xsl:when>
-
- </xsl:choose>
- </div>
- </xsl:with-param>
- </xsl:call-template>
-
- <!-- SELECT WHAT TYPE OF VIEW:
- typeoverview
- members
- member
- -->
- <div class="Content">
- <xsl:choose>
- <xsl:when test="$show='masteroverview'">
-
- <xsl:for-each select="namespace">
- <xsl:sort select="@ns"/>
-
- <!-- Don't display the namespace if it is a sub-namespace of another one.
- But don't consider namespaces without periods, e.g. 'System', to be
- parent namespaces because then most everything will get grouped under it. -->
- <xsl:variable name="ns" select="@ns"/>
- <xsl:if test="count(parent::*/namespace[not(substring-before(@ns, '.')='') and starts-with($ns, concat(@ns, '.'))])=0">
-
- <p>
- <b><a href="N:{@ns}"><xsl:value-of select="@ns"/></a></b>
- </p>
- <blockquote>
- <div>
- <xsl:apply-templates select="summary" mode="notoppara"/>
- </div>
-
- <!-- Display the sub-namespaces of this namespace -->
- <xsl:if test="not(substring-before($ns, '.')='')">
- <xsl:for-each select="parent::*/namespace[starts-with(@ns, concat($ns, '.'))]">
- <br/>
- <div><a href="N:{@ns}"><xsl:value-of select="@ns"/></a></div>
- <div><xsl:apply-templates select="summary" mode="notoppara"/></div>
- </xsl:for-each>
- </xsl:if>
- </blockquote>
-
- </xsl:if>
- </xsl:for-each>
-
- </xsl:when>
- <!-- TYPE OVERVIEW -->
- <xsl:when test="$show='typeoverview'">
- <xsl:variable name="implemented" select="monodoc:MonoImpInfo(string(AssemblyInfo/AssemblyName), string(@FullName), true())" />
- <xsl:call-template name="CreateTypeOverview">
- <xsl:with-param name="implemented" select="$implemented" />
- <xsl:with-param name="show-members-link" select="true()" />
- </xsl:call-template>
-
-
- <!-- signature -->
- <xsl:call-template name="CreateTypeSignature" />
-
- <xsl:call-template name="DisplayDocsInformation">
- <xsl:with-param name="linkid" select="concat ('T:', @FullName)" />
- </xsl:call-template>
- </xsl:when>
-
- <!-- MEMBER LISTING -->
- <xsl:when test="$show='members'">
- <xsl:if test="$membertype='All'">
- <p>
- The members of <xsl:value-of select="$typename"/> are listed below.
- </p>
-
- <xsl:if test="Base/BaseTypeName">
- <p>
- <xsl:text>See Also: </xsl:text>
- <a>
- <xsl:attribute name="href">T:<xsl:value-of select="$baselink"/>/*</xsl:attribute>
- <xsl:text>Inherited members from </xsl:text>
- <xsl:value-of select="$basename"/>
- </a>
- </p>
- </xsl:if>
-
- <ul class="TypeMembersIndex">
- <xsl:if test="count(Members/Member[MemberType='Constructor'])">
- <li>
- <a><xsl:attribute name="href">T:<xsl:value-of select="$typelink"/>/C</xsl:attribute>Constructors</a>
- </li>
- </xsl:if>
- <xsl:if test="count(Members/Member[MemberType='Field'])">
- <li>
- <a><xsl:attribute name="href">T:<xsl:value-of select="$typelink"/>/F</xsl:attribute>Fields</a>
- </li>
- </xsl:if>
- <xsl:if test="count(Members/Member[MemberType='Property'])">
- <li>
- <a><xsl:attribute name="href">T:<xsl:value-of select="$typelink"/>/P</xsl:attribute>Properties</a>
- </li>
- </xsl:if>
- <xsl:if test="count(Members/Member[MemberType='Method' and not(starts-with(@MemberName,'op_'))])">
- <li>
- <a><xsl:attribute name="href">T:<xsl:value-of select="$typelink"/>/M</xsl:attribute>Methods</a>
- </li>
- </xsl:if>
- <xsl:if test="count(Members/Member[MemberType='Event'])">
- <li>
- <a><xsl:attribute name="href">T:<xsl:value-of select="$typelink"/>/E</xsl:attribute>Events</a>
- </li>
- </xsl:if>
- <xsl:if test="count(Members/Member[MemberType='Method' and starts-with(@MemberName,'op_')])">
- <li>
- <a><xsl:attribute name="href">T:<xsl:value-of select="$typelink"/>/E</xsl:attribute>Events</a>
- </li>
- </xsl:if>
- <xsl:if test="count(Members/Member[MemberType='ExtensionMethod'])">
- <li>
- <a><xsl:attribute name="href">T:<xsl:value-of select="$typelink"/>/X</xsl:attribute>Extension Methods</a>
- </li>
- </xsl:if>
- </ul>
-
- <!-- list each type of member (public, then protected) -->
-
- <xsl:call-template name="ListAllMembers" />
- </xsl:if>
-
- <xsl:if test="not($membertype='All')">
- <!-- list the members of this type (public, then protected) -->
-
- <p>
- The
- <xsl:call-template name="membertypeplurallc"><xsl:with-param name="name" select="$membertype"/></xsl:call-template>
- of <xsl:value-of select="$typename"/> are listed below. For a list of all members, see the <a>
- <xsl:attribute name="href">T:<xsl:value-of select="$typelink"/>/*</xsl:attribute>
- <xsl:value-of select="@Name"/> Members</a> list.
- </p>
-
- <xsl:if test="Base/BaseTypeName">
- <p>
- <xsl:text>See Also: </xsl:text>
- <a>
- <xsl:attribute name="href">T:<xsl:value-of select="$baselink"/>/*</xsl:attribute>
- <xsl:text>Inherited members from </xsl:text>
- <xsl:value-of select="$basename"/>
- </a>
- </p>
- </xsl:if>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="$membertype"/>
- <xsl:with-param name="showprotected" select="false()"/>
- </xsl:call-template>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="$membertype"/>
- <xsl:with-param name="showprotected" select="true()"/>
- </xsl:call-template>
- </xsl:if>
-
- </xsl:when>
-
- <xsl:when test="$show='overloads'">
- <p>
- The overloads of <xsl:value-of select="$index"/>
- are listed below. For a list of all members, see the <a>
- <xsl:attribute name="href">T:<xsl:value-of select="$typelink"/>/*</xsl:attribute>
- <xsl:value-of select="@Name"/> Members</a> list.
- </p>
-
- <!-- TODO: can we make this actually test if there are any overloads
- <xsl:if test="Base/BaseTypeName">
- <p>
- See Also: <a>
- <xsl:attribute name="href">T:<xsl:value-of select="Base/BaseTypeName"/>/*</xsl:attribute>
- Inherited members</a> from <xsl:value-of select="Base/BaseTypeName"/>
- </p>
- </xsl:if>
- -->
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="$membertype"/>
- <xsl:with-param name="showprotected" select="false()"/>
- <xsl:with-param name="overloads-mode" select="true()"/>
- </xsl:call-template>
-
- <xsl:call-template name="ListMembers">
- <xsl:with-param name="listmembertype" select="$membertype"/>
- <xsl:with-param name="showprotected" select="true()"/>
- <xsl:with-param name="overloads-mode" select="true()"/>
- </xsl:call-template>
- </xsl:when>
- <!-- MEMBER DETAILS -->
- <xsl:when test="$show='member'">
- <xsl:variable name="Type" select="."/>
-
- <!-- select the member, this just loops through the one member that we are to display -->
- <xsl:for-each select="Members/Member[MemberType=$membertype or ($membertype='Operator' and MemberType='Method')][position()=$index+1]">
-
- <!-- summary -->
-
- <xsl:call-template name="CreateMemberOverview">
- <xsl:with-param name="implemented" select="monodoc:MonoImpInfo(string(AssemblyInfo/AssemblyName), string(@FullName), true())" />
- </xsl:call-template>
-
- <xsl:call-template name="CreateMemberSignature">
- <xsl:with-param name="linkid" select="concat ('T:', @FullName)" />
- </xsl:call-template>
-
- <div class="MemberBox">
- <xsl:call-template name="DisplayDocsInformation">
- <xsl:with-param name="linkid" select="concat ('T:', @FullName)" />
- </xsl:call-template>
- </div>
-
- </xsl:for-each>
-
- </xsl:when>
-
- <!-- NAMESPACE SUMMARY -->
- <xsl:when test="$show='namespace'">
-
- <!-- summary -->
-
- <p><div class="msummary"><xsl:apply-templates select="summary" mode="notoppara"/></div>
-
- <xsl:if test="monodoc:MonoEditing()">
- <xsl:value-of select="' '" />
- [<a href="{monodoc:EditUrlNamespace (., $namespace, 'summary')}">Edit</a>]
- </xsl:if>
- </p>
-
- <!-- remarks -->
-
- <xsl:if test="not(remarks = '')">
- <h2>Remarks</h2>
- <div class="SectionBox">
- <xsl:apply-templates select="remarks"/>
- <xsl:if test="monodoc:MonoEditing()">
- <xsl:value-of select="' '" />
- [<a href="{monodoc:EditUrlNamespace (., $namespace, 'remarks')}">Edit</a>]
- </xsl:if>
- </div>
- </xsl:if>
-
- <xsl:call-template name="namespacetypes">
- <xsl:with-param name="typetype" select="'class'"/>
- <xsl:with-param name="typetitle" select="'Classes'"/>
- </xsl:call-template>
-
- <xsl:call-template name="namespacetypes">
- <xsl:with-param name="typetype" select="'interface'"/>
- <xsl:with-param name="typetitle" select="'Interfaces'"/>
- </xsl:call-template>
-
- <xsl:call-template name="namespacetypes">
- <xsl:with-param name="typetype" select="'struct'"/>
- <xsl:with-param name="typetitle" select="'Structs'"/>
- </xsl:call-template>
-
- <xsl:call-template name="namespacetypes">
- <xsl:with-param name="typetype" select="'delegate'"/>
- <xsl:with-param name="typetitle" select="'Delegates'"/>
- </xsl:call-template>
-
- <xsl:call-template name="namespacetypes">
- <xsl:with-param name="typetype" select="'enum'"/>
- <xsl:with-param name="typetitle" select="'Enumerations'"/>
- </xsl:call-template>
-
-
- </xsl:when>
-
- <!-- don't know what kind of page this is -->
- <xsl:otherwise>
- Don't know what to do!
- </xsl:otherwise>
-
- </xsl:choose>
- </div>
-
- <!-- FOOTER -->
-
- <div class="Footer">
- </div>
-
- </xsl:template>
-
- <xsl:template name="GetLinkTarget">
- <xsl:param name="type" />
- <xsl:param name="cref" />
-
- <xsl:value-of select="$cref" />
- </xsl:template>
-
- <xsl:template name="namespacetypes">
- <xsl:param name="typetype"/>
- <xsl:param name="typetitle"/>
-
- <xsl:variable name="NODES" select="*[name()=$typetype]"/>
-
- <xsl:if test="count($NODES)">
-
- <xsl:call-template name="CreateH2Section">
- <xsl:with-param name="name" select="$typetitle" />
- <xsl:with-param name="child-id" select="$typetitle" />
- <xsl:with-param name="content">
-
- <xsl:call-template name="CreateTypeDocumentationTable">
- <xsl:with-param name="content">
- <xsl:for-each select="$NODES">
- <xsl:sort select="@name"/>
-
- <tr>
- <td>
- <a>
- <xsl:attribute name="href">
- <xsl:text>T:</xsl:text>
- <xsl:call-template name="GetEscapedTypeName">
- <xsl:with-param name="typename" select="@fullname" />
- </xsl:call-template>
- </xsl:attribute>
- <xsl:value-of select="@name"/>
- </a>
-
- <xsl:variable name="containingtype" select="substring-before(@fullname, concat('+',@name))"/>
- <xsl:if test="$containingtype">
- <br/>(in
- <xsl:call-template name="maketypelink">
- <xsl:with-param name="type" select="$containingtype"/>
- <xsl:with-param name="wrt" select="$namespace"/>
- </xsl:call-template>)
- </xsl:if>
- </td>
- <td>
- <xsl:apply-templates select="summary" mode="notoppara"/>
- <xsl:variable name="MonoImplInfo" select="monodoc:MonoImpInfo(string(@assembly), string(@fullname), false())"/>
- <xsl:if test="$MonoImplInfo"><br/><b><xsl:value-of disable-output-escaping="yes" select="$MonoImplInfo"/></b></xsl:if>
- </td>
- </tr>
- </xsl:for-each>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
-
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="CreateEditLink">
- <xsl:param name="e" />
- <xsl:if test="monodoc:MonoEditing()">
- <xsl:value-of select="' '" />
- [<a href="{monodoc:EditUrl ($e)}">Edit</a>]
- </xsl:if>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/mcs/class/monodoc/Resources/mono-ecma.css b/mcs/class/monodoc/Resources/mono-ecma.css
deleted file mode 100644
index ae6e1921f7e..00000000000
--- a/mcs/class/monodoc/Resources/mono-ecma.css
+++ /dev/null
@@ -1,607 +0,0 @@
-body
-{
- font-family: "Lucida Grande", Geneva, Helvetica, Arial, Verdana, Sans-Serif;
- margin: 0;
- padding: 0;
- color: #555;
-}
-
-a:link
-{
- color: #034af3;
- text-decoration: underline;
-}
-a:visited
-{
- color: #505abc;
-}
-a:hover
-{
- color: #1d60ff;
- text-decoration: none;
-}
-a:active
-{
- color: #12eb87;
-}
-
-pre
-{
- font-family: Consolas, "Courier New", Monospace;
- border: 1px solid #CCCCCC;
- background-color: #F7F7F7;
- padding: 7px;
- /*margin: 0 20px 0 20px;*/
- line-height: 1.3em;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
-}
-
-img
-{
- border: 0px;
-}
-
-/* HEADINGS
-----------------------------------------------------------*/
-h1, h2, h3, h4, h5, h6
-{
- color: #333;
- font-family: Arial, Helvetica, sans-serif;
-}
-
-h1
-{
- font-size: 16pt;
- padding-bottom: 0;
- margin-bottom: 0;
-}
-h2
-{
- font-size: 14pt;
- padding: 0 0 1px 0;
- border-bottom: 1px solid #DDDDDD;
- margin-top: .3em;
- margin-bottom: .5em;
-}
-h3
-{
- font-size: 12pt;
- /*margin-top: 20px;*/
- margin-bottom: 5px;
-}
-h4
-{
- font-size: 11pt;
- margin-bottom: 5px;
-}
-h5, h6
-{
- font-size: 10pt;
-}
-
-/* this rule styles <h2> tags that are the
-first child of the left and right table columns */
-.rightColumn > h1, .rightColumn > h2, .leftColumn > h1, .leftColumn > h2
-{
- margin-top: 0;
-}
-
-/* PRIMARY LAYOUT ELEMENTS
-----------------------------------------------------------*/
-
-/* you can specify a greater or lesser percentage for the
-page width. Or, you can specify an exact pixel width. */
-.page
-{
- padding: 0;
- margin: 0;
-}
-
-#header
-{
- position: relative;
- margin-bottom: 0px;
- color: #000;
- padding: 0 0 0 15px;
- background: url('mdocimages/headerbg.png');
- background-position: right;
- background-repeat: no-repeat;
- background-color: #679EF1;
- height: 40px;
- border-bottom: 1px solid #98C2F7;
- border-bottom: 1px dotted #3363BD;
-}
-
-#header h1
-{
- font-weight: bold;
- padding: 0;
- margin: 0;
- color: #fff;
- border: none;
- line-height: 1.8em;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 22px !important;
-}
-
-#main
-{
- padding: 0px 0px 15px 0px;
- background-color: #fff;
- margin-bottom: 30px;
- _height: 1px; /* only IE6 applies CSS properties starting with an underscore */
-}
-
-#footer
-{
- color: #999;
- padding: 10px 0;
- text-align: center;
- line-height: normal;
- margin: 0;
- font-size: 8pt;
-}
-
-#line-background
-{
- background-image: url('mdocimages/treebg.png');
- background-repeat: repeat-y;
- height: 100%;
-}
-
-#left-content
-{
- float: left;
- width: 186px;
- padding-top: 5px;
- margin-right: 5px;
- overflow: hidden;
-}
-
-#right-content
-{
- padding-top: 0px;
- overflow: auto;
- height: 100%;
-}
-
-.right-content-pad
-{
- margin: 6px 10px 0px 10px;
-}
-
-.named-header
-{
- background: url('mdocimages/hatch.png') repeat-x left bottom;
- height: 48px;
- background-color: #FAFBFD;
- font-size: 16pt;
- font-weight: bold;
- font-family: 'Segoe UI',Verdana,Arial, sans-serif;
-}
-
-.member-list
-{
- border-spacing: 0px;
-}
-
-.member-list td
-{
- padding: 4px;
- margin: 0px;
- border-bottom: 1px dotted #CCCCCC;
-}
-
-.member-list
-{
-
-}
-/* TAB MENU
-----------------------------------------------------------*/
-ul#menu
-{
- border-bottom: 1px #5C87B2 solid;
- padding: 0 0 2px;
- position: relative;
- margin: 0;
- text-align: right;
-}
-
-ul#menu li
-{
- display: inline;
- list-style: none;
-}
-
-ul#menu li#greeting
-{
- padding: 10px 20px;
- font-weight: bold;
- text-decoration: none;
- line-height: 2.8em;
- color: #fff;
-}
-
-ul#menu li a
-{
- padding: 10px 20px;
- font-weight: bold;
- text-decoration: none;
- line-height: 2.8em;
- background-color: #e8eef4;
- color: #034af3;
-}
-
-ul#menu li a:hover
-{
- background-color: #fff;
- text-decoration: none;
-}
-
-ul#menu li a:active
-{
- background-color: #a6e2a6;
- text-decoration: none;
-}
-
-ul#menu li.selected a
-{
- background-color: #fff;
- color: #000;
-}
-
-/* FORM LAYOUT ELEMENTS
-----------------------------------------------------------*/
-
-fieldset
-{
- margin: 1em 0;
- padding: 1em;
- border: 1px solid #CCC;
-}
-
-fieldset p
-{
- margin: 2px 12px 10px 10px;
-}
-
-legend
-{
- font-size: 11pt;
- font-weight: 600;
- padding: 2px 4px 8px 4px;
-}
-
-input[type="text"]
-{
- width: 200px;
- border: 1px solid #CCC;
-}
-
-input[type="password"]
-{
- width: 200px;
- border: 1px solid #CCC;
-}
-
-/* TABLE
-----------------------------------------------------------*/
-
-table
-{
-/* border: solid 1px #e8eef4;
- border-collapse: collapse;*/
-}
-
-table td
-{
- padding: 5px;
-/* border: solid 1px #e8eef4;*/
-}
-
-table th
-{
- padding: 6px 5px;
- text-align: left;
- background-color: #e8eef4;
- border: solid 1px #e8eef4;
-}
-
-/* MISC
-----------------------------------------------------------*/
-.clear
-{
- clear: both;
-}
-
-.error
-{
- color:Red;
-}
-
-.indent
-{
- margin-left: 20px;
- margin-right: 20px;
-}
-
-#menucontainer
-{
- margin-top:40px;
-}
-
-div#title
-{
- display:block;
- float:left;
- text-align:left;
-}
-
-#logindisplay
-{
- font-size:11pt;
- display:block;
- text-align:right;
- margin:0px;
- color:White;
-}
-
-#logindisplay a:link
-{
- color: white;
- text-decoration: underline;
-}
-
-#logindisplay a:visited
-{
- color: white;
- text-decoration: underline;
-}
-
-#logindisplay a:hover
-{
- color: white;
- text-decoration: none;
-}
-
-/* Styles for validation helpers
------------------------------------------------------------*/
-.field-validation-error
-{
- color: #ff0000;
-}
-
-.field-validation-valid
-{
- display: none;
-}
-
-.input-validation-error
-{
- border: 1px solid #ff0000;
- background-color: #ffeeee;
-}
-
-.validation-summary-errors
-{
- font-weight: bold;
- color: #ff0000;
-}
-
-.validation-summary-valid
-{
- display: none;
-}
-
-/* Styles for editor and display helpers
-----------------------------------------------------------*/
-.display-label,
-.editor-label,
-.display-field,
-.editor-field
-{
- margin: 0.5em 0;
-}
-
-.text-box
-{
- width: 30em;
-}
-
-.text-box.multi-line
-{
- height: 6.5em;
-}
-
-.tri-state
-{
- width: 6em;
-}
-
-/* Breadcrumb Bar */
-.breadcrumb
-{
- border-left: 1px solid #cacaca;
- border-right: 1px solid #cacaca;
- border-bottom: 1px solid #cacaca;
- background-image: url('mdocimages/bc_bg.png');
- background-repeat: repeat-x;
- height: 25px;
- line-height: 25px;
- color: #454545;
- border-top: 0px;
- width: 100%;
- overflow: hidden;
- margin-left: -2px;
- padding: 0px;
- font-style: normal;
- font-variant: normal;
- font-weight: normal;
- font-size: 11px;
- font-family: Arial, Helvetica, sans-serif;
- margin-right: 0px;
- margin-top: 0px;
- margin-bottom: 0px;
-}
-
-.breadcrumb li
-{
- list-style-type: none;
- float: left;
- padding-left: 25px;
- background-position: 5px center;
- background-repeat: no-repeat;
-}
-
-.breadcrumb li.pubclass { background-image: url('mdocimages/pubclass.png'); }
-.breadcrumb li.pubdelegate { background-image: url('mdocimages/pubdelegate.png'); }
-.breadcrumb li.pubenumeration { background-image: url('mdocimages/pubenumeration.png'); }
-.breadcrumb li.pubevent { background-image: url('mdocimages/pubevent.png'); }
-.breadcrumb li.pubextension { background-image: url('mdocimages/pubextension.png'); }
-.breadcrumb li.pubfield { background-image: url('mdocimages/pubfield.png'); }
-.breadcrumb li.pubinterface { background-image: url('mdocimages/pubinterface.png'); }
-.breadcrumb li.pubmethod { background-image: url('mdocimages/pubmethod.png'); }
-.breadcrumb li.pubproperty { background-image: url('mdocimages/pubproperty.png'); }
-.breadcrumb li.pubstructure { background-image: url('mdocimages/pubstructure.png'); }
-
-.breadcrumb li.protclass { background-image: url('mdocimages/protclass.png'); }
-.breadcrumb li.protdelegate { background-image: url('mdocimages/protdelegate.png'); }
-.breadcrumb li.protenumeration { background-image: url('mdocimages/protenumeration.png'); }
-.breadcrumb li.protevent { background-image: url('mdocimages/protevent.png'); }
-.breadcrumb li.protextension { background-image: url('mdocimages/protextension.png'); }
-.breadcrumb li.protfield { background-image: url('mdocimages/protfield.png'); }
-.breadcrumb li.protinterface { background-image: url('mdocimages/protinterface.png'); }
-.breadcrumb li.protmethod { background-image: url('mdocimages/protmethod.png'); }
-.breadcrumb li.protproperty { background-image: url('mdocimages/protproperty.png'); }
-.breadcrumb li.protstructure { background-image: url('mdocimages/protstructure.png'); }
-
-.breadcrumb li.privclass { background-image: url('mdocimages/privclass.png'); }
-.breadcrumb li.privdelegate { background-image: url('mdocimages/privdelegate.png'); }
-.breadcrumb li.privenumeration { background-image: url('mdocimages/privenumeration.png'); }
-.breadcrumb li.privevent { background-image: url('mdocimages/privevent.png'); }
-.breadcrumb li.privextension { background-image: url('mdocimages/privextension.png'); }
-.breadcrumb li.privfield { background-image: url('mdocimages/privfield.png'); }
-.breadcrumb li.privinterface { background-image: url('mdocimages/privinterface.png'); }
-.breadcrumb li.privmethod { background-image: url('mdocimages/privmethod.png'); }
-.breadcrumb li.privproperty { background-image: url('mdocimages/privproperty.png'); }
-.breadcrumb li.privstructure { background-image: url('mdocimages/privstructure.png'); }
-
-.breadcrumb li.namespace
-{
- padding-left: 26px;
- background-image: url('mdocimages/namespace.png');
-}
-
-.breadcrumb li.reference
-{
- padding-left: 26px;
- background-image: url('mdocimages/reference.png');
-}
-
-.breadcrumb li.members
-{
- padding-left: 24px;
- background-image: url('mdocimages/members.png');
-}
-
-.breadcrumb li.home
-{
- padding-left: 31px;
- background-image: url('mdocimages/house.png');
- background-position: 8px center;
-}
-
-.breadcrumb li.help
-{
- background-image: url('mdocimages/help.png');
-}
-
-.breadcrumb li.unrecognized
-{
- background-image: url('mdocimages/error.png');
-}
-
-.breadcrumb a
-{
- height: 25px;
- display: block;
- background-image: url('mdocimages/bc_separator.png');
- background-repeat: no-repeat;
- background-position: right;
- padding-right: 15px;
- color: #454545;
- text-decoration: none;
-}
-
-.breadcrumb a:hover
-{
- text-decoration: underline;
-}
-
-.clearer
-{
- clear: both;
-}
-
-div.Signature {
- border: 1px solid #C0C0C0;
- background: #F2F2F2;
- padding: 1em;
- /* margin-left: 1em; */
-}
-
-div.Content {
- /*margin-left: 1em;*/
-}
-
-div.msummary {
- font-size: 24px;
- color: #38689b;
-}
-
-.SectionBox {
- /*margin-left: 1em;*/
-}
-
-/* Salvaged from the old style */
-table.Documentation, table.Enumeration, table.TypeDocumentation {
- border-collapse: collapse;
- width: 100%;
-}
-
-table.Documentation tr th, table.TypeMembers tr th, table.Enumeration tr th, table.TypeDocumentation tr th {
- background: whitesmoke;
- padding: 0.8em;
- border: 1px solid gray;
- text-align: left;
- vertical-align: bottom;
-}
-
-table.Documentation tr td, table.TypeMembers tr td, table.Enumeration tr td, table.TypeDocumentation tr td {
- padding: 0.5em;
- border: 1px solid gray;
- text-align: left;
- vertical-align: top;
-}
-
-table.TypeMembers {
- border: 1px solid #C0C0C0;
- width: 100%;
-}
-
-table.TypeMembers tr td {
- background: #F8F8F8;
- border: white;
-}
-
-span.NotEntered /* Documentation for this section has not yet been entered */ {
- font-style: italic;
- color: #aaa;
-}
-
-.SubsectionBox {
- margin-top: 0;
- margin-bottom: 0;
-} \ No newline at end of file
diff --git a/mcs/class/monodoc/Resources/mono-ecma.xsl b/mcs/class/monodoc/Resources/mono-ecma.xsl
deleted file mode 100644
index 76356d2f13e..00000000000
--- a/mcs/class/monodoc/Resources/mono-ecma.xsl
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- mono-ecma.xsl: ECMA-style docs to HTML stylesheet trasformation
-
- Author: Joshua Tauberer (tauberer@for.net)
-
- TODO:
- split this into multiple files
--->
-
-<xsl:stylesheet
- version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:monodoc="monodoc:///extensions"
- exclude-result-prefixes="monodoc"
- >
- <xsl:import href="mdoc-sections.xsl" />
- <xsl:import href="mono-ecma-impl.xsl" />
-
- <xsl:output omit-xml-declaration="yes" />
-
- <xsl:template name="CreateCodeBlock">
- <xsl:param name="language" />
- <xsl:param name="content" />
- <table class="CodeExampleTable" bgcolor="#f5f5dd" border="1" cellpadding="5" width="100%">
- <tr><td><b><xsl:value-of select="$language"/> Example</b></td></tr>
- <tr>
- <td>
- <!--
- <xsl:value-of select="monodoc:Colorize($content, string($language))"
- disable-output-escaping="yes" />
- -->
- <pre>
- <xsl:value-of select="$content" />
- </pre>
- </td>
- </tr>
- </table>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/mcs/class/monodoc/Resources/toc-html.xsl b/mcs/class/monodoc/Resources/toc-html.xsl
deleted file mode 100644
index ea4d564e613..00000000000
--- a/mcs/class/monodoc/Resources/toc-html.xsl
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="html" />
-
- <xsl:template match="/toc">
- <table bgcolor="#b0c4de" width="100%" cellpadding="5"><tr><td><h3><xsl:value-of select="@title" /></h3></td></tr></table>
- <xsl:apply-templates />
- </xsl:template>
-
- <xsl:template match="description">
- <p><xsl:value-of select="." /></p>
- </xsl:template>
-
- <xsl:template match="list">
- <ul>
- <xsl:apply-templates />
- </ul>
- </xsl:template>
-
- <xsl:template match="item">
- <xsl:choose>
- <xsl:when test="list">
- <li>
- <xsl:apply-templates select="list" />
- </li>
- </xsl:when>
- <xsl:otherwise>
- <li><a href="{@url}"><xsl:value-of select="." /></a></li>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-</xsl:stylesheet> \ No newline at end of file
diff --git a/mcs/class/monodoc/Test/Monodoc.Ecma/EcmaUrlTests.cs b/mcs/class/monodoc/Test/Monodoc.Ecma/EcmaUrlTests.cs
deleted file mode 100644
index 8e27bc08b13..00000000000
--- a/mcs/class/monodoc/Test/Monodoc.Ecma/EcmaUrlTests.cs
+++ /dev/null
@@ -1,839 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Collections.Generic;
-
-using NUnit.Framework;
-
-using Monodoc;
-using Monodoc.Ecma;
-
-namespace MonoTests.Monodoc.Ecma
-{
- [TestFixture]
- public class EcmaUrlTests
- {
- EcmaUrlParser parser;
-
- [SetUp]
- public void Setup ()
- {
- parser = new EcmaUrlParser ();
- }
-
- void AssertValidUrl (string url)
- {
- try {
- parser.IsValid (url);
- } catch {
- Assert.Fail (string.Format ("URL '{0}' deemed not valid", url));
- }
- }
-
- void AssertInvalidUrl (string url)
- {
- try {
- parser.IsValid (url);
- } catch {
- return;
- }
- Assert.Fail (string.Format ("URL '{0}' deemed valid", url));
- }
-
- void AssertUrlDesc (EcmaDesc expected, string url)
- {
- EcmaDesc actual = null;
- try {
- actual = parser.Parse (url);
- } catch (Exception e) {
- Assert.Fail (string.Format ("URL '{0}' deemed not valid: {1}{2}", url, Environment.NewLine, e.ToString ()));
- }
-
- Assert.AreEqual (expected, actual, "Converted URL differs");
- }
-
- void AssertEcmaString (string expected, EcmaDesc actual)
- {
- string actualString = actual.ToEcmaCref ();
- Assert.AreEqual (expected, actualString);
- }
-
- IEnumerable<EcmaDesc> GenericTypeArgumentsList (params string[] parameters)
- {
- foreach (var p in parameters)
- yield return new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = p,
- Namespace = string.Empty
- };
- }
-
- [Test]
- public void CommonMethodUrlIsValidTest ()
- {
- AssertValidUrl ("M:System.String.FooBar()");
- AssertValidUrl ("M:System.String.FooBar(System.String, Int32)");
- AssertValidUrl ("M:System.Foo.Int32<System.String+FooBar<System.Blop<T, U`2>>>.Foo()");
- AssertValidUrl ("M:System.Foo.Int32<System.String+FooBar<System.Blop<T, U`2>>>.Foo(Bleh,Bar)");
- AssertValidUrl ("M:System.Foo.Int32<System.String+FooBar<System.Blop<T, U`2>>>.Foo(Bleh<V>,Bar)");
- AssertValidUrl ("M:Gendarme.Framework.Helpers.Log.WriteLine(string,string,object[])");
- AssertValidUrl ("M:Mono.Security.X509.Extensions.SubjectKeyIdentifierExtension.Decode");
- AssertValidUrl ("M:Mono.Security.PKCS7.IssuerAndSerialNumber");
- }
-
- [Test]
- public void CommonTypeUrlIsValidTest ()
- {
- AssertValidUrl ("T:Int32");
- AssertValidUrl ("T:System.Foo.Int32");
- AssertValidUrl ("T:System.Foo.Int32<System.String+FooBar`1>");
- AssertValidUrl ("T:System.Foo.Int32<System.String+FooBar<System.Blop<T, U>>>");
- AssertValidUrl ("T:System.Foo.Int32<T>");
- AssertValidUrl ("T:System.Foo.Int32<T,U>");
- AssertValidUrl ("T:System.Foo.Int32<System.String+FooBar<System.Blop<T, U>>>");
- AssertValidUrl ("T:System.Foo.Int32<System.String+FooBar<System.Blop<T, U`2>>>");
- }
-
- [Test]
- public void CommonTypeUrlNotValidTest ()
- {
- AssertInvalidUrl ("TInt32");
- AssertInvalidUrl ("K:Int32");
- AssertInvalidUrl ("T:System..Foo.Int32");
- AssertInvalidUrl ("T:System.Foo.Int32<System.String+FooBar`1");
- AssertInvalidUrl ("T:System.Foo.Int32<System.String+FooBarSystem.Blop<T, U>>>");
- AssertInvalidUrl ("T:System.Foo.Int32<T,>");
- AssertInvalidUrl ("T:System.Foo.Int32<+FooBar<System.Blop<T, U>>>");
- }
-
- [Test]
- public void NamespaceValidTest ()
- {
- AssertValidUrl ("N:Foo.Bar");
- AssertValidUrl ("N:Foo");
- AssertValidUrl ("N:Foo.Bar.Baz");
- AssertValidUrl ("N:A.B.C");
-
- var ast = new EcmaDesc () { DescKind = EcmaDesc.Kind.Namespace,
- Namespace = "Foo.Bar.Blop" };
- AssertUrlDesc (ast, "N:Foo.Bar.Blop");
- }
-
- [Test]
- public void ConstructorValidTest ()
- {
- AssertValidUrl ("C:Gendarme.Rules.Concurrency.DecorateThreadsRule.DecorateThreadsRule");
- AssertValidUrl ("C:Gendarme.Rules.Concurrency.DecorateThreadsRule.DecorateThreadsRule()");
- AssertValidUrl ("C:Gendarme.Rules.Concurrency.DecorateThreadsRule.DecorateThreadsRule(System.String)");
- AssertValidUrl ("C:Gendarme.Framework.Helpers.MethodSignature.MethodSignature(string,string,string[],System.Func<Mono.Cecil.MethodReference,System.Boolean>)");
- AssertValidUrl ("C:System.Collections.Generic.Dictionary<TKey,TValue>+KeyCollection.KeyCollection(System.Collections.Generic.Dictionary<TKey,TValue>)");
- AssertValidUrl ("C:Microsoft.Build.Utilities.TaskItem(System.String,System.Collections.IDictionary)");
- }
-
- [Test]
- public void SlashExpressionValidTest ()
- {
- AssertValidUrl ("T:Foo.Bar.Type/*");
- AssertValidUrl ("T:Foo.Bar.Type/M");
- AssertValidUrl ("T:Gendarme.Framework.Bitmask<T>/M/Equals");
- AssertValidUrl ("T:Gendarme.Framework.Helpers.Log/M/WriteLine<T>");
- AssertValidUrl ("T:System.Windows.Forms.AxHost/M/System.ComponentModel.ICustomTypeDescriptor.GetEvents");
- }
-
- [Test]
- public void MethodWithArgModValidTest ()
- {
- AssertValidUrl ("M:Foo.Bar.FooBar(int, System.Drawing.Imaging&)");
- AssertValidUrl ("M:Foo.Bar.FooBar(int@, System.Drawing.Imaging)");
- AssertValidUrl ("M:Foo.Bar.FooBar(int, System.Drawing.Imaging*)");
- AssertValidUrl ("M:Foo.Bar.FooBar(int*, System.Drawing.Imaging&)");
- AssertValidUrl ("M:Atk.NoOpObject.GetRunAttributes(int,int&,int&)");
- }
-
- [Test]
- public void MethodWithJaggedArrayArgsValidTest ()
- {
- AssertValidUrl ("M:System.Reflection.Emit.SignatureHelper.GetPropertySigHelper(System.Reflection.Module,System.Reflection.CallingConventions,Type,Type[],Type[],Type[],Type[][],Type[][])");
- }
-
- [Test]
- public void MethodWithInnerTypeValidTest ()
- {
- AssertValidUrl ("M:System.TimeZoneInfo+AdjustmentRule.CreateAdjustmentRule");
- }
-
- [Test]
- public void FieldValidTest ()
- {
- AssertValidUrl ("F:Mono.Terminal.Curses.KeyF10");
- AssertValidUrl ("F:Novell.Directory.Ldap.Utilclass.ExceptionMessages.NOT_IMPLEMENTED");
- AssertValidUrl ("F:Novell.Directory.Ldap.LdapException.NOT_ALLOWED_ON_NONLEAF");
- }
-
- [Test]
- public void PropertyValidTest ()
- {
- AssertValidUrl ("P:System.Foo.Bar");
- AssertValidUrl ("P:System.ArraySegment<T>.Array");
- }
-
- [Test]
- public void IndexPropertyValidTest ()
- {
- AssertValidUrl ("P:System.ComponentModel.PropertyDescriptorCollection.Item(int)");
- AssertValidUrl ("P:System.ComponentModel.AttributeCollection.Item(Type)");
- AssertValidUrl ("P:System.Web.SessionState.HttpSessionStateContainer$System.Web.SessionState.IHttpSessionState.Item(System.Int32)");
- AssertValidUrl ("P:System.Collections.Specialized.BitVector32.Item(System.Collections.Specialized.BitVector32+Section)");
- }
-
- [Test]
- public void ExplicitMethodImplValidTest ()
- {
- AssertValidUrl ("M:Microsoft.Win32.RegistryKey$System.IDisposable.Dispose");
- }
-
- [Test]
- public void AspNetSafeUrlValidTest ()
- {
- AssertValidUrl ("M:MonoTouch.UIKit.UICollectionViewLayoutAttributes.CreateForCell{T}");
- }
-
- [Test]
- public void GenericTypeArgsIsNumericTest ()
- {
- var desc = parser.Parse ("T:System.Collections.Generic.Dictionary`2");
- Assert.IsTrue (desc.GenericTypeArgumentsIsNumeric);
- Assert.AreEqual (2, desc.GenericTypeArguments.Count);
- desc = parser.Parse ("T:System.Collections.Generic.Dictionary<TKey,TValue>");
- Assert.IsFalse (desc.GenericTypeArgumentsIsNumeric);
- }
-
- [Test]
- public void GenericTypeArgsNumericToStringTest ()
- {
- string stringCref = "T:System.Collections.Generic.Dictionary`2";
- var desc = parser.Parse (stringCref);
- Assert.IsTrue (desc.GenericTypeArgumentsIsNumeric);
- Assert.AreEqual (2, desc.GenericTypeArguments.Count);
- string generatedEcmaCref = desc.ToEcmaCref ();
- Assert.AreEqual (stringCref, generatedEcmaCref);
- }
-
- [Test]
- public void MetaEtcNodeTest ()
- {
- var ast = new EcmaDesc () { DescKind = EcmaDesc.Kind.Type,
- Namespace = "Foo.Bar",
- TypeName = "Type",
- Etc = '*' };
- AssertUrlDesc (ast, "T:Foo.Bar.Type/*");
- }
-
- [Test]
- public void MetaEtcWithInnerTypeTest ()
- {
- var ast = new EcmaDesc () { DescKind = EcmaDesc.Kind.Type,
- Namespace = "Novell.Directory.Ldap",
- TypeName = "Connection",
- NestedType = new EcmaDesc { DescKind = EcmaDesc.Kind.Type, TypeName = "ReaderThread" },
- Etc = '*' };
- AssertUrlDesc (ast, "T:Novell.Directory.Ldap.Connection+ReaderThread/*");
- }
-
- [Test]
- public void SimpleTypeUrlParseTest ()
- {
- var ast = new EcmaDesc () { DescKind = EcmaDesc.Kind.Type,
- TypeName = "String",
- Namespace = "System" };
- AssertUrlDesc (ast, "T:System.String");
- }
-
- [Test]
- public void TypeWithOneGenericUrlParseTest ()
- {
- var generics = new[] {
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = string.Empty,
- TypeName = "T"
- }
- };
- var ast = new EcmaDesc () { DescKind = EcmaDesc.Kind.Type,
- TypeName = "String",
- Namespace = "System",
- GenericTypeArguments = generics,
- };
-
- AssertUrlDesc (ast, "T:System.String<T>");
- }
-
- [Test]
- public void TypeWithOneGenericUrlParseTestUsingAspNetStyleUrl ()
- {
- var generics = new[] {
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = string.Empty,
- TypeName = "T"
- }
- };
- var ast = new EcmaDesc () { DescKind = EcmaDesc.Kind.Type,
- TypeName = "String",
- Namespace = "System",
- GenericTypeArguments = generics,
- };
-
- AssertUrlDesc (ast, "T:System.String{T}");
- }
-
- [Test]
- public void TypeWithNestedGenericUrlParseTest ()
- {
- var generics = new[] {
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "T",
- Namespace = string.Empty
- },
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System.Collections.Generic",
- TypeName = "List",
- GenericTypeArguments = new[] {
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "V",
- Namespace = string.Empty
- }
- }
- }
- };
- var ast = new EcmaDesc () { DescKind = EcmaDesc.Kind.Type,
- TypeName = "String",
- Namespace = "System",
- GenericTypeArguments = generics,
- };
-
- AssertUrlDesc (ast, "T:System.String<T, System.Collections.Generic.List<V>>");
- }
-
- [Test]
- public void SimpleMethodUrlParseTest ()
- {
- var ast = new EcmaDesc () { DescKind = EcmaDesc.Kind.Method,
- TypeName = "String",
- Namespace = "System",
- MemberName = "FooBar"
- };
- AssertUrlDesc (ast, "M:System.String.FooBar()");
- }
-
- [Test]
- public void MethodWithArgsUrlParseTest ()
- {
- var args = new[] {
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System",
- TypeName = "String"
- },
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "Int32",
- Namespace = string.Empty
- }
- };
- var ast = new EcmaDesc () { DescKind = EcmaDesc.Kind.Method,
- TypeName = "String",
- Namespace = "System",
- MemberName = "FooBar",
- MemberArguments = args
- };
- AssertUrlDesc (ast, "M:System.String.FooBar(System.String, Int32)");
- }
-
- [Test]
- public void MethodWithArgsAndGenericsUrlParseTest ()
- {
- var args = new[] {
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System",
- TypeName = "String"
- },
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System.Collections.Generic",
- TypeName = "Dictionary",
- GenericTypeArguments = new[] {
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "K",
- Namespace = string.Empty
- },
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "V",
- Namespace = string.Empty
- }
- }
- }
- };
-
- var generics = new[] {
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "Action",
- Namespace = string.Empty,
- GenericTypeArguments = new[] {
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System",
- TypeName = "Single",
- },
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "int",
- Namespace = string.Empty
- },
- }
- }
- };
-
- var ast = new EcmaDesc () { DescKind = EcmaDesc.Kind.Method,
- TypeName = "String",
- Namespace = "System",
- MemberName = "FooBar",
- MemberArguments = args,
- GenericMemberArguments = generics
- };
- AssertUrlDesc (ast, "M:System.String.FooBar<Action<System.Single, int>>(System.String, System.Collections.Generic.Dictionary<K, V>)");
- }
-
- [Test]
- public void ExplicitMethodImplementationParseTest ()
- {
- var inner = new EcmaDesc {
- MemberName = "Dispose",
- TypeName = "IDisposable",
- Namespace = "System"
- };
- var ast = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Method,
- TypeName = "RegistryKey",
- Namespace = "Microsoft.Win32",
- ExplicitImplMember = inner
- };
- AssertUrlDesc (ast, "M:Microsoft.Win32.RegistryKey$System.IDisposable.Dispose");
- }
-
- [Test]
- public void SimpleMethodWithNumberInType ()
- {
- var ast = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Method,
- TypeName = "ASN1",
- Namespace = "Mono.Security",
- MemberName = "Add"
- };
- AssertUrlDesc (ast, "M:Mono.Security.ASN1.Add");
- }
-
- [Test]
- public void JaggedArrayWithDimensions ()
- {
- var ast = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "Int32",
- Namespace = "System",
- ArrayDimensions = new int[] { 3, 1, 1 }
- };
- AssertUrlDesc (ast, "T:System.Int32[,,][][]");
- }
-
- [Test]
- public void ExplicitIndexerImplementation ()
- {
- var explicitImpl = new EcmaDesc {
- Namespace = "System.Web.SessionState",
- TypeName = "IHttpSessionState",
- MemberName = "Item",
- MemberArguments = new [] { new EcmaDesc { DescKind = EcmaDesc.Kind.Type, Namespace = "System", TypeName = "Int32" } },
- };
- var ast = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Property,
- TypeName = "HttpSessionStateContainer",
- Namespace = "System.Web.SessionState",
- ExplicitImplMember = explicitImpl,
- };
- AssertUrlDesc (ast, "P:System.Web.SessionState.HttpSessionStateContainer$System.Web.SessionState.IHttpSessionState.Item(System.Int32)");
- }
-
- [Test]
- public void ToEcmaCref_Namespace ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Namespace,
- Namespace = "System.IO",
- };
-
- AssertEcmaString ("N:System.IO", actual);
- }
-
- [Test]
- public void ToEcmaCref_SimpleType ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System.IO",
- TypeName = "Path",
- };
-
- AssertEcmaString ("T:System.IO.Path", actual);
- }
-
- [Test]
- public void ToEcmaCref_NestedType ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System.IO",
- TypeName = "Path",
- NestedType = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "TheNestedType",
- },
- };
-
- AssertEcmaString ("T:System.IO.Path+TheNestedType", actual);
- }
-
- [Test]
- public void ToEcmaCref_NestedType_FourDeep ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "Mono",
- TypeName = "DocTest",
- NestedType = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "NestedClass",
- NestedType = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "Double",
- NestedType = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "Triple",
- NestedType = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "Quadruple",
- },
- },
- },
- },
- };
-
- string targetUrl = "T:Mono.DocTest+NestedClass+Double+Triple+Quadruple";
- AssertEcmaString (targetUrl, actual);
- AssertUrlDesc (actual, targetUrl);
- }
-
- [Test]
- public void ToEcmaCref_NestedType_Field ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Field,
- Namespace = "System.IO",
- TypeName = "Path",
- NestedType = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "TheNestedType",
- },
- MemberName = "NestedField"
- };
-
- AssertEcmaString ("F:System.IO.Path+TheNestedType.NestedField", actual);
- }
-
- [Test]
- public void ToEcmaCref_SimpleType_WithGenerics ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System.IO",
- TypeName = "Path",
- GenericTypeArguments = GenericTypeArgumentsList ("K").ToArray ()
- };
-
- AssertEcmaString ("T:System.IO.Path<K>", actual);
- }
-
- [Test]
- public void ToEcmaCref_Nestedype_WithGenerics ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System.IO",
- TypeName = "Path",
- NestedType = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "TheNestedType",
- },
- GenericTypeArguments = GenericTypeArgumentsList ("K").ToArray ()
- };
-
- AssertEcmaString ("T:System.IO.Path<K>+TheNestedType", actual);
- }
-
- [Test]
- public void ToEcmaCref_Nestedype_WithGenericsOnBoth ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System.IO",
- TypeName = "Path",
- NestedType = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "TheNestedType",
- GenericTypeArguments = GenericTypeArgumentsList ("T", "V").ToArray (),
- },
- GenericTypeArguments = GenericTypeArgumentsList ("K").ToArray ()
- };
-
- AssertEcmaString ("T:System.IO.Path<K>+TheNestedType<T,V>", actual);
- }
-
- [Test]
- public void ToEcmaCref_Nestedype_Property_WithGenericsOnBoth ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Property,
- Namespace = "System.IO",
- TypeName = "Path",
- NestedType = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- TypeName = "TheNestedType",
- GenericTypeArguments = GenericTypeArgumentsList ("T", "V").ToArray (),
- },
- GenericTypeArguments = GenericTypeArgumentsList ("K").ToArray (),
- MemberName = "TheProperty"
- };
-
- AssertEcmaString ("P:System.IO.Path<K>+TheNestedType<T,V>.TheProperty", actual);
- }
-
- [Test]
- public void ToEcmaCref_Field ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Field,
- Namespace = "System.IO",
- TypeName = "Path",
- MemberName = "TheField"
- };
-
- AssertEcmaString ("F:System.IO.Path.TheField", actual);
- }
-
- [Test]
- public void ToEcmaCref_ExplicitlyImplemented_Field ()
- {
- var explicitImpl = new EcmaDesc {
- Namespace = "System.Web.SessionState",
- TypeName = "IHttpSessionState",
- MemberName = "Item",
- };
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Field,
- TypeName = "HttpSessionStateContainer",
- Namespace = "System.Web.SessionState",
- ExplicitImplMember = explicitImpl,
- };
- AssertEcmaString ("F:System.Web.SessionState.HttpSessionStateContainer$System.Web.SessionState.IHttpSessionState.Item", actual);
- }
-
- [Test]
- public void ToEcmaCref_Property ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Property,
- Namespace = "System.IO",
- TypeName = "Path",
- MemberName = "TheProperty",
- };
-
- AssertEcmaString ("P:System.IO.Path.TheProperty", actual);
- }
-
- [Test]
- public void ToEcmaCref_ExplicitlyImplemented_Property ()
- {
- var explicitImpl = new EcmaDesc {
- Namespace = "System.Web.SessionState",
- TypeName = "IHttpSessionState",
- MemberName = "Item",
- };
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Property,
- TypeName = "HttpSessionStateContainer",
- Namespace = "System.Web.SessionState",
- ExplicitImplMember = explicitImpl,
- };
- AssertEcmaString ("P:System.Web.SessionState.HttpSessionStateContainer$System.Web.SessionState.IHttpSessionState.Item", actual);
- }
-
- [Test]
- public void ToEcmaCref_ExplicitlyImplemented_Method ()
- {
- var explicitImpl = new EcmaDesc {
- Namespace = "System.Web.SessionState",
- TypeName = "IHttpSessionState",
- MemberName = "Item",
- MemberArguments = new [] {
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System",
- TypeName = "Int32",
- },
- },
- };
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Method,
- TypeName = "HttpSessionStateContainer",
- Namespace = "System.Web.SessionState",
- ExplicitImplMember = explicitImpl,
- };
- AssertEcmaString ("M:System.Web.SessionState.HttpSessionStateContainer$System.Web.SessionState.IHttpSessionState.Item(System.Int32)", actual);
- }
-
- [Test]
- public void ToEcmaCref_Event ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Event,
- Namespace = "System.IO",
- TypeName = "Path",
- MemberName = "TheEvent",
- };
-
- AssertEcmaString ("E:System.IO.Path.TheEvent", actual);
- }
-
- [Test]
- public void ToEcmaCref_Operator ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Operator,
- Namespace = "System",
- TypeName = "Int32",
- MemberName = "Addition",
- };
-
- AssertEcmaString ("O:System.Int32.Addition", actual);
- }
-
- [Test]
- public void ToEcmaCref_Operator_Conversion ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Operator,
- Namespace = "System",
- TypeName = "Int32",
- MemberName = "ExplicitConversion",
- MemberArguments = new [] {
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System",
- TypeName = "Double",
- },
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System",
- TypeName = "Int32",
- }
- },
- };
-
- AssertEcmaString ("O:System.Int32.ExplicitConversion(System.Double,System.Int32)", actual);
- }
-
- [Test]
- public void ToEcmaCref_Method ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Method,
- Namespace = "System",
- TypeName = "Int32",
- MemberName = "Add"
- };
-
- AssertEcmaString ("M:System.Int32.Add", actual);
- }
-
- [Test]
- public void ToEcmaCref_Method_Parameters ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Method,
- Namespace = "System",
- TypeName = "Int32",
- MemberName = "Add",
- MemberArguments = new [] {
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System",
- TypeName = "Double",
- },
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "System",
- TypeName = "Int32",
- },
- },
- };
-
- AssertEcmaString ("M:System.Int32.Add(System.Double,System.Int32)", actual);
- }
-
- [Test]
- public void ToEcmaCref_Method_Generics ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Method,
- Namespace = "System",
- TypeName = "Int32",
- MemberName = "Add",
- GenericMemberArguments = GenericTypeArgumentsList ("T", "K").ToArray (),
- };
-
- AssertEcmaString ("M:System.Int32.Add<T,K>", actual);
- }
-
- [Test]
- public void ToEcmaCref_Method_Generics_PlusParameters ()
- {
- var actual = new EcmaDesc {
- DescKind = EcmaDesc.Kind.Method,
- Namespace = "System",
- TypeName = "Int32",
- MemberName = "Add",
- GenericMemberArguments = GenericTypeArgumentsList ("T", "K").ToArray (),
- MemberArguments = new [] {
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "",
- TypeName = "T",
- },
- new EcmaDesc {
- DescKind = EcmaDesc.Kind.Type,
- Namespace = "",
- TypeName = "K",
- },
- },
- };
-
- AssertEcmaString ("M:System.Int32.Add<T,K>(T,K)", actual);
- }
- }
-}
diff --git a/mcs/class/monodoc/Test/Monodoc.Generators/RawGeneratorTests.cs b/mcs/class/monodoc/Test/Monodoc.Generators/RawGeneratorTests.cs
deleted file mode 100644
index fa3ffe15ac5..00000000000
--- a/mcs/class/monodoc/Test/Monodoc.Generators/RawGeneratorTests.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Xml;
-using System.Collections.Generic;
-
-using NUnit.Framework;
-
-using Monodoc;
-using Monodoc.Generators;
-
-namespace MonoTests.Monodoc.Generators
-{
- [TestFixture]
- public class RawGeneratorTests
- {
- const string BaseDir = "../../class/monodoc/Test/monodoc_test/";
- RootTree rootTree;
- RawGenerator generator = new RawGenerator ();
-
- [SetUp]
- public void Setup ()
- {
- rootTree = RootTree.LoadTree (Path.GetFullPath (BaseDir), false);
- }
-
- void AssertValidXml (string xml)
- {
- var reader = XmlReader.Create (new StringReader (xml));
- try {
- while (reader.Read ());
- } catch (Exception e) {
- Console.WriteLine (e.ToString ());
- Assert.Fail (e.Message);
- }
- }
-
- void AssertEcmaFullTypeName (string xml, string fullTypeName)
- {
- var reader = XmlReader.Create (new StringReader (xml));
- Assert.IsTrue (reader.ReadToFollowing ("Type"));
- Assert.AreEqual (fullTypeName, reader.GetAttribute ("FullName"));
- }
-
- [Test]
- public void TestSimpleEcmaXml ()
- {
- var xml = rootTree.RenderUrl ("T:System.String", generator);
- Assert.IsNotNull (xml);
- AssertHelper.IsNotEmpty (xml);
- AssertValidXml (xml);
- AssertEcmaFullTypeName (xml, "System.String");
- }
-
- [Test]
- public void TestSimpleEcmaXml2 ()
- {
- var xml = rootTree.RenderUrl ("T:System.Int32", generator);
- Assert.IsNotNull (xml);
- AssertHelper.IsNotEmpty (xml);
- AssertValidXml (xml);
- AssertEcmaFullTypeName (xml, "System.Int32");
- }
- }
-}
diff --git a/mcs/class/monodoc/Test/Monodoc/EcmaDocTests.cs b/mcs/class/monodoc/Test/Monodoc/EcmaDocTests.cs
deleted file mode 100644
index 9886846ed4d..00000000000
--- a/mcs/class/monodoc/Test/Monodoc/EcmaDocTests.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Collections.Generic;
-
-using NUnit.Framework;
-
-using Monodoc;
-using Monodoc.Generators;
-
-namespace MonoTests.Monodoc
-{
- [TestFixture]
- public class EcmaDocTest
- {
- // Because EcmaDoc is internal and we can't use InternalsVisibleTo since test assemblies aren't
- // signed/strong-named by the build, we have to resort to reflection
- TDelegate GetTestedMethod<TDelegate> (string methodName)
- {
- var ecmaDoc = Type.GetType ("Monodoc.Providers.EcmaDoc, monodoc, PublicKey=0738eb9f132ed756");
- return (TDelegate)(object)Delegate.CreateDelegate (typeof (TDelegate), ecmaDoc.GetMethod (methodName));
- }
-
- [Test]
- public void CountTypeGenericArgumentsTest ()
- {
- var realCountTypeGenericArguments = GetTestedMethod<Func<string, int, int>> ("CountTypeGenericArguments");
- // Since we don't use the optional start index parameters, bypass it by wrapping the func
- Func<string, int> countTypeGenericArguments = s => realCountTypeGenericArguments (s, 0);
-
- Assert.AreEqual (0, countTypeGenericArguments ("T:System.String"), "#0a");
- Assert.AreEqual (0, countTypeGenericArguments ("T:String"), "#0b");
- Assert.AreEqual (0, countTypeGenericArguments ("String"), "#0c");
-
- Assert.AreEqual (1, countTypeGenericArguments ("T:System.Collections.Foo<T>"), "#1a");
- Assert.AreEqual (1, countTypeGenericArguments ("T:System.Foo<T>"), "#1b");
- Assert.AreEqual (1, countTypeGenericArguments ("T:Foo<T>"), "#1c");
- Assert.AreEqual (1, countTypeGenericArguments ("Foo<T>"), "#1d");
-
- Assert.AreEqual (2, countTypeGenericArguments ("T:System.Collections.Foo<T, U>"), "#2a");
- Assert.AreEqual (2, countTypeGenericArguments ("T:System.Foo<TKey, TValue>"), "#2b");
- Assert.AreEqual (2, countTypeGenericArguments ("T:Foo<Something,Else>"), "#2c");
- Assert.AreEqual (2, countTypeGenericArguments ("Foo<TDelegate,TArray>"), "#2d");
-
- Assert.AreEqual (3, countTypeGenericArguments ("T:System.Collections.Foo<T, U, V>"), "#3a");
- Assert.AreEqual (3, countTypeGenericArguments ("T:System.Foo<TKey, TValue, THash>"), "#3b");
- Assert.AreEqual (3, countTypeGenericArguments ("T:Foo<Something,Else,Really>"), "#3c");
- Assert.AreEqual (3, countTypeGenericArguments ("Foo<TDelegate,TArray,TEvent>"), "#3d");
- }
-
- [Test]
- public void CountTypeGenericArgumentsTest_Nested ()
- {
- var realCountTypeGenericArguments = GetTestedMethod<Func<string, int, int>> ("CountTypeGenericArguments");
- // Since we don't use the optional start index parameters, bypass it by wrapping the func
- Func<string, int> countTypeGenericArguments = s => realCountTypeGenericArguments (s, 0);
-
- Assert.AreEqual (1, countTypeGenericArguments ("T:System.Collections.Foo<T[]>"), "#1a");
- Assert.AreEqual (1, countTypeGenericArguments ("T:System.Collections.Foo<IList<T>>"), "#1b");
- Assert.AreEqual (2, countTypeGenericArguments ("T:System.Collections.Foo<T, KeyValuePair<T, U>>"), "#2a");
- Assert.AreEqual (2, countTypeGenericArguments ("T:System.Collections.Foo<T, KeyValuePair<IProducerConsumerCollection<U>, IEquatable<V>>>"), "#2b");
- Assert.AreEqual (3, countTypeGenericArguments ("T:System.Collections.Foo<T, IProducerConsumerCollection<U>, IEquatable<V>>"), "#3a");
- }
- }
-}
diff --git a/mcs/class/monodoc/Test/Monodoc/HelpSourceTests.cs b/mcs/class/monodoc/Test/Monodoc/HelpSourceTests.cs
deleted file mode 100644
index 29da7513704..00000000000
--- a/mcs/class/monodoc/Test/Monodoc/HelpSourceTests.cs
+++ /dev/null
@@ -1,227 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Collections.Generic;
-
-using NUnit.Framework;
-
-using Monodoc;
-using Monodoc.Generators;
-using Monodoc.Providers;
-
-// Used by ReachabilityWithCrefsTest
-// using HtmlAgilityPack;
-
-namespace MonoTests.Monodoc
-{
- [TestFixture]
- public class HelpSourceTest
- {
- const string BaseDir = "../../class/monodoc/Test/monodoc_test/";
-
- class CheckGenerator : IDocGenerator<bool>
- {
- public string LastCheckMessage { get; set; }
-
- public bool Generate (HelpSource hs, string id, Dictionary<string, string> context)
- {
- LastCheckMessage = string.Format ("#1 : {0} {1}", hs, id);
- if (hs == null || string.IsNullOrEmpty (id))
- return false;
-
- // Stripe the arguments parts since we don't need it
- var argIdx = id.LastIndexOf ('?');
- if (argIdx != -1)
- id = id.Substring (0, argIdx);
-
- LastCheckMessage = string.Format ("#2 : {0} {1}", hs, id);
- if (hs.IsRawContent (id))
- return hs.GetText (id) != null;
-
- IEnumerable<string> parts;
- if (hs.IsMultiPart (id, out parts)) {
- LastCheckMessage = string.Format ("#4 : {0} {1} ({2})", hs, id, string.Join (", ", parts));
- foreach (var partId in parts)
- if (!Generate (hs, partId, context))
- return false;
- }
-
- LastCheckMessage = string.Format ("#3 : {0} {1}", hs, id);
- if (hs.IsGeneratedContent (id))
- return hs.GetCachedText (id) != null;
- else {
- var s = hs.GetCachedHelpStream (id);
- if (s != null) {
- s.Close ();
- return true;
- } else {
- return false;
- }
- }
- }
- }
-
- /* This test verifies that for every node in our tree that possed a PublicUrl,
- * we can correctly access it back through RenderUrl
- */
- [Test]
- public void ReachabilityTest ()
- {
- var rootTree = RootTree.LoadTree (Path.GetFullPath (BaseDir), false);
- Node result;
- var generator = new CheckGenerator ();
- int errorCount = 0;
- int testCount = 0;
-
- foreach (var leaf in GetLeaves (rootTree.RootNode)) {
- if (!rootTree.RenderUrl (leaf.PublicUrl, generator, out result) || leaf != result) {
- Console.WriteLine ("Error: {0} with HelpSource {1} ", leaf.PublicUrl, leaf.Tree.HelpSource.Name);
- errorCount++;
- }
- testCount++;
- }
-
- //Assert.AreEqual (0, errorCount, errorCount + " / " + testCount.ToString ());
-
- // HACK: in reality we have currently 4 known issues which are due to duplicated namespaces across
- // doc sources, something that was never supported and that we need to improve/fix at some stage
- AssertHelper.LessOrEqual (4, errorCount, errorCount + " / " + testCount.ToString ());
- }
-
- IEnumerable<Node> GetLeaves (Node node)
- {
- if (node == null)
- yield break;
-
- if (node.IsLeaf)
- yield return node;
- else {
- foreach (var child in node.ChildNodes) {
- if (!string.IsNullOrEmpty (child.Element) && !child.Element.StartsWith ("root:/"))
- yield return child;
- foreach (var childLeaf in GetLeaves (child))
- yield return childLeaf;
- }
- }
- }
-
- [Test]
- public void ReachabilityWithShortGenericNotationTest ()
- {
- var rootTree = RootTree.LoadTree (Path.GetFullPath (BaseDir), false);
- Node result;
- var generator = new CheckGenerator ();
-
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Collections.Concurrent.IProducerConsumerCollection`1", generator, out result), "#1");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Collections.Generic.Dictionary`2", generator, out result), "#2");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Action`4", generator, out result), "#3");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.EventHandler`1", generator, out result), "#4");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Func`5", generator, out result), "#5a");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Func`4", generator, out result), "#5b");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Func`6", generator, out result), "#5c");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Func`7", generator, out result), "#5d");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Func`3", generator, out result), "#5e");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Func`2", generator, out result), "#5f");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Func`1", generator, out result), "#5g");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Func`8", generator, out result), "#5h");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Func`9", generator, out result), "#5i");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Action`3", generator, out result), "#6a");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Action`2", generator, out result), "#6b");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Action`4", generator, out result), "#6c");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.IComparable`1", generator, out result), "#7");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Lazy`1", generator, out result), "#8");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Tuple`1", generator, out result), "#9a");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Tuple`2", generator, out result), "#9b");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Tuple`3", generator, out result), "#9c");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Tuple`4", generator, out result), "#9d");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Collections.Generic.Dictionary`2+ValueCollection", generator, out result), "#10");
- Assert.IsFalse (rootTree.RenderUrl ("T:System.EventHandler`2", generator, out result), "#11");
- Assert.IsFalse (rootTree.RenderUrl ("T:System.Lazy`2", generator, out result), "#12");
- }
-
- [Test]
- public void AspNetStyleUrlReachabilityTest ()
- {
- var rootTree = RootTree.LoadTree (Path.GetFullPath (BaseDir), false);
- Node result;
- var generator = new CheckGenerator ();
-
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Collections.Generic.Dictionary{TKey,TValue}", generator, out result), "#1");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Action{T1,T2}", generator, out result), "#2");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.EventHandler{TEventArgs}", generator, out result), "#3");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Func{T1,T2,T3,TResult}", generator, out result), "#4");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.Collections.Generic.Dictionary{TKey,TValue}+ValueCollection", generator, out result), "#5");
- Assert.IsTrue (rootTree.RenderUrl ("T:System.IComparable{T}", generator, out result), "#6");
- }
-
- [Test]
- public void PublicUrlOnUnattachedHelpSourceRoot ()
- {
- // Unattached help source have no root:/ URL attributed
- var hs = new EcmaHelpSource (Path.Combine (BaseDir, "sources", "netdocs"), false);
- var rootTree = RootTree.LoadTree (Path.GetFullPath (BaseDir), false);
- hs.RootTree = rootTree;
- Assert.IsNull (hs.Tree.RootNode.PublicUrl);
- var nsChildUrl = hs.Tree.RootNode.ChildNodes.First ().PublicUrl;
- Assert.IsNotNull (nsChildUrl);
- StringAssert.StartsWith ("N:", nsChildUrl);
- // Verify GetNodeTypeParent
- var typeNode = hs.Tree.RootNode.ChildNodes.First ().ChildNodes.First ();
- var metaNode = typeNode.ChildNodes.First (cn => cn.Element == "M");
- StringAssert.StartsWith (typeNode.PublicUrl, metaNode.PublicUrl);
- }
-
- /*
- [Test, Ignore ("Mono documentation is full of syntax errors so we can't use it reliably for this test")]
- public void ReachabilityWithCrefsTest ()
- {
- var rootTree = RootTree.LoadTree (Path.GetFullPath (BaseDir), false);
- Node result;
- var htmlGenerator = new HtmlGenerator (null);
- var crefs = new HashSet<string> ();
- var generator = new CheckGenerator ();
- int errorCount = 0;
-
- foreach (var leaf in GetLeaves (rootTree.RootNode)) {
- Dictionary<string, string> context;
- string internalId = leaf.Tree.HelpSource.GetInternalIdForUrl (leaf.PublicUrl, out result, out context);
- if (leaf.Tree.HelpSource.GetDocumentTypeForId (internalId) != DocumentType.EcmaXml)
- continue;
-
- string content = null;
- if (string.IsNullOrEmpty (content = rootTree.RenderUrl (leaf.PublicUrl, htmlGenerator, out result)) || leaf != result) {
- Console.WriteLine ("Error: {0} with HelpSource {1} ", leaf.PublicUrl, leaf.Tree.HelpSource.Name);
- continue;
- }
-
- HtmlDocument doc = new HtmlDocument();
- try {
- doc.LoadHtml (content);
- } catch {
- Console.WriteLine ("Couldn't load a HTML document for URL {0}", leaf.PublicUrl);
- continue;
- }
-
- foreach (HtmlNode link in doc.DocumentNode.SelectNodes("//a[@href]")) {
- var newUrl = link.Attributes["href"].Value;
- var hashIndex = newUrl.IndexOf ('#');
- if (hashIndex != -1)
- newUrl = newUrl.Substring (0, hashIndex);
- if (newUrl.Length > 1 && newUrl[1] == ':' && char.IsLetter (newUrl, 0) && char.ToLowerInvariant (newUrl[0]) != 'c')
- crefs.Add (newUrl);
- }
-
- foreach (var cref in crefs) {
- if (!rootTree.RenderUrl (cref, generator, out result) || result == null) {
- Console.WriteLine ("Error with cref: `{0}'", cref);
- errorCount++;
- }
- }
-
- crefs.Clear ();
- }
-
- Assert.AreEqual (0, errorCount, errorCount + " / " + crefs.Count);
- }*/
- }
-}
diff --git a/mcs/class/monodoc/Test/Monodoc/NodeTest.cs b/mcs/class/monodoc/Test/Monodoc/NodeTest.cs
deleted file mode 100644
index d7640da95be..00000000000
--- a/mcs/class/monodoc/Test/Monodoc/NodeTest.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Collections.Generic;
-
-using NUnit.Framework;
-
-using Monodoc;
-
-namespace MonoTests.Monodoc
-{
- [TestFixture]
- public class NodeTest
- {
- const string BaseDir = "../../class/monodoc/Test/monodoc_test/";
-
- [Test]
- public void LegacyNodesTest_30 ()
- {
- TestLegacyNodesSameAsChildNodes ("tree-from-3-0.tree");
- }
-
- [Test]
- public void LegacyNodesTest_210 ()
- {
- TestLegacyNodesSameAsChildNodes ("tree-from-2-10.tree");
- }
-
- [Test]
- public void LegacyNodesTest_30old ()
- {
- TestLegacyNodesSameAsChildNodes ("tree-from-3-0-old.tree");
- }
-
- void TestLegacyNodesSameAsChildNodes (string treeFileName)
- {
- var filePath = Path.Combine (BaseDir, "trees", treeFileName);
- var tree = new Tree (null, filePath);
- CollectionAssert.AreEqual (tree.RootNode.ChildNodes, tree.RootNode.Nodes);
- }
- }
-}
diff --git a/mcs/class/monodoc/Test/Monodoc/RootTreeTest.cs b/mcs/class/monodoc/Test/Monodoc/RootTreeTest.cs
deleted file mode 100644
index ea751e321a6..00000000000
--- a/mcs/class/monodoc/Test/Monodoc/RootTreeTest.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Collections.Generic;
-
-using NUnit.Framework;
-
-using Monodoc;
-using Monodoc.Generators;
-
-namespace MonoTests.Monodoc
-{
- [TestFixture]
- public class RootTreeTest
- {
- const string BaseDir = "../../class/monodoc/Test/monodoc_test/";
-
- RootTree root;
- HtmlGenerator generator;
-
- [SetUp]
- public void Setup ()
- {
- root = RootTree.LoadTree (BaseDir, includeExternal: false);
- generator = new HtmlGenerator (defaultCache: null);
- }
-
- [Test]
- public void RootTreePageTest ()
- {
- var content = root.RenderUrl ("root:", generator);
- Assert.IsNotNull (content);
- StringAssert.Contains ("The following documentation collections are available:", content);
- }
-
- IEnumerable<Node> GetNodesWithSummaries (Node baseNode)
- {
- return baseNode.ChildNodes.Where (n => n.Element.StartsWith ("root:/")).SelectMany (n => new[] { n }.Concat (GetNodesWithSummaries (n)));
- }
-
- [Test]
- public void HelpSourceSummariesTest ()
- {
- foreach (var node in GetNodesWithSummaries (root.RootNode)) {
- var content = root.RenderUrl (node.Element, generator);
- Assert.IsNotNull (content, "#1 - " + node.Element);
- if (node.ChildNodes.All (n => n.Element.StartsWith ("root:/")))
- StringAssert.Contains ("This node doesn't have a summary available", content, "#2a - " + node.Element);
- else {
- Assert.IsFalse (content.Contains ("<em>Error:</em>"), "#2b - " + node.Element);
- Assert.IsFalse (content.Contains ("This node doesn't have a summary available"), "#3b - " + node.Element);
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/monodoc/Test/Monodoc/SettingsTest.cs b/mcs/class/monodoc/Test/Monodoc/SettingsTest.cs
deleted file mode 100644
index fc6bf8da18a..00000000000
--- a/mcs/class/monodoc/Test/Monodoc/SettingsTest.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Collections.Generic;
-
-using NUnit.Framework;
-
-using Monodoc;
-
-namespace MonoTests.Monodoc
-{
- [TestFixture]
- public class SettingsTest
- {
- [Test]
- public void DocPathConfigTest ()
- {
- // the docPath variable is the only one we know for sure should exist
- Assert.IsNotNull (Config.Get ("docPath"));
- AssertHelper.IsNotEmpty (Config.Get ("docPath"));
- }
- }
-}
diff --git a/mcs/class/monodoc/Test/Monodoc/TreeTest.cs b/mcs/class/monodoc/Test/Monodoc/TreeTest.cs
deleted file mode 100644
index e386e4745e3..00000000000
--- a/mcs/class/monodoc/Test/Monodoc/TreeTest.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Collections.Generic;
-
-using NUnit.Framework;
-
-using Monodoc;
-
-namespace MonoTests.Monodoc
-{
- [TestFixture]
- public class TreeTest
- {
- const string BaseDir = "../../class/monodoc/Test/monodoc_test/";
-
- [Test]
- public void TestLoadingTree_2_10 ()
- {
- TestTreeLoading ("tree-from-2-10.tree", 0, 2);
- }
-
- [Test]
- public void TestLoadingTree_3_0_old ()
- {
- TestTreeLoading ("tree-from-3-0-old.tree", 1, 2);
- }
-
- [Test]
- public void TestLoadingTree_3_0 ()
- {
- TestTreeLoading ("tree-from-3-0.tree", 1, 2);
- }
-
- void TestTreeLoading (string treeFileName, int expectedVersion, int expectedNodeCount)
- {
- var filePath = Path.Combine (BaseDir, "trees", treeFileName);
- var tree = new Tree (null, filePath);
- Assert.AreEqual (expectedVersion, tree.VersionNumber);
- Assert.IsNotNull (tree.RootNode);
- Assert.AreEqual (expectedNodeCount, tree.RootNode.ChildNodes.Count);
- }
- }
-}
diff --git a/mcs/class/monodoc/Test/monodoc_test/.gitignore b/mcs/class/monodoc/Test/monodoc_test/.gitignore
deleted file mode 100644
index f848d915dee..00000000000
--- a/mcs/class/monodoc/Test/monodoc_test/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/sources
diff --git a/mcs/class/monodoc/Test/monodoc_test/monodoc.xml b/mcs/class/monodoc/Test/monodoc_test/monodoc.xml
deleted file mode 100644
index 94a4b222e80..00000000000
--- a/mcs/class/monodoc/Test/monodoc_test/monodoc.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<node label="Mono Documentation" name="libraries">
- <node label="Commands and Files" name="man" />
- <node label="Languages" name="languages" />
- <node label="Tools" name="tools" />
- <node label="Various" name="various" />
-</node>
diff --git a/mcs/class/monodoc/Test/monodoc_test/trees/tree-from-2-10.tree b/mcs/class/monodoc/Test/monodoc_test/trees/tree-from-2-10.tree
deleted file mode 100644
index c4bf5f636f0..00000000000
--- a/mcs/class/monodoc/Test/monodoc_test/trees/tree-from-2-10.tree
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Test/monodoc_test/trees/tree-from-3-0-old.tree b/mcs/class/monodoc/Test/monodoc_test/trees/tree-from-3-0-old.tree
deleted file mode 100644
index 163d4d1842b..00000000000
--- a/mcs/class/monodoc/Test/monodoc_test/trees/tree-from-3-0-old.tree
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/Test/monodoc_test/trees/tree-from-3-0.tree b/mcs/class/monodoc/Test/monodoc_test/trees/tree-from-3-0.tree
deleted file mode 100644
index 1fda6ef0417..00000000000
--- a/mcs/class/monodoc/Test/monodoc_test/trees/tree-from-3-0.tree
+++ /dev/null
Binary files differ
diff --git a/mcs/class/monodoc/jay.sh b/mcs/class/monodoc/jay.sh
deleted file mode 100755
index 6df0eb52992..00000000000
--- a/mcs/class/monodoc/jay.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-TOPDIR=$1
-INPUT=$2
-OUTPUT=$3
-FLAGS=$4
-
-TEMPFILE=`mktemp jay-tmp.XXXXXX` || exit 1
-
-$TOPDIR/jay/jay $FLAGS < $TOPDIR/jay/skeleton.cs $INPUT > $TEMPFILE && mv $TEMPFILE $OUTPUT
diff --git a/mcs/class/monodoc/monodoc.dll.sources b/mcs/class/monodoc/monodoc.dll.sources
index a4e89d0ed57..ca4a77f9d62 100644
--- a/mcs/class/monodoc/monodoc.dll.sources
+++ b/mcs/class/monodoc/monodoc.dll.sources
@@ -1,473 +1,478 @@
Assembly/AssemblyInfo.cs
-Monodoc/SearchableIndex.cs
-Monodoc/SearchableDocument.cs
-Monodoc/storage/ZipStorage.cs
-Monodoc/storage/NullStorage.cs
-Monodoc/storage/UncompiledDocStorage.cs
-Monodoc/providers/man-provider.cs
-Monodoc/providers/ecmaspec-provider.cs
-Monodoc/providers/error-provider.cs
-Monodoc/providers/xhtml-provider.cs
-Monodoc/providers/ecma-provider.cs
-Monodoc/providers/addins-provider.cs
-Monodoc/providers/ecmauncompiled-provider.cs
-Monodoc/providers/EcmaDoc.cs
-Monodoc/HelpSource.cs
-Monodoc/HelpSource_Legacy.cs
-Monodoc/Tree.cs
-Monodoc/Node.cs
-Monodoc/Node_Legacy.cs
-Monodoc/generator.cs
-Monodoc/caches/NullCache.cs
-Monodoc/caches/FileCache.cs
-Monodoc/storage.cs
-Monodoc/Provider.cs
-Monodoc/cache.cs
-Monodoc/index.cs
-Monodoc/settings.cs
-Monodoc/settings_Legacy.cs
-Monodoc/RootTree.cs
-Monodoc/RootTree_Legacy.cs
-Monodoc/TypeUtils.cs
-Monodoc/generators/html/Man2Html.cs
-Monodoc/generators/html/Toc2Html.cs
-Monodoc/generators/html/Ecmaspec2Html.cs
-Monodoc/generators/html/Error2Html.cs
-Monodoc/generators/html/MonoBook2Html.cs
-Monodoc/generators/html/Ecma2Html.cs
-Monodoc/generators/html/Addin2Html.cs
-Monodoc/generators/html/Idem.cs
-Monodoc/generators/HtmlGenerator.cs
-Monodoc/generators/RawGenerator.cs
-Mono.Utilities/colorizer.cs
-Mono.Utilities/LRUCache.cs
-Monodoc.Ecma/EcmaUrlParser.cs
-Monodoc.Ecma/EcmaUrlTokenizer.cs
-Monodoc.Ecma/EcmaDesc.cs
-Mono.Documentation/ManifestResourceResolver.cs
-Mono.Documentation/XmlDocUtils.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Analyzer.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/ASCIIFoldingFilter.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/BaseCharFilter.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/CachingTokenFilter.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/CharArraySet.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/CharFilter.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/CharReader.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/CharStream.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/CharTokenizer.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/ISOLatin1AccentFilter.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/KeywordAnalyzer.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/KeywordTokenizer.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/LengthFilter.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/LetterTokenizer.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/LowerCaseFilter.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/LowerCaseTokenizer.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/MappingCharFilter.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/NormalizeCharMap.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/NumericTokenStream.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/PerFieldAnalyzerWrapper.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/PorterStemFilter.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/PorterStemmer.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/SimpleAnalyzer.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Standard/StandardAnalyzer.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Standard/StandardFilter.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Standard/StandardTokenizer.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Standard/StandardTokenizerImpl.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/StopAnalyzer.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/StopFilter.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/TeeSinkTokenFilter.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Token.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/FlagsAttribute.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/IFlagsAttribute.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/IOffsetAttribute.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/IPayloadAttribute.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/IPositionIncrementAttribute.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/ITermAttribute.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/ITypeAttribute.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/OffsetAttribute.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/PayloadAttribute.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/PositionIncrementAttribute.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/TermAttribute.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/TypeAttribute.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/TokenFilter.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/Tokenizer.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/TokenStream.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/WhitespaceAnalyzer.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/WhitespaceTokenizer.cs
-../../../external/Lucene.Net.Light/src/core/Analysis/WordlistLoader.cs
-../../../external/Lucene.Net.Light/src/core/Document/AbstractField.cs
-../../../external/Lucene.Net.Light/src/core/Document/CompressionTools.cs
-../../../external/Lucene.Net.Light/src/core/Document/DateField.cs
-../../../external/Lucene.Net.Light/src/core/Document/DateTools.cs
-../../../external/Lucene.Net.Light/src/core/Document/Document.cs
-../../../external/Lucene.Net.Light/src/core/Document/Field.cs
-../../../external/Lucene.Net.Light/src/core/Document/Fieldable.cs
-../../../external/Lucene.Net.Light/src/core/Document/FieldSelector.cs
-../../../external/Lucene.Net.Light/src/core/Document/FieldSelectorResult.cs
-../../../external/Lucene.Net.Light/src/core/Document/LoadFirstFieldSelector.cs
-../../../external/Lucene.Net.Light/src/core/Document/MapFieldSelector.cs
-../../../external/Lucene.Net.Light/src/core/Document/NumberTools.cs
-../../../external/Lucene.Net.Light/src/core/Document/NumericField.cs
-../../../external/Lucene.Net.Light/src/core/Document/SetBasedFieldSelector.cs
-../../../external/Lucene.Net.Light/src/core/Index/AbstractAllTermDocs.cs
-../../../external/Lucene.Net.Light/src/core/Index/AllTermDocs.cs
-../../../external/Lucene.Net.Light/src/core/Index/BufferedDeletes.cs
-../../../external/Lucene.Net.Light/src/core/Index/ByteBlockPool.cs
-../../../external/Lucene.Net.Light/src/core/Index/ByteSliceReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/ByteSliceWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/CharBlockPool.cs
-../../../external/Lucene.Net.Light/src/core/Index/CheckIndex.cs
-../../../external/Lucene.Net.Light/src/core/Index/CompoundFileReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/CompoundFileWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/ConcurrentMergeScheduler.cs
-../../../external/Lucene.Net.Light/src/core/Index/CorruptIndexException.cs
-../../../external/Lucene.Net.Light/src/core/Index/DefaultSkipListReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/DefaultSkipListWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/DirectoryReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocConsumer.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocConsumerPerThread.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocFieldConsumer.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocFieldConsumerPerField.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocFieldConsumerPerThread.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocFieldConsumers.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocFieldConsumersPerField.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocFieldConsumersPerThread.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocFieldProcessor.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocFieldProcessorPerField.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocFieldProcessorPerThread.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocInverter.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocInverterPerField.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocInverterPerThread.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocumentsWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/DocumentsWriterThreadState.cs
-../../../external/Lucene.Net.Light/src/core/Index/FieldInfo.cs
-../../../external/Lucene.Net.Light/src/core/Index/FieldInfos.cs
-../../../external/Lucene.Net.Light/src/core/Index/FieldInvertState.cs
-../../../external/Lucene.Net.Light/src/core/Index/FieldReaderException.cs
-../../../external/Lucene.Net.Light/src/core/Index/FieldSortedTermVectorMapper.cs
-../../../external/Lucene.Net.Light/src/core/Index/FieldsReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/FieldsWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/FilterIndexReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsDocsConsumer.cs
-../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsDocsWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsFieldsConsumer.cs
-../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsFieldsWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsPositionsConsumer.cs
-../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsPositionsWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsTermsConsumer.cs
-../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsTermsWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/FreqProxFieldMergeState.cs
-../../../external/Lucene.Net.Light/src/core/Index/FreqProxTermsWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/FreqProxTermsWriterPerField.cs
-../../../external/Lucene.Net.Light/src/core/Index/FreqProxTermsWriterPerThread.cs
-../../../external/Lucene.Net.Light/src/core/Index/IndexCommit.cs
-../../../external/Lucene.Net.Light/src/core/Index/IndexDeletionPolicy.cs
-../../../external/Lucene.Net.Light/src/core/Index/IndexFileDeleter.cs
-../../../external/Lucene.Net.Light/src/core/Index/IndexFileNameFilter.cs
-../../../external/Lucene.Net.Light/src/core/Index/IndexFileNames.cs
-../../../external/Lucene.Net.Light/src/core/Index/IndexReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/IndexWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/IntBlockPool.cs
-../../../external/Lucene.Net.Light/src/core/Index/InvertedDocConsumer.cs
-../../../external/Lucene.Net.Light/src/core/Index/InvertedDocConsumerPerField.cs
-../../../external/Lucene.Net.Light/src/core/Index/InvertedDocConsumerPerThread.cs
-../../../external/Lucene.Net.Light/src/core/Index/InvertedDocEndConsumer.cs
-../../../external/Lucene.Net.Light/src/core/Index/InvertedDocEndConsumerPerField.cs
-../../../external/Lucene.Net.Light/src/core/Index/InvertedDocEndConsumerPerThread.cs
-../../../external/Lucene.Net.Light/src/core/Index/KeepOnlyLastCommitDeletionPolicy.cs
-../../../external/Lucene.Net.Light/src/core/Index/LogByteSizeMergePolicy.cs
-../../../external/Lucene.Net.Light/src/core/Index/LogDocMergePolicy.cs
-../../../external/Lucene.Net.Light/src/core/Index/LogMergePolicy.cs
-../../../external/Lucene.Net.Light/src/core/Index/MergeDocIDRemapper.cs
-../../../external/Lucene.Net.Light/src/core/Index/MergePolicy.cs
-../../../external/Lucene.Net.Light/src/core/Index/MergeScheduler.cs
-../../../external/Lucene.Net.Light/src/core/Index/MultiLevelSkipListReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/MultiLevelSkipListWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/MultipleTermPositions.cs
-../../../external/Lucene.Net.Light/src/core/Index/MultiReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/NormsWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/NormsWriterPerField.cs
-../../../external/Lucene.Net.Light/src/core/Index/NormsWriterPerThread.cs
-../../../external/Lucene.Net.Light/src/core/Index/ParallelReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/Payload.cs
-../../../external/Lucene.Net.Light/src/core/Index/PositionBasedTermVectorMapper.cs
-../../../external/Lucene.Net.Light/src/core/Index/RawPostingList.cs
-../../../external/Lucene.Net.Light/src/core/Index/ReadOnlyDirectoryReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/ReadOnlySegmentReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/ReusableStringReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/SegmentInfo.cs
-../../../external/Lucene.Net.Light/src/core/Index/SegmentInfos.cs
-../../../external/Lucene.Net.Light/src/core/Index/SegmentMergeInfo.cs
-../../../external/Lucene.Net.Light/src/core/Index/SegmentMergeQueue.cs
-../../../external/Lucene.Net.Light/src/core/Index/SegmentMerger.cs
-../../../external/Lucene.Net.Light/src/core/Index/SegmentReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/SegmentTermDocs.cs
-../../../external/Lucene.Net.Light/src/core/Index/SegmentTermEnum.cs
-../../../external/Lucene.Net.Light/src/core/Index/SegmentTermPositions.cs
-../../../external/Lucene.Net.Light/src/core/Index/SegmentTermPositionVector.cs
-../../../external/Lucene.Net.Light/src/core/Index/SegmentTermVector.cs
-../../../external/Lucene.Net.Light/src/core/Index/SegmentWriteState.cs
-../../../external/Lucene.Net.Light/src/core/Index/SerialMergeScheduler.cs
-../../../external/Lucene.Net.Light/src/core/Index/SnapshotDeletionPolicy.cs
-../../../external/Lucene.Net.Light/src/core/Index/SortedTermVectorMapper.cs
-../../../external/Lucene.Net.Light/src/core/Index/StaleReaderException.cs
-../../../external/Lucene.Net.Light/src/core/Index/StoredFieldsWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/StoredFieldsWriterPerThread.cs
-../../../external/Lucene.Net.Light/src/core/Index/Term.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermBuffer.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermDocs.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermEnum.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermFreqVector.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermInfo.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermInfosReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermInfosWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermPositions.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermPositionVector.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermsHash.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermsHashConsumer.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermsHashConsumerPerField.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermsHashConsumerPerThread.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermsHashPerField.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermsHashPerThread.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermVectorEntry.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermVectorEntryFreqSortedComparator.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermVectorMapper.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermVectorOffsetInfo.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermVectorsReader.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermVectorsTermsWriter.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermVectorsTermsWriterPerField.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermVectorsTermsWriterPerThread.cs
-../../../external/Lucene.Net.Light/src/core/Index/TermVectorsWriter.cs
-../../../external/Lucene.Net.Light/src/core/LucenePackage.cs
-../../../external/Lucene.Net.Light/src/core/LZOCompressor.cs
-../../../external/Lucene.Net.Light/src/core/Messages/INLSException.cs
-../../../external/Lucene.Net.Light/src/core/Messages/Message.cs
-../../../external/Lucene.Net.Light/src/core/Messages/MessageImpl.cs
-../../../external/Lucene.Net.Light/src/core/Messages/NLS.cs
-../../../external/Lucene.Net.Light/src/core/QueryParser/CharStream.cs
-../../../external/Lucene.Net.Light/src/core/QueryParser/FastCharStream.cs
-../../../external/Lucene.Net.Light/src/core/QueryParser/MultiFieldQueryParser.cs
-../../../external/Lucene.Net.Light/src/core/QueryParser/ParseException.cs
-../../../external/Lucene.Net.Light/src/core/QueryParser/QueryParser.cs
-../../../external/Lucene.Net.Light/src/core/QueryParser/QueryParserConstants.cs
-../../../external/Lucene.Net.Light/src/core/QueryParser/QueryParserTokenManager.cs
-../../../external/Lucene.Net.Light/src/core/QueryParser/Token.cs
-../../../external/Lucene.Net.Light/src/core/QueryParser/TokenMgrError.cs
-../../../external/Lucene.Net.Light/src/core/Search/BooleanClause.cs
-../../../external/Lucene.Net.Light/src/core/Search/BooleanQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/BooleanScorer.cs
-../../../external/Lucene.Net.Light/src/core/Search/BooleanScorer2.cs
-../../../external/Lucene.Net.Light/src/core/Search/CachingSpanFilter.cs
-../../../external/Lucene.Net.Light/src/core/Search/CachingWrapperFilter.cs
-../../../external/Lucene.Net.Light/src/core/Search/Collector.cs
-../../../external/Lucene.Net.Light/src/core/Search/ComplexExplanation.cs
-../../../external/Lucene.Net.Light/src/core/Search/ConjunctionScorer.cs
-../../../external/Lucene.Net.Light/src/core/Search/ConstantScoreQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/DefaultSimilarity.cs
-../../../external/Lucene.Net.Light/src/core/Search/DisjunctionMaxQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/DisjunctionMaxScorer.cs
-../../../external/Lucene.Net.Light/src/core/Search/DisjunctionSumScorer.cs
-../../../external/Lucene.Net.Light/src/core/Search/DocIdSet.cs
-../../../external/Lucene.Net.Light/src/core/Search/DocIdSetIterator.cs
-../../../external/Lucene.Net.Light/src/core/Search/ExactPhraseScorer.cs
-../../../external/Lucene.Net.Light/src/core/Search/Explanation.cs
-../../../external/Lucene.Net.Light/src/core/Search/FieldCache.cs
-../../../external/Lucene.Net.Light/src/core/Search/FieldCacheImpl.cs
-../../../external/Lucene.Net.Light/src/core/Search/FieldCacheRangeFilter.cs
-../../../external/Lucene.Net.Light/src/core/Search/FieldCacheTermsFilter.cs
-../../../external/Lucene.Net.Light/src/core/Search/FieldComparator.cs
-../../../external/Lucene.Net.Light/src/core/Search/FieldComparatorSource.cs
-../../../external/Lucene.Net.Light/src/core/Search/FieldDoc.cs
-../../../external/Lucene.Net.Light/src/core/Search/FieldDocSortedHitQueue.cs
-../../../external/Lucene.Net.Light/src/core/Search/FieldValueHitQueue.cs
-../../../external/Lucene.Net.Light/src/core/Search/Filter.cs
-../../../external/Lucene.Net.Light/src/core/Search/FilteredDocIdSet.cs
-../../../external/Lucene.Net.Light/src/core/Search/FilteredDocIdSetIterator.cs
-../../../external/Lucene.Net.Light/src/core/Search/FilteredQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/FilteredTermEnum.cs
-../../../external/Lucene.Net.Light/src/core/Search/FilterManager.cs
-../../../external/Lucene.Net.Light/src/core/Search/Function/ByteFieldSource.cs
-../../../external/Lucene.Net.Light/src/core/Search/Function/CustomScoreProvider.cs
-../../../external/Lucene.Net.Light/src/core/Search/Function/CustomScoreQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/Function/DocValues.cs
-../../../external/Lucene.Net.Light/src/core/Search/Function/FieldCacheSource.cs
-../../../external/Lucene.Net.Light/src/core/Search/Function/FieldScoreQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/Function/FloatFieldSource.cs
-../../../external/Lucene.Net.Light/src/core/Search/Function/IntFieldSource.cs
-../../../external/Lucene.Net.Light/src/core/Search/Function/OrdFieldSource.cs
-../../../external/Lucene.Net.Light/src/core/Search/Function/ReverseOrdFieldSource.cs
-../../../external/Lucene.Net.Light/src/core/Search/Function/ShortFieldSource.cs
-../../../external/Lucene.Net.Light/src/core/Search/Function/ValueSource.cs
-../../../external/Lucene.Net.Light/src/core/Search/Function/ValueSourceQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/FuzzyQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/FuzzyTermEnum.cs
-../../../external/Lucene.Net.Light/src/core/Search/HitQueue.cs
-../../../external/Lucene.Net.Light/src/core/Search/IndexSearcher.cs
-../../../external/Lucene.Net.Light/src/core/Search/MatchAllDocsQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/MultiPhraseQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/MultiSearcher.cs
-../../../external/Lucene.Net.Light/src/core/Search/MultiTermQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/MultiTermQueryWrapperFilter.cs
-../../../external/Lucene.Net.Light/src/core/Search/NumericRangeFilter.cs
-../../../external/Lucene.Net.Light/src/core/Search/NumericRangeQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/ParallelMultiSearcher.cs
-../../../external/Lucene.Net.Light/src/core/Search/Payloads/AveragePayloadFunction.cs
-../../../external/Lucene.Net.Light/src/core/Search/Payloads/MaxPayloadFunction.cs
-../../../external/Lucene.Net.Light/src/core/Search/Payloads/MinPayloadFunction.cs
-../../../external/Lucene.Net.Light/src/core/Search/Payloads/PayloadFunction.cs
-../../../external/Lucene.Net.Light/src/core/Search/Payloads/PayloadNearQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/Payloads/PayloadSpanUtil.cs
-../../../external/Lucene.Net.Light/src/core/Search/Payloads/PayloadTermQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/PhrasePositions.cs
-../../../external/Lucene.Net.Light/src/core/Search/PhraseQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/PhraseQueue.cs
-../../../external/Lucene.Net.Light/src/core/Search/PhraseScorer.cs
-../../../external/Lucene.Net.Light/src/core/Search/PositiveScoresOnlyCollector.cs
-../../../external/Lucene.Net.Light/src/core/Search/PrefixFilter.cs
-../../../external/Lucene.Net.Light/src/core/Search/PrefixQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/PrefixTermEnum.cs
-../../../external/Lucene.Net.Light/src/core/Search/Query.cs
-../../../external/Lucene.Net.Light/src/core/Search/QueryTermVector.cs
-../../../external/Lucene.Net.Light/src/core/Search/QueryWrapperFilter.cs
-../../../external/Lucene.Net.Light/src/core/Search/ReqExclScorer.cs
-../../../external/Lucene.Net.Light/src/core/Search/ReqOptSumScorer.cs
-../../../external/Lucene.Net.Light/src/core/Search/ScoreCachingWrappingScorer.cs
-../../../external/Lucene.Net.Light/src/core/Search/ScoreDoc.cs
-../../../external/Lucene.Net.Light/src/core/Search/Scorer.cs
-../../../external/Lucene.Net.Light/src/core/Search/Searchable.cs
-../../../external/Lucene.Net.Light/src/core/Search/Searcher.cs
-../../../external/Lucene.Net.Light/src/core/Search/Similarity.cs
-../../../external/Lucene.Net.Light/src/core/Search/SimilarityDelegator.cs
-../../../external/Lucene.Net.Light/src/core/Search/SingleTermEnum.cs
-../../../external/Lucene.Net.Light/src/core/Search/SloppyPhraseScorer.cs
-../../../external/Lucene.Net.Light/src/core/Search/Sort.cs
-../../../external/Lucene.Net.Light/src/core/Search/SortField.cs
-../../../external/Lucene.Net.Light/src/core/Search/SpanFilter.cs
-../../../external/Lucene.Net.Light/src/core/Search/SpanFilterResult.cs
-../../../external/Lucene.Net.Light/src/core/Search/SpanQueryFilter.cs
-../../../external/Lucene.Net.Light/src/core/Search/Spans/FieldMaskingSpanQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/Spans/NearSpansOrdered.cs
-../../../external/Lucene.Net.Light/src/core/Search/Spans/NearSpansUnordered.cs
-../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanFirstQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanNearQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanNotQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanOrQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/Spans/Spans.cs
-../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanScorer.cs
-../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanTermQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanWeight.cs
-../../../external/Lucene.Net.Light/src/core/Search/Spans/TermSpans.cs
-../../../external/Lucene.Net.Light/src/core/Search/TermQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/TermRangeFilter.cs
-../../../external/Lucene.Net.Light/src/core/Search/TermRangeQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/TermRangeTermEnum.cs
-../../../external/Lucene.Net.Light/src/core/Search/TermScorer.cs
-../../../external/Lucene.Net.Light/src/core/Search/TimeLimitingCollector.cs
-../../../external/Lucene.Net.Light/src/core/Search/TopDocs.cs
-../../../external/Lucene.Net.Light/src/core/Search/TopDocsCollector.cs
-../../../external/Lucene.Net.Light/src/core/Search/TopFieldCollector.cs
-../../../external/Lucene.Net.Light/src/core/Search/TopFieldDocs.cs
-../../../external/Lucene.Net.Light/src/core/Search/TopScoreDocCollector.cs
-../../../external/Lucene.Net.Light/src/core/Search/Weight.cs
-../../../external/Lucene.Net.Light/src/core/Search/WildcardQuery.cs
-../../../external/Lucene.Net.Light/src/core/Search/WildcardTermEnum.cs
-../../../external/Lucene.Net.Light/src/core/Store/AlreadyClosedException.cs
-../../../external/Lucene.Net.Light/src/core/Store/BufferedIndexInput.cs
-../../../external/Lucene.Net.Light/src/core/Store/BufferedIndexOutput.cs
-../../../external/Lucene.Net.Light/src/core/Store/CheckSumIndexInput.cs
-../../../external/Lucene.Net.Light/src/core/Store/CheckSumIndexOutput.cs
-../../../external/Lucene.Net.Light/src/core/Store/Directory.cs
-../../../external/Lucene.Net.Light/src/core/Store/FileSwitchDirectory.cs
-../../../external/Lucene.Net.Light/src/core/Store/FSDirectory.cs
-../../../external/Lucene.Net.Light/src/core/Store/FSLockFactory.cs
-../../../external/Lucene.Net.Light/src/core/Store/IndexInput.cs
-../../../external/Lucene.Net.Light/src/core/Store/IndexOutput.cs
-../../../external/Lucene.Net.Light/src/core/Store/Lock.cs
-../../../external/Lucene.Net.Light/src/core/Store/LockFactory.cs
-../../../external/Lucene.Net.Light/src/core/Store/LockObtainFailedException.cs
-../../../external/Lucene.Net.Light/src/core/Store/LockReleaseFailedException.cs
-../../../external/Lucene.Net.Light/src/core/Store/LockStressTest.cs
-../../../external/Lucene.Net.Light/src/core/Store/LockVerifyServer.cs
-../../../external/Lucene.Net.Light/src/core/Store/MMapDirectory.cs
-../../../external/Lucene.Net.Light/src/core/Store/NativeFSLockFactory.cs
-../../../external/Lucene.Net.Light/src/core/Store/NIOFSDirectory.cs
-../../../external/Lucene.Net.Light/src/core/Store/NoLockFactory.cs
-../../../external/Lucene.Net.Light/src/core/Store/NoSuchDirectoryException.cs
-../../../external/Lucene.Net.Light/src/core/Store/RAMDirectory.cs
-../../../external/Lucene.Net.Light/src/core/Store/RAMFile.cs
-../../../external/Lucene.Net.Light/src/core/Store/RAMInputStream.cs
-../../../external/Lucene.Net.Light/src/core/Store/RAMOutputStream.cs
-../../../external/Lucene.Net.Light/src/core/Store/SimpleFSDirectory.cs
-../../../external/Lucene.Net.Light/src/core/Store/SimpleFSLockFactory.cs
-../../../external/Lucene.Net.Light/src/core/Store/SingleInstanceLockFactory.cs
-../../../external/Lucene.Net.Light/src/core/Store/VerifyingLockFactory.cs
-../../../external/Lucene.Net.Light/src/core/Support/AppSettings.cs
-../../../external/Lucene.Net.Light/src/core/Support/AttributeImplItem.cs
-../../../external/Lucene.Net.Light/src/core/Support/BitSetSupport.cs
-../../../external/Lucene.Net.Light/src/core/Support/BuildType.cs
-../../../external/Lucene.Net.Light/src/core/Support/Character.cs
-../../../external/Lucene.Net.Light/src/core/Support/CloseableThreadLocalProfiler.cs
-../../../external/Lucene.Net.Light/src/core/Support/CollectionsHelper.cs
-../../../external/Lucene.Net.Light/src/core/Support/Compare.cs
-../../../external/Lucene.Net.Light/src/core/Support/Compatibility/ConcurrentDictionary.cs
-../../../external/Lucene.Net.Light/src/core/Support/Compatibility/Func.cs
-../../../external/Lucene.Net.Light/src/core/Support/Compatibility/ISet.cs
-../../../external/Lucene.Net.Light/src/core/Support/Compatibility/SetFactory.cs
-../../../external/Lucene.Net.Light/src/core/Support/Compatibility/SortedSet.cs
-../../../external/Lucene.Net.Light/src/core/Support/Compatibility/ThreadLocal.cs
-../../../external/Lucene.Net.Light/src/core/Support/Compatibility/WrappedHashSet.cs
-../../../external/Lucene.Net.Light/src/core/Support/CRC32.cs
-../../../external/Lucene.Net.Light/src/core/Support/Cryptography.cs
-../../../external/Lucene.Net.Light/src/core/Support/Deflater.cs
-../../../external/Lucene.Net.Light/src/core/Support/Double.cs
-../../../external/Lucene.Net.Light/src/core/Support/EquatableList.cs
-../../../external/Lucene.Net.Light/src/core/Support/FileSupport.cs
-../../../external/Lucene.Net.Light/src/core/Support/GeneralKeyedCollection.cs
-../../../external/Lucene.Net.Light/src/core/Support/HashMap.cs
-../../../external/Lucene.Net.Light/src/core/Support/IChecksum.cs
-../../../external/Lucene.Net.Light/src/core/Support/Inflater.cs
-../../../external/Lucene.Net.Light/src/core/Support/IThreadRunnable.cs
-../../../external/Lucene.Net.Light/src/core/Support/Number.cs
-../../../external/Lucene.Net.Light/src/core/Support/OS.cs
-../../../external/Lucene.Net.Light/src/core/Support/SharpZipLib.cs
-../../../external/Lucene.Net.Light/src/core/Support/Single.cs
-../../../external/Lucene.Net.Light/src/core/Support/TextSupport.cs
-../../../external/Lucene.Net.Light/src/core/Support/ThreadClass.cs
-../../../external/Lucene.Net.Light/src/core/Support/ThreadLock.cs
-../../../external/Lucene.Net.Light/src/core/Support/WeakDictionary.cs
-../../../external/Lucene.Net.Light/src/core/Util/ArrayUtil.cs
-../../../external/Lucene.Net.Light/src/core/Util/Attribute.cs
-../../../external/Lucene.Net.Light/src/core/Util/AttributeSource.cs
-../../../external/Lucene.Net.Light/src/core/Util/AverageGuessMemoryModel.cs
-../../../external/Lucene.Net.Light/src/core/Util/BitUtil.cs
-../../../external/Lucene.Net.Light/src/core/Util/BitVector.cs
-../../../external/Lucene.Net.Light/src/core/Util/Cache/Cache.cs
-../../../external/Lucene.Net.Light/src/core/Util/Cache/SimpleLRUCache.cs
-../../../external/Lucene.Net.Light/src/core/Util/Cache/SimpleMapCache.cs
-../../../external/Lucene.Net.Light/src/core/Util/CloseableThreadLocal.cs
-../../../external/Lucene.Net.Light/src/core/Util/Constants.cs
-../../../external/Lucene.Net.Light/src/core/Util/DocIdBitSet.cs
-../../../external/Lucene.Net.Light/src/core/Util/FieldCacheSanityChecker.cs
-../../../external/Lucene.Net.Light/src/core/Util/IAttribute.cs
-../../../external/Lucene.Net.Light/src/core/Util/IdentityDictionary.cs
-../../../external/Lucene.Net.Light/src/core/Util/IndexableBinaryStringTools.cs
-../../../external/Lucene.Net.Light/src/core/Util/MapOfSets.cs
-../../../external/Lucene.Net.Light/src/core/Util/MemoryModel.cs
-../../../external/Lucene.Net.Light/src/core/Util/NumericUtils.cs
-../../../external/Lucene.Net.Light/src/core/Util/OpenBitSet.cs
-../../../external/Lucene.Net.Light/src/core/Util/OpenBitSetDISI.cs
-../../../external/Lucene.Net.Light/src/core/Util/OpenBitSetIterator.cs
-../../../external/Lucene.Net.Light/src/core/Util/PriorityQueue.cs
-../../../external/Lucene.Net.Light/src/core/Util/RamUsageEstimator.cs
-../../../external/Lucene.Net.Light/src/core/Util/ReaderUtil.cs
-../../../external/Lucene.Net.Light/src/core/Util/ScorerDocQueue.cs
-../../../external/Lucene.Net.Light/src/core/Util/SimpleStringInterner.cs
-../../../external/Lucene.Net.Light/src/core/Util/SmallFloat.cs
-../../../external/Lucene.Net.Light/src/core/Util/SortedVIntList.cs
-../../../external/Lucene.Net.Light/src/core/Util/SorterTemplate.cs
-../../../external/Lucene.Net.Light/src/core/Util/StringHelper.cs
-../../../external/Lucene.Net.Light/src/core/Util/StringInterner.cs
-../../../external/Lucene.Net.Light/src/core/Util/ToStringUtils.cs
-../../../external/Lucene.Net.Light/src/core/Util/UnicodeUtil.cs
-../../../external/Lucene.Net.Light/src/core/Util/Version.cs
+
+../../../external/api-doc-tools/monodoc/Monodoc/cache.cs
+../../../external/api-doc-tools/monodoc/Monodoc/caches/FileCache.cs
+../../../external/api-doc-tools/monodoc/Monodoc/caches/NullCache.cs
+../../../external/api-doc-tools/monodoc/Monodoc/generator.cs
+../../../external/api-doc-tools/monodoc/Monodoc/generators/html/Addin2Html.cs
+../../../external/api-doc-tools/monodoc/Monodoc/generators/html/Ecma2Html.cs
+../../../external/api-doc-tools/monodoc/Monodoc/generators/html/Ecmaspec2Html.cs
+../../../external/api-doc-tools/monodoc/Monodoc/generators/html/Error2Html.cs
+../../../external/api-doc-tools/monodoc/Monodoc/generators/html/Idem.cs
+../../../external/api-doc-tools/monodoc/Monodoc/generators/html/Man2Html.cs
+../../../external/api-doc-tools/monodoc/Monodoc/generators/html/MonoBook2Html.cs
+../../../external/api-doc-tools/monodoc/Monodoc/generators/html/Toc2Html.cs
+../../../external/api-doc-tools/monodoc/Monodoc/generators/HtmlGenerator.cs
+../../../external/api-doc-tools/monodoc/Monodoc/generators/RawGenerator.cs
+../../../external/api-doc-tools/monodoc/Monodoc/HelpSource.cs
+../../../external/api-doc-tools/monodoc/Monodoc/HelpSource_Legacy.cs
+../../../external/api-doc-tools/monodoc/Monodoc/index.cs
+../../../external/api-doc-tools/monodoc/Monodoc/Node.cs
+../../../external/api-doc-tools/monodoc/Monodoc/Node_Legacy.cs
+../../../external/api-doc-tools/monodoc/Monodoc/Provider.cs
+../../../external/api-doc-tools/monodoc/Monodoc/providers/addins-provider.cs
+../../../external/api-doc-tools/monodoc/Monodoc/providers/ecma-provider.cs
+../../../external/api-doc-tools/monodoc/Monodoc/providers/EcmaDoc.cs
+../../../external/api-doc-tools/monodoc/Monodoc/providers/ecmaspec-provider.cs
+../../../external/api-doc-tools/monodoc/Monodoc/providers/ecmauncompiled-provider.cs
+../../../external/api-doc-tools/monodoc/Monodoc/providers/error-provider.cs
+../../../external/api-doc-tools/monodoc/Monodoc/providers/man-provider.cs
+../../../external/api-doc-tools/monodoc/Monodoc/providers/xhtml-provider.cs
+../../../external/api-doc-tools/monodoc/Monodoc/RootTree.cs
+../../../external/api-doc-tools/monodoc/Monodoc/RootTree_Legacy.cs
+../../../external/api-doc-tools/monodoc/Monodoc/SearchableDocument.cs
+../../../external/api-doc-tools/monodoc/Monodoc/SearchableIndex.cs
+../../../external/api-doc-tools/monodoc/Monodoc/settings.cs
+../../../external/api-doc-tools/monodoc/Monodoc/settings_Legacy.cs
+../../../external/api-doc-tools/monodoc/Monodoc/storage/NullStorage.cs
+../../../external/api-doc-tools/monodoc/Monodoc/storage/UncompiledDocStorage.cs
+../../../external/api-doc-tools/monodoc/Monodoc/storage/ZipStorage.cs
+../../../external/api-doc-tools/monodoc/Monodoc/storage.cs
+../../../external/api-doc-tools/monodoc/Monodoc/Tree.cs
+../../../external/api-doc-tools/monodoc/Monodoc/TypeUtils.cs
+
+../../../external/api-doc-tools/monodoc/Monodoc.Ecma/EcmaDesc.cs
+../../../external/api-doc-tools/monodoc/Monodoc.Ecma/EcmaUrlTokenizer.cs
+../../../external/api-doc-tools/monodoc/Monodoc.Ecma/prebuilt/EcmaUrlParser.cs
+
+../../../external/api-doc-tools/monodoc/Mono.Utilities/colorizer.cs
+../../../external/api-doc-tools/monodoc/Mono.Utilities/LRUCache.cs
+
+../../../external/api-doc-tools/monodoc/Mono.Documentation/ManifestResourceResolver.cs
+../../../external/api-doc-tools/monodoc/Mono.Documentation/XmlDocUtils.cs
+
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Analyzer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/ASCIIFoldingFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/BaseCharFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/CachingTokenFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/CharArraySet.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/CharFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/CharReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/CharStream.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/CharTokenizer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/ISOLatin1AccentFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/KeywordAnalyzer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/KeywordTokenizer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/LengthFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/LetterTokenizer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/LowerCaseFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/LowerCaseTokenizer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/MappingCharFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/NormalizeCharMap.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/NumericTokenStream.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/PerFieldAnalyzerWrapper.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/PorterStemFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/PorterStemmer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/SimpleAnalyzer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Standard/StandardAnalyzer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Standard/StandardFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Standard/StandardTokenizer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Standard/StandardTokenizerImpl.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/StopAnalyzer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/StopFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/TeeSinkTokenFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Token.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/FlagsAttribute.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/IFlagsAttribute.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/IOffsetAttribute.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/IPayloadAttribute.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/IPositionIncrementAttribute.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/ITermAttribute.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/ITypeAttribute.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/OffsetAttribute.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/PayloadAttribute.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/PositionIncrementAttribute.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/TermAttribute.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/TypeAttribute.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/TokenFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/Tokenizer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/TokenStream.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/WhitespaceAnalyzer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/WhitespaceTokenizer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Analysis/WordlistLoader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Document/AbstractField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Document/CompressionTools.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Document/DateField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Document/DateTools.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Document/Document.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Document/Field.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Document/Fieldable.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Document/FieldSelector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Document/FieldSelectorResult.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Document/LoadFirstFieldSelector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Document/MapFieldSelector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Document/NumberTools.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Document/NumericField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Document/SetBasedFieldSelector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/AbstractAllTermDocs.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/AllTermDocs.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/BufferedDeletes.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/ByteBlockPool.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/ByteSliceReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/ByteSliceWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/CharBlockPool.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/CheckIndex.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/CompoundFileReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/CompoundFileWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/ConcurrentMergeScheduler.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/CorruptIndexException.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DefaultSkipListReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DefaultSkipListWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DirectoryReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocConsumer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocConsumerPerThread.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocFieldConsumer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocFieldConsumerPerField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocFieldConsumerPerThread.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocFieldConsumers.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocFieldConsumersPerField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocFieldConsumersPerThread.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocFieldProcessor.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocFieldProcessorPerField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocFieldProcessorPerThread.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocInverter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocInverterPerField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocInverterPerThread.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocumentsWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/DocumentsWriterThreadState.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FieldInfo.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FieldInfos.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FieldInvertState.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FieldReaderException.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FieldSortedTermVectorMapper.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FieldsReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FieldsWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FilterIndexReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FormatPostingsDocsConsumer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FormatPostingsDocsWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FormatPostingsFieldsConsumer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FormatPostingsFieldsWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FormatPostingsPositionsConsumer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FormatPostingsPositionsWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FormatPostingsTermsConsumer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FormatPostingsTermsWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FreqProxFieldMergeState.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FreqProxTermsWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FreqProxTermsWriterPerField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/FreqProxTermsWriterPerThread.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/IndexCommit.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/IndexDeletionPolicy.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/IndexFileDeleter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/IndexFileNameFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/IndexFileNames.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/IndexReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/IndexWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/IntBlockPool.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/InvertedDocConsumer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/InvertedDocConsumerPerField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/InvertedDocConsumerPerThread.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/InvertedDocEndConsumer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/InvertedDocEndConsumerPerField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/InvertedDocEndConsumerPerThread.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/KeepOnlyLastCommitDeletionPolicy.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/LogByteSizeMergePolicy.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/LogDocMergePolicy.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/LogMergePolicy.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/MergeDocIDRemapper.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/MergePolicy.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/MergeScheduler.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/MultiLevelSkipListReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/MultiLevelSkipListWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/MultipleTermPositions.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/MultiReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/NormsWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/NormsWriterPerField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/NormsWriterPerThread.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/ParallelReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/Payload.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/PositionBasedTermVectorMapper.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/RawPostingList.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/ReadOnlyDirectoryReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/ReadOnlySegmentReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/ReusableStringReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SegmentInfo.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SegmentInfos.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SegmentMergeInfo.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SegmentMergeQueue.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SegmentMerger.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SegmentReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SegmentTermDocs.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SegmentTermEnum.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SegmentTermPositions.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SegmentTermPositionVector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SegmentTermVector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SegmentWriteState.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SerialMergeScheduler.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SnapshotDeletionPolicy.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/SortedTermVectorMapper.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/StaleReaderException.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/StoredFieldsWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/StoredFieldsWriterPerThread.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/Term.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermBuffer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermDocs.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermEnum.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermFreqVector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermInfo.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermInfosReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermInfosWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermPositions.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermPositionVector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermsHash.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermsHashConsumer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermsHashConsumerPerField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermsHashConsumerPerThread.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermsHashPerField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermsHashPerThread.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermVectorEntry.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermVectorEntryFreqSortedComparator.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermVectorMapper.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermVectorOffsetInfo.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermVectorsReader.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermVectorsTermsWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermVectorsTermsWriterPerField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermVectorsTermsWriterPerThread.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Index/TermVectorsWriter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/LucenePackage.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/LZOCompressor.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Messages/INLSException.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Messages/Message.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Messages/MessageImpl.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Messages/NLS.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/QueryParser/CharStream.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/QueryParser/FastCharStream.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/QueryParser/MultiFieldQueryParser.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/QueryParser/ParseException.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/QueryParser/QueryParser.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/QueryParser/QueryParserConstants.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/QueryParser/QueryParserTokenManager.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/QueryParser/Token.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/QueryParser/TokenMgrError.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/BooleanClause.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/BooleanQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/BooleanScorer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/BooleanScorer2.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/CachingSpanFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/CachingWrapperFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Collector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/ComplexExplanation.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/ConjunctionScorer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/ConstantScoreQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/DefaultSimilarity.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/DisjunctionMaxQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/DisjunctionMaxScorer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/DisjunctionSumScorer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/DocIdSet.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/DocIdSetIterator.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/ExactPhraseScorer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Explanation.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FieldCache.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FieldCacheImpl.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FieldCacheRangeFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FieldCacheTermsFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FieldComparator.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FieldComparatorSource.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FieldDoc.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FieldDocSortedHitQueue.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FieldValueHitQueue.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Filter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FilteredDocIdSet.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FilteredDocIdSetIterator.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FilteredQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FilteredTermEnum.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FilterManager.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Function/ByteFieldSource.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Function/CustomScoreProvider.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Function/CustomScoreQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Function/DocValues.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Function/FieldCacheSource.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Function/FieldScoreQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Function/FloatFieldSource.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Function/IntFieldSource.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Function/OrdFieldSource.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Function/ReverseOrdFieldSource.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Function/ShortFieldSource.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Function/ValueSource.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Function/ValueSourceQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FuzzyQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/FuzzyTermEnum.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/HitQueue.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/IndexSearcher.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/MatchAllDocsQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/MultiPhraseQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/MultiSearcher.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/MultiTermQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/MultiTermQueryWrapperFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/NumericRangeFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/NumericRangeQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/ParallelMultiSearcher.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Payloads/AveragePayloadFunction.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Payloads/MaxPayloadFunction.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Payloads/MinPayloadFunction.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Payloads/PayloadFunction.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Payloads/PayloadNearQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Payloads/PayloadSpanUtil.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Payloads/PayloadTermQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/PhrasePositions.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/PhraseQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/PhraseQueue.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/PhraseScorer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/PositiveScoresOnlyCollector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/PrefixFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/PrefixQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/PrefixTermEnum.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Query.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/QueryTermVector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/QueryWrapperFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/ReqExclScorer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/ReqOptSumScorer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/ScoreCachingWrappingScorer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/ScoreDoc.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Scorer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Searchable.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Searcher.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Similarity.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/SimilarityDelegator.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/SingleTermEnum.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/SloppyPhraseScorer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Sort.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/SortField.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/SpanFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/SpanFilterResult.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/SpanQueryFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Spans/FieldMaskingSpanQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Spans/NearSpansOrdered.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Spans/NearSpansUnordered.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Spans/SpanFirstQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Spans/SpanNearQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Spans/SpanNotQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Spans/SpanOrQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Spans/SpanQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Spans/Spans.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Spans/SpanScorer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Spans/SpanTermQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Spans/SpanWeight.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Spans/TermSpans.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/TermQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/TermRangeFilter.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/TermRangeQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/TermRangeTermEnum.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/TermScorer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/TimeLimitingCollector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/TopDocs.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/TopDocsCollector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/TopFieldCollector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/TopFieldDocs.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/TopScoreDocCollector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/Weight.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/WildcardQuery.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Search/WildcardTermEnum.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/AlreadyClosedException.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/BufferedIndexInput.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/BufferedIndexOutput.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/CheckSumIndexInput.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/CheckSumIndexOutput.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/Directory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/FileSwitchDirectory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/FSDirectory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/FSLockFactory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/IndexInput.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/IndexOutput.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/Lock.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/LockFactory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/LockObtainFailedException.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/LockReleaseFailedException.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/LockStressTest.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/LockVerifyServer.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/MMapDirectory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/NativeFSLockFactory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/NIOFSDirectory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/NoLockFactory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/NoSuchDirectoryException.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/RAMDirectory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/RAMFile.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/RAMInputStream.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/RAMOutputStream.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/SimpleFSDirectory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/SimpleFSLockFactory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/SingleInstanceLockFactory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Store/VerifyingLockFactory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/AppSettings.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/AttributeImplItem.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/BitSetSupport.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/BuildType.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Character.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/CloseableThreadLocalProfiler.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/CollectionsHelper.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Compare.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Compatibility/ConcurrentDictionary.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Compatibility/Func.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Compatibility/ISet.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Compatibility/SetFactory.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Compatibility/SortedSet.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Compatibility/ThreadLocal.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Compatibility/WrappedHashSet.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/CRC32.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Cryptography.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Deflater.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Double.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/EquatableList.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/FileSupport.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/GeneralKeyedCollection.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/HashMap.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/IChecksum.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Inflater.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/IThreadRunnable.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Number.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/OS.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/SharpZipLib.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/Single.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/TextSupport.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/ThreadClass.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/ThreadLock.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Support/WeakDictionary.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/ArrayUtil.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/Attribute.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/AttributeSource.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/AverageGuessMemoryModel.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/BitUtil.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/BitVector.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/Cache/Cache.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/Cache/SimpleLRUCache.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/Cache/SimpleMapCache.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/CloseableThreadLocal.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/Constants.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/DocIdBitSet.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/FieldCacheSanityChecker.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/IAttribute.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/IdentityDictionary.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/IndexableBinaryStringTools.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/MapOfSets.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/MemoryModel.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/NumericUtils.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/OpenBitSet.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/OpenBitSetDISI.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/OpenBitSetIterator.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/PriorityQueue.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/RamUsageEstimator.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/ReaderUtil.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/ScorerDocQueue.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/SimpleStringInterner.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/SmallFloat.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/SortedVIntList.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/SorterTemplate.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/StringHelper.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/StringInterner.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/ToStringUtils.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/UnicodeUtil.cs
+../../../external/api-doc-tools/external/Lucene.Net.Light/src/core/Util/Version.cs
diff --git a/mcs/class/monodoc/monodoc_test.dll.sources b/mcs/class/monodoc/monodoc_test.dll.sources
index a3f19b731a0..92c65e9d508 100644
--- a/mcs/class/monodoc/monodoc_test.dll.sources
+++ b/mcs/class/monodoc/monodoc_test.dll.sources
@@ -1,9 +1,9 @@
../../test-helpers/NunitHelpers.cs
-Monodoc/HelpSourceTests.cs
-Monodoc/EcmaDocTests.cs
-Monodoc/TreeTest.cs
-Monodoc.Ecma/EcmaUrlTests.cs
-Monodoc/SettingsTest.cs
-Monodoc.Generators/RawGeneratorTests.cs
-Monodoc/NodeTest.cs
-Monodoc/RootTreeTest.cs
+../../../../external/api-doc-tools/monodoc/Test/Monodoc/EcmaDocTests.cs
+../../../../external/api-doc-tools/monodoc/Test/Monodoc/HelpSourceTests.cs
+../../../../external/api-doc-tools/monodoc/Test/Monodoc/NodeTest.cs
+../../../../external/api-doc-tools/monodoc/Test/Monodoc/RootTreeTest.cs
+../../../../external/api-doc-tools/monodoc/Test/Monodoc/SettingsTest.cs
+../../../../external/api-doc-tools/monodoc/Test/Monodoc/TreeTest.cs
+../../../../external/api-doc-tools/monodoc/Test/Monodoc.Ecma/EcmaUrlTests.cs
+../../../../external/api-doc-tools/monodoc/Test/Monodoc.Generators/RawGeneratorTests.cs