diff --git a/Libraries/AccuLadder/Accu/DevHelper.cs b/Libraries/AccuLadder/Accu/DevHelper.cs
index 2316805..2ed4c11 100644
--- a/Libraries/AccuLadder/Accu/DevHelper.cs
+++ b/Libraries/AccuLadder/Accu/DevHelper.cs
@@ -15,7 +15,7 @@ namespace Accuraty.Libraries.AccuLadder
public partial class Accu
{
///
- /// Accu.Dev Helper - Tools, utilities, and shortcuts for DNN and 2SC projects
+ /// Accu.Dev Helper - Tools, utilities, and shortcuts to assist with developing stuff inside DNN and 2SC projects
///
public class Dev
{
@@ -139,29 +139,6 @@ public static string CombinePathSegments(string pathSeparator = "/", params stri
return combinedPath;
}
- ///
- /// Turn any text or title in to a URL Slug
- ///
- /// Any string to be converted to a Slug
- /// Source: https://stackoverflow.com/questions/2920744/url-slugify-algorithm-in-c
- /// TODO find better version that does more (with hyphens; multiples and trailing)
- public static string ToSlug(string phrase)
- {
- byte[] bytes = Encoding.GetEncoding("Cyrillic").GetBytes(phrase);
- string str = Encoding.ASCII.GetString(bytes);
- str = str.ToLower();
- // invalid chars
- str = Regex.Replace(str, @"[^a-z0-9\s-]", "");
- // convert multiple spaces into one space
- str = Regex.Replace(str, @"\s+", " ").Trim();
- // cut and trim
- str = str.Substring(0, str.Length <= 45 ? str.Length : 45).Trim();
- str = Regex.Replace(str, @"\s", "-"); // space to hyphen
- str = Regex.Replace(str, @"-{2,}", "-"); // multiple hyphens to one hyphen
- str = str.Trim('-'); // trim hyphens from ends
- return str;
- }
-
///
/// Get the version of an installed DLL in /bin
///
@@ -241,8 +218,12 @@ public static string GetIpAddressFromHost(string host)
}
return ip;
}
- }
+#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
+ [Obsolete("Deprecated, instead use: Accu.Web.ToSlug(phrase)")]
+ public static string ToSlug(string phrase) { return Accu.Web.ToSlug(phrase); }
+
+ }
} // class Accu
} // end of namespace Accuraty.Libraries.AccuLadder
diff --git a/Libraries/AccuLadder/Accu/DnnHelpers.cs b/Libraries/AccuLadder/Accu/DnnHelpers.cs
index 91c0950..d7d0647 100644
--- a/Libraries/AccuLadder/Accu/DnnHelpers.cs
+++ b/Libraries/AccuLadder/Accu/DnnHelpers.cs
@@ -14,9 +14,8 @@ namespace Accuraty.Libraries.AccuLadder
///
public partial class Accu
{
- ///
- /// Accu.Dnn Helper - Tools, utilities, and shortcuts for DNN-specific things
- ///
+
+#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
public partial class Dnn
{
///
diff --git a/Libraries/AccuLadder/Accu/IconHelper.cs b/Libraries/AccuLadder/Accu/IconHelper.cs
index c77eb3c..bf8c7b3 100644
--- a/Libraries/AccuLadder/Accu/IconHelper.cs
+++ b/Libraries/AccuLadder/Accu/IconHelper.cs
@@ -13,7 +13,7 @@ namespace Accuraty.Libraries.AccuLadder
public partial class Accu
{
///
- /// Accu.Dnn Helper - Tools, utilities, and shortcuts for DNN-specific things
+ /// Accu.Icon Helper - Simple syntax to an Icon on the page
///
public partial class Icon
{
diff --git a/Libraries/AccuLadder/Accu/NxHelper.cs b/Libraries/AccuLadder/Accu/NxHelper.cs
index a753542..8687061 100644
--- a/Libraries/AccuLadder/Accu/NxHelper.cs
+++ b/Libraries/AccuLadder/Accu/NxHelper.cs
@@ -9,7 +9,7 @@ public partial class Accu
{
///
- /// Accu.Nx Helper - Experimental Tools, utilities, and shortcuts for 2sxc-specific things
+ /// Accu.Nx Helper - Experimental Tools, utilities, and shortcuts for DNN or 2sxc things
///
public class Nx
{
diff --git a/Libraries/AccuLadder/Accu/WebHelper.cs b/Libraries/AccuLadder/Accu/WebHelper.cs
index f887e5d..b449773 100644
--- a/Libraries/AccuLadder/Accu/WebHelper.cs
+++ b/Libraries/AccuLadder/Accu/WebHelper.cs
@@ -1,5 +1,7 @@
using System.Web;
using System.Drawing; // TODO Remove this dependency? But what to replace it with? Microsoft's System.Drawing.Common? Open Source ImageSharp?
+using System.Text.RegularExpressions;
+using System.Text;
namespace Accuraty.Libraries.AccuLadder
{
@@ -10,10 +12,33 @@ public partial class Accu
{
///
- /// Accu.Sxc Helper - Tools, utilities, and shortcuts for 2sxc-specific things
+ /// Accu.Web Helper - Tools, utilities, and shortcuts for web-specific things
///
public class Web
{
+ ///
+ /// Turn any text or title in to a URL Slug
+ ///
+ /// Any string to be converted to a Slug
+ /// Source: https://stackoverflow.com/questions/2920744/url-slugify-algorithm-in-c
+ /// TODO find better version that does more (with hyphens; multiples and trailing)
+ public static string ToSlug(string phrase)
+ {
+ byte[] bytes = Encoding.GetEncoding("Cyrillic").GetBytes(phrase);
+ string str = Encoding.ASCII.GetString(bytes);
+ str = str.ToLower();
+ // invalid chars
+ str = Regex.Replace(str, @"[^a-z0-9\s-]", "");
+ // convert multiple spaces into one space
+ str = Regex.Replace(str, @"\s+", " ").Trim();
+ // cut and trim
+ str = str.Substring(0, str.Length <= 45 ? str.Length : 45).Trim();
+ str = Regex.Replace(str, @"\s", "-"); // space to hyphen
+ str = Regex.Replace(str, @"-{2,}", "-"); // multiple hyphens to one hyphen
+ str = str.Trim('-'); // trim hyphens from ends
+ return str;
+ }
+
///
/// Get the width from an image file
///
diff --git a/Libraries/AccuLadder/Accu/_CompatibilityHelper.cs b/Libraries/AccuLadder/Accu/_CompatibilityHelper.cs
index 7534a8f..4fe0b1d 100644
--- a/Libraries/AccuLadder/Accu/_CompatibilityHelper.cs
+++ b/Libraries/AccuLadder/Accu/_CompatibilityHelper.cs
@@ -27,8 +27,8 @@ public class AccuKit
public static HtmlString BootstrapIcon(string iconName) { return Accu.Theme.BootstrapIcon(iconName); }
[Obsolete("Deprecated, instead use: Accu.Dnn.IsSuper()")]
public static bool isSuperUser() { return Accu.Dnn.IsSuper(); }
- [Obsolete("Deprecated, instead use: Accu.Dev.ToSlug(phrase)")]
- public static string ToSlug(string phrase) { return Accu.Dev.ToSlug(phrase); }
+ [Obsolete("Deprecated, instead use: Accu.Web.ToSlug(phrase)")]
+ public static string ToSlug(string phrase) { return Accu.Web.ToSlug(phrase); }
/// Obsolete: Deprecated, use: Accu.Dev.GetIpAddress() instead
[Obsolete("Deprecated, instead use: Accu.Dev.IsAccuratyIp()")]
public static bool isAccuratyIP() { return Accu.Dev.IsAccuratyIp(); }
diff --git a/Libraries/AccuLadder/README.md b/Libraries/AccuLadder/README.md
index e223330..afe86b8 100644
--- a/Libraries/AccuLadder/README.md
+++ b/Libraries/AccuLadder/README.md
@@ -1,12 +1,24 @@
# AccuLadder
-## How to Generate the Docs
+## How to Generate the Docs (DocFX)
-On REMOTE101, PowerShell or command line to C:\dev\gen\
-Then, run the following command: `docfx .\docfx\docfx.json --serve`
+PowerShell or command line to C:\dev\gen\docfx
+Then, run the following command: `docfx build docfx.json [--serve]`
Then, browse to http://localhost:8080/
-TODO: Add a script to do this automatically and public to GitHub Pages
+It builds into `C:\dev\gh.io\jeremy-farrance\AccuLadder` which is git remote for
+https://github.com/jeremy-farrance/jeremy-farrance.github.io
+
+To publish, open the VS Code project and publish main directly to the remote repo.
+
+Key files:
+- docfx.json
+- templates/modern/
+ - layout/_master.tmpl
+ - public/main.css
+ - others?
+
+TODO: Automate all the above on Release builds
## Helpers - Draft and Changing Outline as we convert...
diff --git a/Libraries/AccuLadder/releasenotes.txt b/Libraries/AccuLadder/releasenotes.txt
index 20ef546..834672f 100644
--- a/Libraries/AccuLadder/releasenotes.txt
+++ b/Libraries/AccuLadder/releasenotes.txt
@@ -1,6 +1,14 @@
AccuLadder Libraries Extension for DNN
+
Version 01.00.09
+
+
Add IconHelper; works, but needs think, renaming, refactoring
+
Fixed .ToSlug; moved from Accu.Dev to Accu.Web
+
Got DocFX working well, slightly customized the theme
+
Added How To Generate Docs details in README.md
+
Minor clean ups, other trivial fixes like capitalization
+
Version 01.00.08
including 01.00.07.00 (.06 thru .07.02)
diff --git a/docfx/articles/intro.md b/docfx/articles/intro.md
index c0478ce..00230bc 100644
--- a/docfx/articles/intro.md
+++ b/docfx/articles/intro.md
@@ -1 +1,12 @@
-# Add your introductions here!
+# AccuLadder Examples
+
+- ACCU4: More / [AccuLadder](https://www.accu4.com/AccuThings/AccuLadder)
+- ACCU4: More / [AccuLadder Experiments](https://www.accu4.com/More-/AccuLadder-Experiments)
+
+# Initial Projects using AccuLadder v1.x Alpha and Beta
+
+- [ACCU4.COM](https://accu4.com)
+- BEACN2023 (VPN/WEBSVR4)
+- FASS/AETA2023
+- FASS/ARPAS2023
+- CCFP2023
diff --git a/docfx/docfx.json b/docfx/docfx.json
index 3323052..ff616db 100644
--- a/docfx/docfx.json
+++ b/docfx/docfx.json
@@ -46,15 +46,21 @@
]
}
],
- "output": "_site",
+ "output": "../../gh.io/jeremy-farrance/AccuLadder",
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"template": [
- "default",
- "modern"
+ "templates/default",
+ "templates/modern"
],
+ "globalMetadata": {
+ // Other metadata...
+ "_appTitle": " Open Source by Accuraty Solutions",
+ "_appFooter": "Note: a clear blue sky is just the surface of the ocean of the universe.",
+ "_appLogoPath": "images/accu-logo.svg"
+ },
"postProcessors": [],
"keepFileLink": false,
"disableGitFeatures": false
}
-}
\ No newline at end of file
+}
diff --git a/docfx/images/accu-logo.svg b/docfx/images/accu-logo.svg
new file mode 100644
index 0000000..3f38a7d
--- /dev/null
+++ b/docfx/images/accu-logo.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docfx/index.md b/docfx/index.md
index 3ae2506..e084854 100644
--- a/docfx/index.md
+++ b/docfx/index.md
@@ -1,4 +1,92 @@
-# This is the **HOMEPAGE**.
-Refer to [Markdown](http://daringfireball.net/projects/markdown/) for how to write markdown files.
+# AccuLadder v1.0.9+
+This is the basic reference for Accuraty's common library of tools, utilities, and doohickies for DNN+2sxc projects.
+This replaces AccuKit so far and will also replace RazorKit, AccuKit11, and other libraries that are used in
+Accuraty's DNN+2sxc projects (usually in the /App_Code folder).
+
## Quick Start Notes:
-1. Add images to the *images* folder if the file is referencing an image.
+
+### Installation
+Install the latest release from the project's [GitHub Release](https://github.com/jeremy-farrance/AccuratySolutions-2023/releases) page in the usual DNN way.
+> [!CAUTION]
+> This applies to Accuraty projects only. Intallation on projects with old libraries in the /App_Code folder require some additional steps;
+this was expected, see JRF. More on this below.
+
+### Upgrade
+Install a newer version, its a normal DNN extension install, it will just upgrade the existing version.
+
+## Alpha and Experimental
+This project is in alpha and experimental. Any release marked `Latest` is good for production use. It is not recommended for use in any project that is not under active development by a developer who is familiar with the code and is able to fix any issues that may arise.
+
+## How to Use
+Once AccuLadder is installed, you can use it in your C# code like this
+
+### .cs files
+```csharp
+using Accuraty.Libraries.AccuLadder;
+
+string phoneNumber = Accu.Text.FormatPhone("914.555.1212");
+// result: (914) 555-1212
+```
+
+### .cshtml files (2sxc Views or RazorHost)
+```csharp
+@using Accuraty.Libraries.AccuLadder
+
+@{
+ string urlSlug = Accu.Web.ToSlug("** Special ** Board Meeting -- Nov 2022);
+ // result: special-board-meeting-nov-2022
+}
+```
+
+### .ascx files (Theme files and user controls)
+```csharp
+<%@ Import Namespace="Accuraty.Libraries.AccuLadder" %>
+
+
+```
+
+
+
+## AccuKit Notes
+AccuKit (in the /App_Code folder) is no longer needed.
+AccuLadder replaces it. To make the transition easy, compatability was added to AccuLadder to support
+the old namespace (AccuKit.) and classes. This means that you can and should install AccuLadder, but
+you need to:
+1. Delete `/App_Code/AccuKit.cshtml`
+2. Search through the project and find all occurrence of `AccuKit.`
+3. At the top each page where it was used, add a `using` statement for `Accuraty.Libraries.AccuLadder` (see examples above)
+4. No other changes should be necessary, see JRF is issues arise
+
+### What about RazorKit, AccuKit11, and others?
+No conflict so far, but in the future, when "replacement compatibility" is added to AccuLadder, the same process
+(as AccuKit above) will apply.
+
+## Roadmap Possibilites and Ideas
+- [ ] How did we lose .IsUrlSpecial() and what is the new method name?
+- [ ] Add more documentation
+- [ ] Add replacement compatibility for RazorKit, AccuKit11, and others
+- [ ] How do we handle /App_Code/AccuTheme.cshtml in the AccuTheme* projects?
+- [ ] Add AccuComponents.Buttons (or move forward on Stencil web components version of AccuComponents)?
+- [ ] .Dev.Log(); add non-ephemeral logging to [files, database, other]? (or use 2sxc logging? or something else (Serilog?))?
+- [ ] .Dnn.[roles]; helpers that work the way Accuraty does
+ - [ ] see IsSM() in BEACN2023; one-offs that define a permission grouping
+ - [ ] new .IsInRoles() that work for lists of RoleId or RoleNames
+ - [ ] above need to support both && and || logic (all or any)
+ - [ ] .GetRoleNameById() and .GetRoleIdByName()
+- [ ] modernize the project as compositional interfaces, IAccuWeb, IAccuText, etc.?
+- [ ] setup so using AccuLadder can be done via Dependency Injection
+- [ ] setup so using AccuLadder can be done using NuGet
+- [ ] Can we implement a terser syntax w/o adding (maintenance) complexity?
+- [ ] Are we really a billion years away from plant/animal semiosis?
+
+## Links to self-docs in the project
+- [README.md](https://github.com/jeremy-farrance/AccuratySolutions-2023/blob/main/Libraries/AccuLadder/README.md)
+- [Release Notes](https://github.com/jeremy-farrance/AccuratySolutions-2023/blob/main/Libraries/AccuLadder/releasenotes.txt)
+- more?
+
+## Accuraty Solutions
+- [Accuraty](https://accuraty.com)
+- [ACCU4](https://accu4.com) - Accuraty's DNN+2sxc reminders, learnings, and related stuff
+- [GitHub/Accuraty](https://github.com/Accuraty)
diff --git a/docfx/templates/README.md b/docfx/templates/README.md
new file mode 100644
index 0000000..408ffb3
--- /dev/null
+++ b/docfx/templates/README.md
@@ -0,0 +1,2 @@
+These started life as exports 20231107 JRF
+https://github.com/mapbox/mapbox-unity-sdk/issues/14#issuecomment-295596387
\ No newline at end of file
diff --git a/docfx/templates/default/ManagedReference.common.js b/docfx/templates/default/ManagedReference.common.js
new file mode 100644
index 0000000..ced8545
--- /dev/null
+++ b/docfx/templates/default/ManagedReference.common.js
@@ -0,0 +1,258 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+var common = require('./common.js');
+var classCategory = 'class';
+var namespaceCategory = 'ns';
+
+exports.transform = function (model) {
+
+ if (!model) return null;
+
+ langs = model.langs;
+ handleItem(model, model._gitContribute, model._gitUrlPattern);
+ if (model.children) {
+ model.children.forEach(function (item) {
+ handleItem(item, model._gitContribute, model._gitUrlPattern);
+ });
+ }
+
+ if (model.type) {
+ switch (model.type.toLowerCase()) {
+ case 'namespace':
+ model.isNamespace = true;
+ if (model.children) groupChildren(model, namespaceCategory);
+ break;
+ case 'class':
+ case 'interface':
+ case 'struct':
+ case 'delegate':
+ case 'enum':
+ model.isClass = true;
+ if (model.children) groupChildren(model, classCategory);
+ model[getTypePropertyName(model.type)] = true;
+ break;
+ default:
+ break;
+ }
+ }
+
+ return model;
+}
+
+exports.getBookmarks = function (model, ignoreChildren) {
+ if (!model || !model.type || model.type.toLowerCase() === "namespace") return null;
+
+ var bookmarks = {};
+
+ if (typeof ignoreChildren == 'undefined' || ignoreChildren === false) {
+ if (model.children) {
+ model.children.forEach(function (item) {
+ bookmarks[item.uid] = common.getHtmlId(item.uid);
+ if (item.overload && item.overload.uid) {
+ bookmarks[item.overload.uid] = common.getHtmlId(item.overload.uid);
+ }
+ });
+ }
+ }
+
+ // Reference's first level bookmark should have no anchor
+ bookmarks[model.uid] = "";
+ return bookmarks;
+}
+
+exports.groupChildren = groupChildren;
+exports.getTypePropertyName = getTypePropertyName;
+exports.getCategory = getCategory;
+
+function groupChildren(model, category) {
+ if (!model || !model.type) {
+ return;
+ }
+ var typeChildrenItems = getDefinitions(category);
+ var grouped = {};
+
+ model.children.forEach(function (c) {
+ if (c.isEii) {
+ var type = "eii";
+ } else {
+ var type = c.type.toLowerCase();
+ }
+ if (!grouped.hasOwnProperty(type)) {
+ grouped[type] = [];
+ }
+ // special handle for field
+ if (type === "field" && c.syntax) {
+ c.syntax.fieldValue = c.syntax.return;
+ c.syntax.return = undefined;
+ }
+ // special handle for property
+ if ((type === "property" || type === "attachedproperty") && c.syntax) {
+ c.syntax.propertyValue = c.syntax.return;
+ c.syntax.return = undefined;
+ }
+ // special handle for event
+ if ((type === "event" || type === "attachedevent") && c.syntax) {
+ c.syntax.eventType = c.syntax.return;
+ c.syntax.return = undefined;
+ }
+ grouped[type].push(c);
+ })
+
+ var children = [];
+ for (var key in typeChildrenItems) {
+ if (typeChildrenItems.hasOwnProperty(key) && grouped.hasOwnProperty(key)) {
+ var typeChildrenItem = typeChildrenItems[key];
+ var items = grouped[key];
+ if (items && items.length > 0) {
+ var item = {};
+ for (var itemKey in typeChildrenItem) {
+ if (typeChildrenItem.hasOwnProperty(itemKey)) {
+ item[itemKey] = typeChildrenItem[itemKey];
+ }
+ }
+ item.children = items;
+ children.push(item);
+ }
+ }
+ }
+
+ model.children = children;
+}
+
+function getTypePropertyName(type) {
+ if (!type) {
+ return undefined;
+ }
+ var loweredType = type.toLowerCase();
+ var definition = getDefinition(loweredType);
+ if (definition) {
+ return definition.typePropertyName;
+ }
+
+ return undefined;
+}
+
+function getCategory(type) {
+ var classItems = getDefinitions(classCategory);
+ if (classItems.hasOwnProperty(type)) {
+ return classCategory;
+ }
+
+ var namespaceItems = getDefinitions(namespaceCategory);
+ if (namespaceItems.hasOwnProperty(type)) {
+ return namespaceCategory;
+ }
+ return undefined;
+}
+
+function getDefinition(type) {
+ var classItems = getDefinitions(classCategory);
+ if (classItems.hasOwnProperty(type)) {
+ return classItems[type];
+ }
+ var namespaceItems = getDefinitions(namespaceCategory);
+ if (namespaceItems.hasOwnProperty(type)) {
+ return namespaceItems[type];
+ }
+ return undefined;
+}
+
+function getDefinitions(category) {
+ var namespaceItems = {
+ "namespace": { inNamespace: true, typePropertyName: "inNamespace", id: "namespaces" },
+ "class": { inClass: true, typePropertyName: "inClass", id: "classes" },
+ "struct": { inStruct: true, typePropertyName: "inStruct", id: "structs" },
+ "interface": { inInterface: true, typePropertyName: "inInterface", id: "interfaces" },
+ "enum": { inEnum: true, typePropertyName: "inEnum", id: "enums" },
+ "delegate": { inDelegate: true, typePropertyName: "inDelegate", id: "delegates" }
+ };
+ var classItems = {
+ "constructor": { inConstructor: true, typePropertyName: "inConstructor", id: "constructors" },
+ "field": { inField: true, typePropertyName: "inField", id: "fields" },
+ "property": { inProperty: true, typePropertyName: "inProperty", id: "properties" },
+ "attachedproperty": { inAttachedProperty: true, typePropertyName: "inAttachedProperty", id: "attachedProperties" },
+ "method": { inMethod: true, typePropertyName: "inMethod", id: "methods" },
+ "event": { inEvent: true, typePropertyName: "inEvent", id: "events" },
+ "attachedevent": { inAttachedEvent: true, typePropertyName: "inAttachedEvent", id: "attachedEvents" },
+ "operator": { inOperator: true, typePropertyName: "inOperator", id: "operators" },
+ "eii": { inEii: true, typePropertyName: "inEii", id: "eii" }
+ };
+ if (category === 'class') {
+ return classItems;
+ }
+ if (category === 'ns') {
+ return namespaceItems;
+ }
+ console.err("category '" + category + "' is not valid.");
+ return undefined;
+}
+
+function handleItem(vm, gitContribute, gitUrlPattern) {
+ // get contribution information
+ vm.docurl = common.getImproveTheDocHref(vm, gitContribute, gitUrlPattern);
+ vm.sourceurl = common.getViewSourceHref(vm, null, gitUrlPattern);
+
+ // set to null incase mustache looks up
+ vm.summary = vm.summary || "";
+ vm.remarks = vm.remarks || "";
+ vm.conceptual = vm.conceptual || "";
+ vm.syntax = vm.syntax || "";
+ vm.implements = vm.implements || "";
+ vm.example = vm.example || "";
+ common.processSeeAlso(vm);
+
+ // id is used as default template's bookmark
+ vm.id = common.getHtmlId(vm.uid);
+ if (vm.overload && vm.overload.uid) {
+ vm.overload.id = common.getHtmlId(vm.overload.uid);
+ }
+
+ if (vm.supported_platforms) {
+ vm.supported_platforms = transformDictionaryToArray(vm.supported_platforms);
+ }
+
+ if (vm.requirements) {
+ var type = vm.type.toLowerCase();
+ if (type == "method") {
+ vm.requirements_method = transformDictionaryToArray(vm.requirements);
+ } else {
+ vm.requirements = transformDictionaryToArray(vm.requirements);
+ }
+ }
+
+ if (vm && langs) {
+ if (shouldHideTitleType(vm)) {
+ vm.hideTitleType = true;
+ } else {
+ vm.hideTitleType = false;
+ }
+
+ if (shouldHideSubtitle(vm)) {
+ vm.hideSubtitle = true;
+ } else {
+ vm.hideSubtitle = false;
+ }
+ }
+
+ function shouldHideTitleType(vm) {
+ var type = vm.type.toLowerCase();
+ return ((type === 'namespace' && langs.length == 1 && (langs[0] === 'objectivec' || langs[0] === 'java' || langs[0] === 'c'))
+ || ((type === 'class' || type === 'enum') && langs.length == 1 && langs[0] === 'c'));
+ }
+
+ function shouldHideSubtitle(vm) {
+ var type = vm.type.toLowerCase();
+ return (type === 'class' || type === 'namespace') && langs.length == 1 && langs[0] === 'c';
+ }
+
+ function transformDictionaryToArray(dic) {
+ var array = [];
+ for (var key in dic) {
+ if (dic.hasOwnProperty(key)) {
+ array.push({ "name": key, "value": dic[key] })
+ }
+ }
+
+ return array;
+ }
+}
diff --git a/docfx/templates/default/ManagedReference.extension.js b/docfx/templates/default/ManagedReference.extension.js
new file mode 100644
index 0000000..740e3b1
--- /dev/null
+++ b/docfx/templates/default/ManagedReference.extension.js
@@ -0,0 +1,16 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+/**
+ * This method will be called at the start of exports.transform in ManagedReference.html.primary.js
+ */
+exports.preTransform = function (model) {
+ return model;
+}
+
+/**
+ * This method will be called at the end of exports.transform in ManagedReference.html.primary.js
+ */
+exports.postTransform = function (model) {
+ return model;
+}
diff --git a/docfx/templates/default/ManagedReference.html.primary.js b/docfx/templates/default/ManagedReference.html.primary.js
new file mode 100644
index 0000000..a7e2650
--- /dev/null
+++ b/docfx/templates/default/ManagedReference.html.primary.js
@@ -0,0 +1,67 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+var common = require('./ManagedReference.common.js');
+var extension = require('./ManagedReference.extension.js');
+var overwrite = require('./ManagedReference.overwrite.js');
+
+exports.transform = function (model) {
+ model.yamlmime = "ManagedReference";
+
+ if (overwrite && overwrite.transform) {
+ return overwrite.transform(model);
+ }
+
+ if (extension && extension.preTransform) {
+ model = extension.preTransform(model);
+ }
+
+ if (common && common.transform) {
+ model = common.transform(model);
+ }
+ if (model.type.toLowerCase() === "enum") {
+ model.isClass = false;
+ model.isEnum = true;
+ }
+ model._disableToc = model._disableToc || !model._tocPath || (model._navPath === model._tocPath);
+ model._disableNextArticle = true;
+
+ if (extension && extension.postTransform) {
+ if (model._splitReference) {
+ model = postTransformMemberPage(model);
+ }
+
+ model = extension.postTransform(model);
+ }
+
+ return model;
+}
+
+exports.getOptions = function (model) {
+ if (overwrite && overwrite.getOptions) {
+ return overwrite.getOptions(model);
+ }
+ var ignoreChildrenBookmarks = model._splitReference && model.type && common.getCategory(model.type) === 'ns';
+
+ return {
+ "bookmarks": common.getBookmarks(model, ignoreChildrenBookmarks)
+ };
+}
+
+function postTransformMemberPage(model) {
+ var type = model.type.toLowerCase();
+ var category = common.getCategory(type);
+ if (category == 'class') {
+ var typePropertyName = common.getTypePropertyName(type);
+ if (typePropertyName) {
+ model[typePropertyName] = true;
+ }
+ if (model.children && model.children.length > 0) {
+ model.isCollection = true;
+ common.groupChildren(model, 'class');
+ } else {
+ model.isItem = true;
+ }
+ }
+ return model;
+}
diff --git a/docfx/templates/default/ManagedReference.html.primary.tmpl b/docfx/templates/default/ManagedReference.html.primary.tmpl
new file mode 100644
index 0000000..22f565f
--- /dev/null
+++ b/docfx/templates/default/ManagedReference.html.primary.tmpl
@@ -0,0 +1,22 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+{{!master(layout/_master.tmpl)}}
+
+{{#isNamespace}}
+ {{>partials/namespace}}
+{{/isNamespace}}
+
+{{#_splitReference}}
+{{#isClass}}
+ {{>partials/class.memberpage}}
+{{/isClass}}
+{{/_splitReference}}
+{{^_splitReference}}
+{{#isClass}}
+ {{>partials/class}}
+{{/isClass}}
+{{/_splitReference}}
+
+{{#isEnum}}
+ {{>partials/enum}}
+{{/isEnum}}
+{{>partials/customMREFContent}}
diff --git a/docfx/templates/default/Redirection.html.primary.tmpl b/docfx/templates/default/Redirection.html.primary.tmpl
new file mode 100644
index 0000000..bd8c4ab
--- /dev/null
+++ b/docfx/templates/default/Redirection.html.primary.tmpl
@@ -0,0 +1,8 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
+
+
+
+
+
diff --git a/docfx/templates/default/RestApi.common.js b/docfx/templates/default/RestApi.common.js
new file mode 100644
index 0000000..cdb0759
--- /dev/null
+++ b/docfx/templates/default/RestApi.common.js
@@ -0,0 +1,372 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+var common = require('./common.js');
+
+exports.transform = function (model) {
+ var _fileNameWithoutExt = common.path.getFileNameWithoutExtension(model._path);
+ model._jsonPath = _fileNameWithoutExt + ".swagger.json";
+ model.title = model.title || model.name;
+ model.docurl = model.docurl || common.getImproveTheDocHref(model, model._gitContribute, model._gitUrlPattern);
+ model.sourceurl = model.sourceurl || common.getViewSourceHref(model, null, model._gitUrlPattern);
+ model.htmlId = common.getHtmlId(model.uid);
+ if (model.children) {
+ for (var i = 0; i < model.children.length; i++) {
+ var child = model.children[i];
+ child.docurl = child.docurl || common.getImproveTheDocHref(child, model._gitContribute, model._gitUrlPattern);
+ if (child.operation) {
+ child.operation = child.operation.toUpperCase();
+ }
+ child.path = appendQueryParamsToPath(child.path, child.parameters);
+ child.sourceurl = child.sourceurl || common.getViewSourceHref(child, null, model._gitUrlPattern);
+ child.conceptual = child.conceptual || ''; // set to empty incase mustache looks up
+ child.summary = child.summary || ''; // set to empty incase mustache looks up
+ child.description = child.description || ''; // set to empty incase mustache looks up
+ child.footer = child.footer || ''; // set to empty incase mustache looks up
+ child.remarks = child.remarks || ''; // set to empty incase mustache looks up
+ child.htmlId = common.getHtmlId(child.uid);
+
+ formatExample(child.responses);
+ resolveAllOf(child);
+ transformReference(child);
+ };
+ if (!model.tags || model.tags.length === 0) {
+ var childTags = [];
+ for (var i = 0; i < model.children.length; i++) {
+ var child = model.children[i];
+ if (child.tags && child.tags.length > 0) {
+ for (var k = 0; k < child.tags.length; k++) {
+ // for each tag in child, add unique tag string into childTags
+ if (childTags.indexOf(child.tags[k]) === -1) {
+ childTags.push(child.tags[k]);
+ }
+ }
+ }
+ }
+ // sort alphabetically
+ childTags.sort();
+ if (childTags.length > 0) {
+ model.tags = [];
+ for (var i = 0; i < childTags.length; i++) {
+ // add tags into model
+ model.tags.push({ "name": childTags[i] });
+ }
+ }
+ }
+ if (model.tags) {
+ for (var i = 0; i < model.tags.length; i++) {
+ var children = getChildrenByTag(model.children, model.tags[i].name);
+ if (children) {
+ // set children into tag section
+ model.tags[i].children = children;
+ }
+ model.tags[i].conceptual = model.tags[i].conceptual || ''; // set to empty incase mustache looks up
+ if (model.tags[i]["x-bookmark-id"]) {
+ model.tags[i].htmlId = model.tags[i]["x-bookmark-id"];
+ } else if (model.tags[i].uid) {
+ model.tags[i].htmlId = common.getHtmlId(model.tags[i].uid);
+ }
+ }
+ for (var i = 0; i < model.children.length; i++) {
+ var child = model.children[i];
+ if (child.includedInTags) {
+ // set child to undefined, which is already moved to tag section
+ model.children[i] = undefined;
+ if (!model.isTagLayout) {
+ // flags to indicate the model is tag layout
+ model.isTagLayout = true;
+ }
+ }
+ }
+ // remove undefined child
+ model.children = model.children.filter(function (o) { return o; });
+ }
+ }
+ model.definitions = [];
+ if (model.tags) {
+ model.tags.forEach(function(tag) {
+ (tag.children || []).forEach(function(child) {
+ (child.parameters || []).forEach(function(parameter) { addComplexTypeMetadata(parameter.schema, model.definitions); });
+ (child.responses || []).forEach(function(response) { addComplexTypeMetadata(response.schema, model.definitions); });
+ });
+ });
+ }
+ if (model.children) {
+ model.children.forEach(function(child) {
+ (child.parameters || []).forEach(function(parameter) { addComplexTypeMetadata(parameter.schema, model.definitions); });
+ (child.responses || []).forEach(function(response) { addComplexTypeMetadata(response.schema, model.definitions); });
+ });
+ }
+
+ return model;
+
+ function getChildrenByTag(children, tag) {
+ if (!children) return;
+ return children.filter(function (child) {
+ if (child.tags && child.tags.indexOf(tag) > -1) {
+ child.includedInTags = true;
+ return true;
+ }
+ })
+ }
+
+ function formatExample(responses) {
+ if (!responses) return;
+ for (var i = responses.length - 1; i >= 0; i--) {
+ var examples = responses[i].examples;
+ if (!examples) continue;
+ for (var j = examples.length - 1; j >= 0; j--) {
+ var content = examples[j].content;
+ if (!content) continue;
+ var mimeType = examples[j].mimeType;
+ if (mimeType === 'application/json') {
+ try {
+ var json = JSON.parse(content)
+ responses[i].examples[j].content = JSON.stringify(json, null, ' ');
+ } catch (e) {
+ console.warn("example is not a valid JSON object.");
+ }
+ }
+ }
+ }
+ }
+
+ function resolveAllOf(obj) {
+ if (Array.isArray(obj)) {
+ for (var i = 0; i < obj.length; i++) {
+ resolveAllOf(obj[i]);
+ }
+ }
+ else if (typeof obj === "object") {
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ if (key === "allOf" && Array.isArray(obj[key])) {
+ // find 'allOf' array and process
+ processAllOfArray(obj[key], obj);
+ // delete 'allOf' value
+ delete obj[key];
+ } else {
+ resolveAllOf(obj[key]);
+ }
+ }
+ }
+ }
+ }
+
+ function processAllOfArray(allOfArray, originalObj) {
+ // for each object in 'allOf' array, merge the values to those in the same level with 'allOf'
+ for (var i = 0; i < allOfArray.length; i++) {
+ var item = allOfArray[i];
+ for (var key in item) {
+ if (originalObj.hasOwnProperty(key)) {
+ mergeObjByKey(originalObj[key], item[key]);
+ } else {
+ originalObj[key] = item[key];
+ }
+ }
+ }
+ }
+
+ function mergeObjByKey(targetObj, sourceObj) {
+ for (var key in sourceObj) {
+ // merge only when target object doesn't define the key
+ if (!targetObj.hasOwnProperty(key)) {
+ targetObj[key] = sourceObj[key];
+ }
+ }
+ }
+
+ function transformReference(obj) {
+ if (Array.isArray(obj)) {
+ for (var i = 0; i < obj.length; i++) {
+ transformReference(obj[i]);
+ }
+ }
+ else if (typeof obj === "object") {
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ if (key === "schema") {
+ // transform schema.properties from obj to key value pair
+ transformProperties(obj[key]);
+ } else {
+ transformReference(obj[key]);
+ }
+ }
+ }
+ }
+ }
+
+ function transformProperties(obj) {
+ if (obj.properties) {
+ if (obj.required && Array.isArray(obj.required)) {
+ for (var i = 0; i < obj.required.length; i++) {
+ var field = obj.required[i];
+ if (obj.properties[field]) {
+ // add required field as property
+ obj.properties[field].required = true;
+ }
+ }
+ delete obj.required;
+ }
+ var array = [];
+ for (var key in obj.properties) {
+ if (obj.properties.hasOwnProperty(key)) {
+ var value = obj.properties[key];
+ // set description to null incase mustache looks up
+ value.description = value.description || null;
+
+ transformPropertiesValue(value);
+ array.push({ key: key, value: value });
+ }
+ }
+ obj.properties = array;
+ }
+ }
+
+ function transformPropertiesValue(obj) {
+ if (obj.type === "array" && obj.items) {
+ // expand array to transformProperties
+ obj.items.properties = obj.items.properties || null;
+ obj.items['x-internal-ref-name'] = obj.items['x-internal-ref-name'] || null;
+ obj.items['x-internal-loop-ref-name'] = obj.items['x-internal-loop-ref-name'] || null;
+ transformProperties(obj.items);
+ } else if (obj.properties && !obj.items) {
+ // fill obj.properties into obj.items.properties, to be rendered in the same way with array
+ obj.items = {};
+ obj.items.properties = obj.properties || null;
+ delete obj.properties;
+ if (obj.required) {
+ obj.items.required = obj.required;
+ delete obj.required;
+ }
+ obj.items['x-internal-ref-name'] = obj['x-internal-ref-name'] || null;
+ obj.items['x-internal-loop-ref-name'] = obj['x-internal-loop-ref-name'] || null;
+ transformProperties(obj.items);
+ }
+ }
+
+ function appendQueryParamsToPath(path, parameters) {
+ if (!path || !parameters) return path;
+
+ var requiredQueryParams = parameters.filter(function (p) { return p.in === 'query' && p.required; });
+ if (requiredQueryParams.length > 0) {
+ path = formatParams(path, requiredQueryParams, true);
+ }
+
+ var optionalQueryParams = parameters.filter(function (p) { return p.in === 'query' && !p.required; });
+ if (optionalQueryParams.length > 0) {
+ path += "[";
+ path = formatParams(path, optionalQueryParams, requiredQueryParams.length === 0);
+ path += "]";
+ }
+ return path;
+ }
+
+ function formatParams(path, parameters, isFirst) {
+ for (var i = 0; i < parameters.length; i++) {
+ if (i === 0 && isFirst) {
+ path += "?";
+ } else {
+ path += "&";
+ }
+ path += parameters[i].name;
+ }
+ return path;
+ }
+
+ function addDefinition(definition, definitions) {
+
+ if (!definition) {
+ return;
+ }
+
+ var xRefName = definition.items && definition.items['x-internal-ref-name']
+ ? definition.items['x-internal-ref-name']
+ : definition['x-internal-ref-name'];
+
+ // Not complex type.
+ if (!xRefName) {
+ return;
+ }
+
+ // Definition already exists return.
+ if (definitions.some(function(d) { return d['x-internal-ref-name'] == xRefName; })) {
+ return;
+ }
+
+ // Create clone to not affect object structure used in original location
+ definition = JSON.parse(JSON.stringify(definition));
+
+ // Unify different object structure to be the same
+
+ // Sometimes properties is under items sometimes not
+ if (definition.items && definition.items.properties) {
+ definition.properties = definition.items.properties;
+ }
+
+ // Sometimes ref-name is under items sometimes not
+ definition['x-internal-ref-name'] = xRefName;
+
+ // Sometimes properties are key/value pairs sometimes not
+ if (definition.properties && !Array.isArray(definition.properties)) {
+ definition.properties = Object.keys(definition.properties).map(function(key) {
+ return {
+ key: key,
+ value: definition.properties[key]
+ }
+ });
+ }
+
+ // Add definition to definitions list.
+ definitions.push(definition);
+
+ // Loop through properties that refer to other definitions.
+ (definition.properties || []).forEach(function(property) {
+ addComplexTypeMetadata(property.value, definitions);
+ });
+ }
+
+ function addComplexTypeMetadata(child, definitions) {
+ // Add variations of x-internal-ref-name to support
+ if (child && child['x-internal-ref-name']) {
+ child.cTypeId = child['x-internal-ref-name'].replace(/\./g, '_');
+ child.cType = child['x-internal-ref-name'].replace(/([A-Z])/g, '$1');
+ }
+ if (child && child.items && child.items['x-internal-ref-name']) {
+ child.cTypeId = child.items['x-internal-ref-name'].replace(/\./g, '_');
+ child.cType = child.items['x-internal-ref-name'].replace(/([A-Z])/g, '$1');
+ child.cTypeIsArray = true;
+ }
+ addDefinition(child, definitions);
+ }
+}
+
+exports.getBookmarks = function (model) {
+ if (!model) return null;
+
+ var bookmarks = {};
+
+ bookmarks[model.uid] = "";
+ if (model.tags) {
+ model.tags.forEach(function (tag) {
+ if (tag.uid) {
+ bookmarks[tag.uid] = tag["x-bookmark-id"] ? tag["x-bookmark-id"] : common.getHtmlId(tag.uid);
+ }
+ if (tag.children) {
+ tag.children.forEach(function (child) {
+ if (child.uid) {
+ bookmarks[child.uid] = common.getHtmlId(child.uid);
+ }
+ })
+ }
+ })
+ }
+ if (model.children) {
+ model.children.forEach(function (child) {
+ if (child.uid) {
+ bookmarks[child.uid] = common.getHtmlId(child.uid);
+ }
+ });
+ }
+
+ return bookmarks;
+}
diff --git a/docfx/templates/default/RestApi.extension.js b/docfx/templates/default/RestApi.extension.js
new file mode 100644
index 0000000..5cf4c92
--- /dev/null
+++ b/docfx/templates/default/RestApi.extension.js
@@ -0,0 +1,16 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+/**
+ * This method will be called at the start of exports.transform in RestApi.html.primary.js
+ */
+exports.preTransform = function (model) {
+ return model;
+}
+
+/**
+ * This method will be called at the end of exports.transform in RestApi.html.primary.js
+ */
+exports.postTransform = function (model) {
+ return model;
+}
diff --git a/docfx/templates/default/RestApi.html.primary.js b/docfx/templates/default/RestApi.html.primary.js
new file mode 100644
index 0000000..c214959
--- /dev/null
+++ b/docfx/templates/default/RestApi.html.primary.js
@@ -0,0 +1,27 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+var restApiCommon = require('./RestApi.common.js');
+var extension = require('./RestApi.extension.js')
+
+exports.transform = function (model) {
+ if (extension && extension.preTransform) {
+ model = extension.preTransform(model);
+ }
+
+ if (restApiCommon && restApiCommon.transform) {
+ model = restApiCommon.transform(model);
+ }
+ model._disableToc = model._disableToc || !model._tocPath || (model._navPath === model._tocPath);
+ model._disableNextArticle = true;
+
+ if (extension && extension.postTransform) {
+ model = extension.postTransform(model);
+ }
+
+ return model;
+}
+
+exports.getOptions = function (model) {
+ return { "bookmarks": restApiCommon.getBookmarks(model) };
+}
diff --git a/docfx/templates/default/RestApi.html.primary.tmpl b/docfx/templates/default/RestApi.html.primary.tmpl
new file mode 100644
index 0000000..6c6a074
--- /dev/null
+++ b/docfx/templates/default/RestApi.html.primary.tmpl
@@ -0,0 +1,3 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+{{!master(layout/_master.tmpl)}}
+{{>partials/rest}}
diff --git a/docfx/templates/default/UniversalReference.common.js b/docfx/templates/default/UniversalReference.common.js
new file mode 100644
index 0000000..a9dbe06
--- /dev/null
+++ b/docfx/templates/default/UniversalReference.common.js
@@ -0,0 +1,319 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+var common = require('./common.js');;
+var classCategory = 'class';
+var namespaceCategory = 'ns';
+
+exports.transform = function (model) {
+ if (!model) return
+
+ handleItem(model, model._gitContribute, model._gitUrlPattern);
+ if (model.children) {
+ normalizeLanguageValuePairs(model.children).forEach(function (item) {
+ handleItem(item, model._gitContribute, model._gitUrlPattern);
+ });
+ };
+
+ if (model.type) {
+ switch (model.type.toLowerCase()) {
+ // packages and namespaces are both containers for other elements
+ case 'package':
+ case 'namespace':
+ model.isNamespace = true;
+ if (model.children) groupChildren(model, namespaceCategory);
+ model[getTypePropertyName(model.type)] = true;
+ break;
+ case 'class':
+ case 'interface':
+ case 'struct':
+ case 'delegate':
+ model.isClass = true;
+ if (model.children) groupChildren(model, classCategory);
+ model[getTypePropertyName(model.type)] = true;
+ break;
+ case 'enum':
+ model.isEnum = true;
+ if (model.children) groupChildren(model, classCategory);
+ model[getTypePropertyName(model.type)] = true;
+ break;
+ default:
+ break;
+ }
+ }
+
+ return model;
+}
+
+exports.getBookmarks = function (model, ignoreChildren) {
+ if (!model || !model.type || model.type.toLowerCase() === "namespace") return null;
+
+ var bookmarks = {};
+
+ if (typeof ignoreChildren == 'undefined' || ignoreChildren === false) {
+ if (model.children) {
+ normalizeLanguageValuePairs(model.children).forEach(function (item) {
+ bookmarks[item.uid] = common.getHtmlId(item.uid);
+ if (item.overload && item.overload.uid) {
+ bookmarks[item.overload.uid] = common.getHtmlId(item.overload.uid);
+ }
+ });
+ }
+ }
+
+ // Reference's first level bookmark should have no anchor
+ bookmarks[model.uid] = "";
+ return bookmarks;
+}
+
+function handleItem(vm, gitContribute, gitUrlPattern) {
+ // get contribution information
+ vm.docurl = common.getImproveTheDocHref(vm, gitContribute, gitUrlPattern);
+ vm.sourceurl = common.getViewSourceHref(vm, null, gitUrlPattern);
+
+ // set to null incase mustache looks up
+ vm.summary = vm.summary || null;
+ vm.remarks = vm.remarks || null;
+ vm.conceptual = vm.conceptual || null;
+ vm.syntax = vm.syntax || null;
+ vm.implements = vm.implements || null;
+ vm.example = vm.example || null;
+ vm.inheritance = vm.inheritance || null;
+ if (vm.inheritance) {
+ normalizeLanguageValuePairs(vm.inheritance).forEach(handleInheritance);
+ }
+
+ common.processSeeAlso(vm);
+
+ // id is used as default template's bookmark
+ vm.id = common.getHtmlId(vm.uid);
+ if (vm.overload && vm.overload.uid) {
+ vm.overload.id = common.getHtmlId(vm.overload.uid);
+ }
+
+ // concatenate multiple types with `|`
+ if (vm.syntax) {
+ var syntax = vm.syntax;
+ if (syntax.parameters) {
+ syntax.parameters = syntax.parameters.map(function (p) {
+ return joinType(p);
+ })
+ syntax.parameters = groupParameters(syntax.parameters);
+ }
+ if (syntax.return) {
+ syntax.return = joinType(syntax.return);
+ }
+ }
+}
+
+function handleInheritance(tree) {
+ tree.type = tree.type || null;
+ tree.inheritance = tree.inheritance || null;
+ if (tree.inheritance) {
+ tree.inheritance.forEach(handleInheritance);
+ }
+}
+
+function joinType(parameter) {
+ // change type in syntax from array to string
+ var joinTypeProperty = function (type, key) {
+ if (!type || !type[0] || !type[0][key]) return null;
+ var value = type.map(function (t) {
+ if (!t) return null;
+ if (!t[key]) return t.uid;
+ return t[key][0].value;
+ }).join(' | ');
+ return [{
+ lang: type[0][key][0].lang,
+ value: value
+ }];
+ };
+ if (parameter.type) {
+ parameter.type = {
+ name: joinTypeProperty(parameter.type, "name"),
+ nameWithType: joinTypeProperty(parameter.type, "nameWithType"),
+ fullName: joinTypeProperty(parameter.type, "fullName"),
+ specName: joinTypeProperty(parameter.type, "specName")
+ }
+ }
+ return parameter;
+}
+
+function groupParameters(parameters) {
+ // group parameter with properties
+ if (!parameters || parameters.length == 0) return parameters;
+ var groupedParameters = [];
+ var stack = [];
+ for (var i = 0; i < parameters.length; i++) {
+ var parameter = parameters[i];
+ parameter.properties = null;
+ var prefixLength = 0;
+ while (stack.length > 0) {
+ var top = stack.pop();
+ var prefix = top.id + '.';
+ if (parameter.id.indexOf(prefix) == 0) {
+ prefixLength = prefix.length;
+ if (!top.parameter.properties) {
+ top.parameter.properties = [];
+ }
+ top.parameter.properties.push(parameter);
+ stack.push(top);
+ break;
+ }
+ if (stack.length == 0) {
+ groupedParameters.push(top.parameter);
+ }
+ }
+ stack.push({ id: parameter.id, parameter: parameter });
+ parameter.id = parameter.id.substring(prefixLength);
+ }
+ while (stack.length > 0) {
+ top = stack.pop();
+ }
+ groupedParameters.push(top.parameter);
+ return groupedParameters;
+}
+
+function groupChildren(model, category, typeChildrenItems) {
+ if (!model || !model.type) {
+ return;
+ }
+ if (!typeChildrenItems) {
+ var typeChildrenItems = getDefinitions(category);
+ }
+ var grouped = {};
+
+ normalizeLanguageValuePairs(model.children).forEach(function (c) {
+ if (c.isEii) {
+ var type = "eii";
+ } else {
+ var type = c.type.toLowerCase();
+ }
+ if (!grouped.hasOwnProperty(type)) {
+ grouped[type] = [];
+ }
+ // special handle for field
+ if (type === "field" && c.syntax) {
+ c.syntax.fieldValue = c.syntax.return;
+ c.syntax.return = undefined;
+ }
+ // special handle for property
+ if (type === "property" && c.syntax) {
+ c.syntax.propertyValue = c.syntax.return;
+ c.syntax.return = undefined;
+ }
+ // special handle for event
+ if (type === "event" && c.syntax) {
+ c.syntax.eventType = c.syntax.return;
+ c.syntax.return = undefined;
+ }
+ if (type === "variable" && c.syntax) {
+ c.syntax.variableValue = c.syntax.return;
+ c.syntax.return = undefined;
+ }
+ if (type === "typealias" && c.syntax) {
+ c.syntax.typeAliasType = c.syntax.return;
+ c.syntax.return = undefined;
+ }
+ grouped[type].push(c);
+ })
+
+ var children = [];
+ for (var key in typeChildrenItems) {
+ if (typeChildrenItems.hasOwnProperty(key) && grouped.hasOwnProperty(key)) {
+ var typeChildrenItem = typeChildrenItems[key];
+ var items = grouped[key];
+ if (items && items.length > 0) {
+ var item = {};
+ for (var itemKey in typeChildrenItem) {
+ if (typeChildrenItem.hasOwnProperty(itemKey)){
+ item[itemKey] = typeChildrenItem[itemKey];
+ }
+ }
+ item.children = items;
+ children.push(item);
+ }
+ }
+ }
+
+ model.children = children;
+}
+
+function getTypePropertyName(type) {
+ if (!type) {
+ return undefined;
+ }
+ var loweredType = type.toLowerCase();
+ var definition = getDefinition(loweredType);
+ if (definition) {
+ return definition.typePropertyName;
+ }
+
+ return undefined;
+}
+
+function getCategory(type) {
+ var classItems = getDefinitions(classCategory);
+ if (classItems.hasOwnProperty(type)) {
+ return classCategory;
+ }
+
+ var namespaceItems = getDefinitions(namespaceCategory);
+ if (namespaceItems.hasOwnProperty(type)) {
+ return namespaceCategory;
+ }
+ return undefined;
+}
+
+function getDefinition(type) {
+ var classItems = getDefinitions(classCategory);
+ if (classItems.hasOwnProperty(type)) {
+ return classItems[type];
+ }
+ var namespaceItems = getDefinitions(namespaceCategory);
+ if (namespaceItems.hasOwnProperty(type)) {
+ return namespaceItems[type];
+ }
+ return undefined;
+}
+
+function getDefinitions(category) {
+ var namespaceItems = {
+ "package": { inPackage: true, typePropertyName: "inPackage", id: "packages" },
+ "namespace": { inNamespace: true, typePropertyName: "inNamespace", id: "namespaces" },
+ "class": { inClass: true, typePropertyName: "inClass", id: "classes" },
+ "struct": { inStruct: true, typePropertyName: "inStruct", id: "structs" },
+ "interface": { inInterface: true, typePropertyName: "inInterface", id: "interfaces" },
+ "enum": { inEnum: true, typePropertyName: "inEnum", id: "enums" },
+ "delegate": { inDelegate: true, typePropertyName: "inDelegate", id: "delegates" },
+ "function": { inFunction: true, typePropertyName: "inFunction", id: "functions", isEmbedded: true },
+ "variable": { inVariable: true, typePropertyName: "inVariable", id: "variables", isEmbedded: true },
+ "typealias": { inTypeAlias: true, typePropertyName: "inTypeAlias", id: "typealiases", isEmbedded: true },
+ };
+ var classItems = {
+ "constructor": { inConstructor: true, typePropertyName: "inConstructor", id: "constructors" },
+ "field": { inField: true, typePropertyName: "inField", id: "fields" },
+ "property": { inProperty: true, typePropertyName: "inProperty", id: "properties" },
+ "method": { inMethod: true, typePropertyName: "inMethod", id: "methods" },
+ "event": { inEvent: true, typePropertyName: "inEvent", id: "events" },
+ "operator": { inOperator: true, typePropertyName: "inOperator", id: "operators" },
+ "eii": { inEii: true, typePropertyName: "inEii", id: "eii" },
+ "member": { inMember: true, typePropertyName: "inMember", id: "members"},
+ "function": { inFunction: true, typePropertyName: "inFunction", id: "functions" }
+ };
+ if (category === 'class') {
+ return classItems;
+ }
+ if (category === 'ns') {
+ return namespaceItems;
+ }
+ console.err("category '" + category + "' is not valid.");
+ return undefined;
+}
+
+function normalizeLanguageValuePairs(list) {
+ if (list[0] && list[0].lang && list[0].value) {
+ return list[0].value;
+ }
+ return list;
+}
diff --git a/docfx/templates/default/UniversalReference.extension.js b/docfx/templates/default/UniversalReference.extension.js
new file mode 100644
index 0000000..5867c38
--- /dev/null
+++ b/docfx/templates/default/UniversalReference.extension.js
@@ -0,0 +1,16 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+/**
+ * This method will be called at the start of exports.transform in UniversalReference.html.primary.js
+ */
+exports.preTransform = function (model) {
+ return model;
+}
+
+/**
+ * This method will be called at the end of exports.transform in UniversalReference.html.primary.js
+ */
+exports.postTransform = function (model) {
+ return model;
+}
diff --git a/docfx/templates/default/UniversalReference.html.primary.js b/docfx/templates/default/UniversalReference.html.primary.js
new file mode 100644
index 0000000..121b48f
--- /dev/null
+++ b/docfx/templates/default/UniversalReference.html.primary.js
@@ -0,0 +1,30 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+var urefCommon = require('./UniversalReference.common.js');
+var extension = require('./UniversalReference.extension.js');
+
+exports.transform = function (model) {
+ if (extension && extension.preTransform) {
+ model = extension.preTransform(model);
+ }
+
+ if (urefCommon && urefCommon.transform) {
+ model = urefCommon.transform(model);
+ }
+
+ model._disableToc = model._disableToc || !model._tocPath || (model._navPath === model._tocPath);
+ model._disableNextArticle = true;
+
+ if (extension && extension.postTransform) {
+ model = extension.postTransform(model);
+ }
+
+ return model;
+}
+
+exports.getOptions = function (model) {
+ return {
+ "bookmarks": urefCommon.getBookmarks(model)
+ };
+}
diff --git a/docfx/templates/default/UniversalReference.html.primary.tmpl b/docfx/templates/default/UniversalReference.html.primary.tmpl
new file mode 100644
index 0000000..d2b1b2f
--- /dev/null
+++ b/docfx/templates/default/UniversalReference.html.primary.tmpl
@@ -0,0 +1,12 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+{{!master(layout/_master.tmpl)}}
+
+{{#isNamespace}}
+ {{>partials/uref/namespace}}
+{{/isNamespace}}
+{{#isClass}}
+ {{>partials/uref/class}}
+{{/isClass}}
+{{#isEnum}}
+ {{>partials/enum}}
+{{/isEnum}}
diff --git a/docfx/templates/default/accu-logo.svg b/docfx/templates/default/accu-logo.svg
new file mode 100644
index 0000000..3f38a7d
--- /dev/null
+++ b/docfx/templates/default/accu-logo.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docfx/templates/default/common.js b/docfx/templates/default/common.js
new file mode 100644
index 0000000..1797700
--- /dev/null
+++ b/docfx/templates/default/common.js
@@ -0,0 +1,240 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+exports.path = {};
+exports.path.getFileNameWithoutExtension = getFileNameWithoutExtension;
+exports.path.getDirectoryName = getDirectoryName;
+
+exports.getHtmlId = getHtmlId;
+
+exports.getViewSourceHref = getViewSourceHref;
+exports.getImproveTheDocHref = getImproveTheDocHref;
+exports.processSeeAlso = processSeeAlso;
+
+exports.isAbsolutePath = isAbsolutePath;
+exports.isRelativePath = isRelativePath;
+
+function getFileNameWithoutExtension(path) {
+ if (!path || path[path.length - 1] === '/' || path[path.length - 1] === '\\') return '';
+ var fileName = path.split('\\').pop().split('/').pop();
+ return fileName.slice(0, fileName.lastIndexOf('.'));
+}
+
+function getDirectoryName(path) {
+ if (!path) return '';
+ var index = path.lastIndexOf('/');
+ return path.slice(0, index + 1);
+}
+
+function getHtmlId(input) {
+ if (!input) return '';
+ return input.replace(/\W/g, '_');
+}
+
+// Note: the parameter `gitContribute` won't be used in this function
+function getViewSourceHref(item, gitContribute, gitUrlPattern) {
+ if (!item || !item.source) return '';
+ if (item.source.href) return item.source.href;
+ if (!item.source.remote) return '';
+ return getRemoteUrl(item.source.remote, item.source.startLine - '0' + 1, null, gitUrlPattern);
+}
+
+function getImproveTheDocHref(item, gitContribute, gitUrlPattern) {
+ if (!item) return '';
+ if (!item.documentation || !item.documentation.remote) {
+ return getNewFileUrl(item, gitContribute, gitUrlPattern);
+ } else {
+ return getRemoteUrl(item.documentation.remote, item.documentation.startLine + 1, gitContribute, gitUrlPattern);
+ }
+}
+
+function processSeeAlso(item) {
+ if (item.seealso) {
+ for (var key in item.seealso) {
+ addIsCref(item.seealso[key]);
+ }
+ }
+ item.seealso = item.seealso || null;
+}
+
+function isAbsolutePath(path) {
+ return /^(\w+:)?\/\//g.test(path);
+}
+
+function isRelativePath(path) {
+ if (!path) return false;
+ return !exports.isAbsolutePath(path);
+}
+
+var gitUrlPatternItems = {
+ 'github': {
+ // HTTPS form: https://github.com/{org}/{repo}.git
+ // SSH form: git@github.com:{org}/{repo}.git
+ // generate URL: https://github.com/{org}/{repo}/blob/{branch}/{path}
+ 'testRegex': /^(https?:\/\/)?(\S+\@)?(\S+\.)?github\.com(\/|:).*/i,
+ 'generateUrl': function (gitInfo) {
+ var url = normalizeGitUrlToHttps(gitInfo.repo);
+ url = getRepoWithoutGitExtension(url);
+ url += '/blob' + '/' + gitInfo.branch + '/' + gitInfo.path;
+ if (gitInfo.startLine && gitInfo.startLine > 0) {
+ url += '/#L' + gitInfo.startLine;
+ }
+ return url;
+ },
+ 'generateNewFileUrl': function (gitInfo, uid) {
+ var url = normalizeGitUrlToHttps(gitInfo.repo);
+ url = getRepoWithoutGitExtension(url);
+ url += '/new';
+ url += '/' + gitInfo.branch;
+ url += '/' + getOverrideFolder(gitInfo.apiSpecFolder);
+ url += '/new?filename=' + getHtmlId(uid) + '.md';
+ url += '&value=' + encodeURIComponent(getOverrideTemplate(uid));
+ return url;
+ }
+ },
+ 'vso': {
+ // HTTPS form: https://{account}@dev.azure.com/{account}/{project}/_git/{repo}
+ // HTTPS form: https://{user}.visualstudio.com/{org}/_git/{repo}
+ // SSH form: git@ssh.dev.azure.com:v3/{account}/{project}/{repo}
+ // SSH form: ssh://{user}@{user}.visualstudio.com:22/{org}/_git/{repo}
+ // generated URL under branch: https://{account}@dev.azure.com/{account}/{project}/_git/{repo}?version=GB{branch}
+ // generated URL under branch: https://{user}.visualstudio.com/{org}/_git/{repo}?path={path}&version=GB{branch}
+ // generated URL under detached HEAD: https://{user}.visualstudio.com/{org}/_git/{repo}?path={path}&version=GC{commit}
+ 'testRegex': /^(https?:\/\/)?(ssh:\/\/\S+\@)?(\S+@)?(\S+\.)?(dev\.azure|visualstudio)\.com(\/|:).*/i,
+ 'generateUrl': function (gitInfo) {
+ var url = normalizeGitUrlToHttps(gitInfo.repo);
+ var branchPrefix = /[0-9a-fA-F]{40}/.test(gitInfo.branch) ? 'GC' : 'GB';
+ url += '?path=' + gitInfo.path + '&version=' + branchPrefix + gitInfo.branch;
+ if (gitInfo.startLine && gitInfo.startLine > 0) {
+ url += '&line=' + gitInfo.startLine;
+ }
+ return url;
+ },
+ 'generateNewFileUrl': function (gitInfo, uid) {
+ return '';
+ }
+ },
+ 'bitbucket': {
+ // HTTPS form: https://{user}@bitbucket.org/{org}/{repo}.git
+ // SSH form: git@bitbucket.org:{org}/{repo}.git
+ // generate URL: https://bitbucket.org/{org}/{repo}/src/{branch}/{path}
+ 'testRegex': /^(https?:\/\/)?(\S+\@)?(\S+\.)?bitbucket\.org(\/|:).*/i,
+ 'generateUrl': function (gitInfo) {
+ var url = normalizeGitUrlToHttps(gitInfo.repo);
+ url = getRepoWithoutGitExtension(url);
+ url += '/src' + '/' + gitInfo.branch + '/' + gitInfo.path;
+ if (gitInfo.startLine && gitInfo.startLine > 0) {
+ url += '#lines-' + gitInfo.startLine;
+ }
+ return url;
+ },
+ 'generateNewFileUrl': function (gitInfo, uid) {
+ return '';
+ }
+ }
+}
+
+function getRepoWithoutGitExtension(repo) {
+ if (repo.substr(-4) === '.git') {
+ repo = repo.substr(0, repo.length - 4);
+ }
+ return repo;
+}
+
+function normalizeGitUrlToHttps(repo) {
+ var pos = repo.indexOf('@');
+ if (pos == -1) return repo;
+ return 'https://' + repo.substr(pos + 1).replace(/:[0-9]+/g, '').replace(/:/g, '/');
+}
+
+function getNewFileUrl(item, gitContribute, gitUrlPattern) {
+ // do not support VSO for now
+ if (!item.source) {
+ return '';
+ }
+
+ var gitInfo = getGitInfo(gitContribute, item.source.remote);
+ if (!gitInfo.repo || !gitInfo.branch || !gitInfo.path) {
+ return '';
+ }
+
+ var patternName = getPatternName(gitInfo.repo, gitUrlPattern);
+ if (!patternName) return patternName;
+ return gitUrlPatternItems[patternName].generateNewFileUrl(gitInfo, item.uid);
+}
+
+function getRemoteUrl(remote, startLine, gitContribute, gitUrlPattern) {
+ var gitInfo = getGitInfo(gitContribute, remote);
+ if (!gitInfo.repo || !gitInfo.branch || !gitInfo.path) {
+ return '';
+ }
+
+ var patternName = getPatternName(gitInfo.repo, gitUrlPattern);
+ if (!patternName) return '';
+
+ gitInfo.startLine = startLine;
+ return gitUrlPatternItems[patternName].generateUrl(gitInfo);
+}
+
+function getGitInfo(gitContribute, gitRemote) {
+ // apiSpecFolder defines the folder contains overwrite files for MRef, the default value is apiSpec
+ var defaultApiSpecFolder = 'apiSpec';
+
+ var result = {};
+ if (gitContribute && gitContribute.apiSpecFolder) {
+ result.apiSpecFolder = gitContribute.apiSpecFolder;
+ } else {
+ result.apiSpecFolder = defaultApiSpecFolder;
+ }
+ mergeKey(gitContribute, gitRemote, result, 'repo');
+ mergeKey(gitContribute, gitRemote, result, 'branch');
+ mergeKey(gitContribute, gitRemote, result, 'path');
+
+ return result;
+
+ function mergeKey(source, sourceFallback, dest, key) {
+ if (source && source.hasOwnProperty(key)) {
+ dest[key] = source[key];
+ } else if (sourceFallback && sourceFallback.hasOwnProperty(key)) {
+ dest[key] = sourceFallback[key];
+ }
+ }
+}
+
+function getPatternName(repo, gitUrlPattern) {
+ if (gitUrlPattern && gitUrlPattern.toLowerCase() in gitUrlPatternItems) {
+ return gitUrlPattern.toLowerCase();
+ } else {
+ for (var p in gitUrlPatternItems) {
+ if (gitUrlPatternItems[p].testRegex.test(repo)) {
+ return p;
+ }
+ }
+ }
+ return '';
+}
+
+function getOverrideFolder(path) {
+ if (!path) return "";
+ path = path.replace(/\\/g, '/');
+ if (path.charAt(path.length - 1) == '/') path = path.substring(0, path.length - 1);
+ return path;
+}
+
+function getOverrideTemplate(uid) {
+ if (!uid) return "";
+ var content = "";
+ content += "---\n";
+ content += "uid: " + uid + "\n";
+ content += "summary: '*You can override summary for the API here using *MARKDOWN* syntax'\n";
+ content += "---\n";
+ content += "\n";
+ content += "*Please type below more information about this API:*\n";
+ content += "\n";
+ return content;
+}
+
+function addIsCref(seealso) {
+ if (!seealso.linkType || seealso.linkType.toLowerCase() == "cref") {
+ seealso.isCref = true;
+ }
+}
diff --git a/docfx/templates/default/conceptual.extension.js b/docfx/templates/default/conceptual.extension.js
new file mode 100644
index 0000000..1a5532c
--- /dev/null
+++ b/docfx/templates/default/conceptual.extension.js
@@ -0,0 +1,16 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+/**
+ * This method will be called at the start of exports.transform in conceptual.html.primary.js
+ */
+exports.preTransform = function (model) {
+ return model;
+}
+
+/**
+ * This method will be called at the end of exports.transform in conceptual.html.primary.js
+ */
+exports.postTransform = function (model) {
+ return model;
+}
diff --git a/docfx/templates/default/conceptual.html.primary.js b/docfx/templates/default/conceptual.html.primary.js
new file mode 100644
index 0000000..b06e0c3
--- /dev/null
+++ b/docfx/templates/default/conceptual.html.primary.js
@@ -0,0 +1,20 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+var common = require('./common.js');
+var extension = require('./conceptual.extension.js')
+
+exports.transform = function (model) {
+ if (extension && extension.preTransform) {
+ model = extension.preTransform(model);
+ }
+
+ model._disableToc = model._disableToc || !model._tocPath || (model._navPath === model._tocPath);
+ model.docurl = model.docurl || common.getImproveTheDocHref(model, model._gitContribute, model._gitUrlPattern);
+
+ if (extension && extension.postTransform) {
+ model = extension.postTransform(model);
+ }
+
+ return model;
+}
diff --git a/docfx/templates/default/conceptual.html.primary.tmpl b/docfx/templates/default/conceptual.html.primary.tmpl
new file mode 100644
index 0000000..18b3789
--- /dev/null
+++ b/docfx/templates/default/conceptual.html.primary.tmpl
@@ -0,0 +1,4 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+{{!master(layout/_master.tmpl)}}
+{{{rawTitle}}}
+{{{conceptual}}}
diff --git a/docfx/templates/default/favicon.ico b/docfx/templates/default/favicon.ico
new file mode 100644
index 0000000..71570f6
Binary files /dev/null and b/docfx/templates/default/favicon.ico differ
diff --git a/docfx/templates/default/layout/_master.tmpl b/docfx/templates/default/layout/_master.tmpl
new file mode 100644
index 0000000..8fbfd06
--- /dev/null
+++ b/docfx/templates/default/layout/_master.tmpl
@@ -0,0 +1,57 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+{{!include(/^styles/.*/)}}
+{{!include(/^fonts/.*/)}}
+{{!include(favicon.ico)}}
+{{!include(accu-logo.svg)}}
+{{!include(search-stopwords.json)}}
+
+
+
+ {{>partials/head}}
+ {{^redirect_url}}
+
+
+ {{>partials/scripts}}
+
+ {{/redirect_url}}
+
diff --git a/docfx/templates/default/logo.svg b/docfx/templates/default/logo.svg
new file mode 100644
index 0000000..ccb2d7b
--- /dev/null
+++ b/docfx/templates/default/logo.svg
@@ -0,0 +1,25 @@
+
+
+
diff --git a/docfx/templates/default/partials/affix.tmpl.partial b/docfx/templates/default/partials/affix.tmpl.partial
new file mode 100644
index 0000000..92d5d31
--- /dev/null
+++ b/docfx/templates/default/partials/affix.tmpl.partial
@@ -0,0 +1,26 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
diff --git a/docfx/templates/default/partials/breadcrumb.tmpl.partial b/docfx/templates/default/partials/breadcrumb.tmpl.partial
new file mode 100644
index 0000000..5e9367c
--- /dev/null
+++ b/docfx/templates/default/partials/breadcrumb.tmpl.partial
@@ -0,0 +1,9 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
+
+
+
{{_tocTitle}}
+
+
+
diff --git a/docfx/templates/default/partials/class.header.tmpl.partial b/docfx/templates/default/partials/class.header.tmpl.partial
new file mode 100644
index 0000000..d743484
--- /dev/null
+++ b/docfx/templates/default/partials/class.header.tmpl.partial
@@ -0,0 +1,121 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
+{{/example.0}}
+{{#example}}
+{{{.}}}
+{{/example}}
diff --git a/docfx/templates/default/partials/class.memberpage.tmpl.partial b/docfx/templates/default/partials/class.memberpage.tmpl.partial
new file mode 100644
index 0000000..54ce161
--- /dev/null
+++ b/docfx/templates/default/partials/class.memberpage.tmpl.partial
@@ -0,0 +1,59 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+{{>partials/class.header}}
+{{#children}}
+{{#overload}}
+
+{{/overload}}
+
+{{/seealso.0}}
diff --git a/docfx/templates/default/partials/class.tmpl.partial b/docfx/templates/default/partials/class.tmpl.partial
new file mode 100644
index 0000000..6b61910
--- /dev/null
+++ b/docfx/templates/default/partials/class.tmpl.partial
@@ -0,0 +1,234 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+{{>partials/class.header}}
+{{#children}}
+
+{{/seealso.0}}
diff --git a/docfx/templates/default/partials/classSubtitle.tmpl.partial b/docfx/templates/default/partials/classSubtitle.tmpl.partial
new file mode 100644
index 0000000..1c17e00
--- /dev/null
+++ b/docfx/templates/default/partials/classSubtitle.tmpl.partial
@@ -0,0 +1,28 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+{{#inConstructor}}
+{{__global.constructorsInSubtitle}}
+{{/inConstructor}}
+{{#inField}}
+{{__global.fieldsInSubtitle}}
+{{/inField}}
+{{#inProperty}}
+{{__global.propertiesInSubtitle}}
+{{/inProperty}}
+{{#inMethod}}
+{{__global.methodsInSubtitle}}
+{{/inMethod}}
+{{#inEvent}}
+{{__global.eventsInSubtitle}}
+{{/inEvent}}
+{{#inOperator}}
+{{__global.operatorsInSubtitle}}
+{{/inOperator}}
+{{#inEii}}
+{{__global.eiisInSubtitle}}
+{{/inEii}}
+{{#inFunction}}
+{{__global.functionsInSubtitle}}
+{{/inFunction}}
+{{#inMember}}
+{{__global.membersInSubtitle}}
+{{/inMember}}
diff --git a/docfx/templates/default/partials/collection.tmpl.partial b/docfx/templates/default/partials/collection.tmpl.partial
new file mode 100644
index 0000000..7e573f8
--- /dev/null
+++ b/docfx/templates/default/partials/collection.tmpl.partial
@@ -0,0 +1,234 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
+{{/seealso.0}}
diff --git a/docfx/templates/default/partials/customMREFContent.tmpl.partial b/docfx/templates/default/partials/customMREFContent.tmpl.partial
new file mode 100644
index 0000000..abb7b6f
--- /dev/null
+++ b/docfx/templates/default/partials/customMREFContent.tmpl.partial
@@ -0,0 +1,10 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+{{!Add your own custom template for the content for ManagedReference here}}
+{{#_splitReference}}
+{{#isCollection}}
+{{>partials/collection}}
+{{/isCollection}}
+{{#isItem}}
+{{>partials/item}}
+{{/isItem}}
+{{/_splitReference}}
diff --git a/docfx/templates/default/partials/dd-li.tmpl.partial b/docfx/templates/default/partials/dd-li.tmpl.partial
new file mode 100644
index 0000000..75636c2
--- /dev/null
+++ b/docfx/templates/default/partials/dd-li.tmpl.partial
@@ -0,0 +1,3 @@
+{{#items}}
+
+{{/items}}
diff --git a/docfx/templates/default/partials/enum.tmpl.partial b/docfx/templates/default/partials/enum.tmpl.partial
new file mode 100644
index 0000000..7afb282
--- /dev/null
+++ b/docfx/templates/default/partials/enum.tmpl.partial
@@ -0,0 +1,50 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+{{>partials/class.header}}
+{{#children}}
+
+{{/extensionMethods}}
diff --git a/docfx/templates/default/partials/footer.tmpl.partial b/docfx/templates/default/partials/footer.tmpl.partial
new file mode 100644
index 0000000..cff40ee
--- /dev/null
+++ b/docfx/templates/default/partials/footer.tmpl.partial
@@ -0,0 +1,14 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
diff --git a/docfx/templates/default/partials/head.tmpl.partial b/docfx/templates/default/partials/head.tmpl.partial
new file mode 100644
index 0000000..2853cad
--- /dev/null
+++ b/docfx/templates/default/partials/head.tmpl.partial
@@ -0,0 +1,33 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
+
+ {{#_googleAnalyticsTagId}}
+
+
+ {{/_googleAnalyticsTagId}}
+ {{#redirect_url}}
+
+ {{/redirect_url}}
+ {{^redirect_url}}
+
+ {{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}
+
+
+ {{#_description}}{{/_description}}
+
+
+
+
+
+
+ {{#_noindex}}{{/_noindex}}
+ {{#_enableSearch}}{{/_enableSearch}}
+ {{#_enableNewTab}}{{/_enableNewTab}}
+ {{/redirect_url}}
+
diff --git a/docfx/templates/default/partials/item.tmpl.partial b/docfx/templates/default/partials/item.tmpl.partial
new file mode 100644
index 0000000..547889a
--- /dev/null
+++ b/docfx/templates/default/partials/item.tmpl.partial
@@ -0,0 +1,3 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+{{>partials/class.header}}
diff --git a/docfx/templates/default/partials/li.tmpl.partial b/docfx/templates/default/partials/li.tmpl.partial
new file mode 100644
index 0000000..c6e0b4a
--- /dev/null
+++ b/docfx/templates/default/partials/li.tmpl.partial
@@ -0,0 +1,30 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
diff --git a/docfx/templates/default/partials/logo.tmpl.partial b/docfx/templates/default/partials/logo.tmpl.partial
new file mode 100644
index 0000000..7fc32d0
--- /dev/null
+++ b/docfx/templates/default/partials/logo.tmpl.partial
@@ -0,0 +1,5 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
+
+
diff --git a/docfx/templates/default/partials/namespace.tmpl.partial b/docfx/templates/default/partials/namespace.tmpl.partial
new file mode 100644
index 0000000..f52f692
--- /dev/null
+++ b/docfx/templates/default/partials/namespace.tmpl.partial
@@ -0,0 +1,13 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
{{>partials/title}}
+
{{{summary}}}
+
{{{conceptual}}}
+
{{{remarks}}}
+{{#children}}
+
{{>partials/namespaceSubtitle}}
+ {{#children}}
+
+ {{{summary}}}
+ {{/children}}
+{{/children}}
diff --git a/docfx/templates/default/partials/namespaceSubtitle.tmpl.partial b/docfx/templates/default/partials/namespaceSubtitle.tmpl.partial
new file mode 100644
index 0000000..823597b
--- /dev/null
+++ b/docfx/templates/default/partials/namespaceSubtitle.tmpl.partial
@@ -0,0 +1,29 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+{{#inNamespace}}
+{{__global.namespacesInSubtitle}}
+{{/inNamespace}}
+{{#inClass}}
+{{__global.classesInSubtitle}}
+{{/inClass}}
+{{#inStruct}}
+{{__global.structsInSubtitle}}
+{{/inStruct}}
+{{#inInterface}}
+{{__global.interfacesInSubtitle}}
+{{/inInterface}}
+{{#inEnum}}
+{{__global.enumsInSubtitle}}
+{{/inEnum}}
+{{#inDelegate}}
+{{__global.delegatesInSubtitle}}
+{{/inDelegate}}
+{{#inFunction}}
+{{__global.functionsInSubtitle}}
+{{/inFunction}}
+{{#inVariable}}
+{{__global.variablesInSubtitle}}
+{{/inVariable}}
+{{#inTypeAlias}}
+{{__global.typeAliasesInSubtitle}}
+{{/inTypeAlias}}
diff --git a/docfx/templates/default/partials/navbar.tmpl.partial b/docfx/templates/default/partials/navbar.tmpl.partial
new file mode 100644
index 0000000..995c57a
--- /dev/null
+++ b/docfx/templates/default/partials/navbar.tmpl.partial
@@ -0,0 +1,22 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
diff --git a/docfx/templates/default/partials/rest.child.tmpl.partial b/docfx/templates/default/partials/rest.child.tmpl.partial
new file mode 100644
index 0000000..a64d6b7
--- /dev/null
+++ b/docfx/templates/default/partials/rest.child.tmpl.partial
@@ -0,0 +1,108 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+{{^_disableContribution}}
+{{#docurl}}
+
+ |
+ Improve this Doc
+{{/docurl}}
+{{#sourceurl}}
+
+ View Source
+{{/sourceurl}}
+{{/_disableContribution}}
+
+{{/responses.0}}
+{{#footer}}
+
+{{/footer}}
diff --git a/docfx/templates/default/partials/rest.definition.tmpl.partial b/docfx/templates/default/partials/rest.definition.tmpl.partial
new file mode 100644
index 0000000..83cc77e
--- /dev/null
+++ b/docfx/templates/default/partials/rest.definition.tmpl.partial
@@ -0,0 +1,45 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
+{{#enum}}
+{{.}}
+{{/enum}}
+{{/enum.0}}
diff --git a/docfx/templates/default/partials/rest.tmpl.partial b/docfx/templates/default/partials/rest.tmpl.partial
new file mode 100644
index 0000000..9ebedcc
--- /dev/null
+++ b/docfx/templates/default/partials/rest.tmpl.partial
@@ -0,0 +1,42 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
{{name}}
+{{#summary}}
+
{{{summary}}}
+{{/summary}}
+{{#description}}
+
{{{description}}}
+{{/description}}
+{{#conceptual}}
+
{{{conceptual}}}
+{{/conceptual}}
+{{#tags}}
+
{{name}}
+{{#description}}
+
{{{description}}}
+{{/description}}
+{{#conceptual}}
+
{{{conceptual}}}
+{{/conceptual}}
+{{#children}}
+ {{>partials/rest.child}}
+{{/children}}
+{{/tags}}
+{{!if some children are not tagged while other children are tagged, add default title}}
+{{#children.0}}
+{{#isTagLayout}}
+
+{{/definitions.0}}
+{{#definitions}}
+ {{>partials/rest.definition}}
+{{/definitions}}
+{{#footer}}
+
+{{/footer}}
diff --git a/docfx/templates/default/partials/scripts.tmpl.partial b/docfx/templates/default/partials/scripts.tmpl.partial
new file mode 100644
index 0000000..c3a28aa
--- /dev/null
+++ b/docfx/templates/default/partials/scripts.tmpl.partial
@@ -0,0 +1,5 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
+
+
diff --git a/docfx/templates/default/partials/searchResults.tmpl.partial b/docfx/templates/default/partials/searchResults.tmpl.partial
new file mode 100644
index 0000000..8858184
--- /dev/null
+++ b/docfx/templates/default/partials/searchResults.tmpl.partial
@@ -0,0 +1,9 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
+
{{__global.searchResults}}
+
+
+
+
+
diff --git a/docfx/templates/default/partials/title.tmpl.partial b/docfx/templates/default/partials/title.tmpl.partial
new file mode 100644
index 0000000..f7fbcb0
--- /dev/null
+++ b/docfx/templates/default/partials/title.tmpl.partial
@@ -0,0 +1,49 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+{{#inPackage}}
+Package {{name.0.value}}
+{{/inPackage}}
+{{#isNamespace}}
+Namespace {{name.0.value}}
+{{/isNamespace}}
+{{#inClass}}
+Class {{name.0.value}}
+{{/inClass}}
+{{#inStruct}}
+Struct {{name.0.value}}
+{{/inStruct}}
+{{#inInterface}}
+Interface {{name.0.value}}
+{{/inInterface}}
+{{#inEnum}}
+Enum {{name.0.value}}
+{{/inEnum}}
+{{#inDelegate}}
+Delegate {{name.0.value}}
+{{/inDelegate}}
+{{#inConstructor}}
+Constructor {{name.0.value}}
+{{/inConstructor}}
+{{#inField}}
+Field {{name.0.value}}
+{{/inField}}
+{{#inProperty}}
+Property {{name.0.value}}
+{{/inProperty}}
+{{#inMethod}}
+Method {{name.0.value}}
+{{/inMethod}}
+{{#inEvent}}
+Event {{name.0.value}}
+{{/inEvent}}
+{{#inOperator}}
+Operator {{name.0.value}}
+{{/inOperator}}
+{{#inEii}}
+Explicit Interface Implementation {{name.0.value}}
+{{/inEii}}
+{{#inVariable}}
+Variable {{name.0.value}}
+{{/inVariable}}
+{{#inTypeAlias}}
+Type Alias {{name.0.value}}
+{{/inTypeAlias}}
diff --git a/docfx/templates/default/partials/toc.tmpl.partial b/docfx/templates/default/partials/toc.tmpl.partial
new file mode 100644
index 0000000..507a128
--- /dev/null
+++ b/docfx/templates/default/partials/toc.tmpl.partial
@@ -0,0 +1,8 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
diff --git a/docfx/templates/default/partials/uref/class.header.tmpl.partial b/docfx/templates/default/partials/uref/class.header.tmpl.partial
new file mode 100644
index 0000000..85aaf8f
--- /dev/null
+++ b/docfx/templates/default/partials/uref/class.header.tmpl.partial
@@ -0,0 +1,49 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
+{{/example.0}}
+{{#example}}
+{{{.}}}
+{{/example}}
diff --git a/docfx/templates/default/partials/uref/class.tmpl.partial b/docfx/templates/default/partials/uref/class.tmpl.partial
new file mode 100644
index 0000000..385cb93
--- /dev/null
+++ b/docfx/templates/default/partials/uref/class.tmpl.partial
@@ -0,0 +1,269 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+{{>partials/uref/class.header}}
+{{#children}}
+
+{{/seealso.0}}
diff --git a/docfx/templates/default/partials/uref/enum.tmpl.partial b/docfx/templates/default/partials/uref/enum.tmpl.partial
new file mode 100644
index 0000000..acbb412
--- /dev/null
+++ b/docfx/templates/default/partials/uref/enum.tmpl.partial
@@ -0,0 +1,35 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+{{>partials/uref/class.header}}
+{{#children}}
+
diff --git a/docfx/templates/default/partials/uref/namespace.tmpl.partial b/docfx/templates/default/partials/uref/namespace.tmpl.partial
new file mode 100644
index 0000000..e1aa75d
--- /dev/null
+++ b/docfx/templates/default/partials/uref/namespace.tmpl.partial
@@ -0,0 +1,221 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+
+ {{/seealso.0}}
+ {{/children}}
+ {{/isEmbedded}}
+{{/children}}
diff --git a/docfx/templates/default/partials/uref/parameters.tmpl.partial b/docfx/templates/default/partials/uref/parameters.tmpl.partial
new file mode 100644
index 0000000..74999df
--- /dev/null
+++ b/docfx/templates/default/partials/uref/parameters.tmpl.partial
@@ -0,0 +1,28 @@
+{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
+
+{{#properties.0}}
+