diff --git a/docs/template/api_wiki/ManagedReference.extension.js b/docs/template/api_wiki/ManagedReference.extension.js
index a59b870c..2206836f 100644
--- a/docs/template/api_wiki/ManagedReference.extension.js
+++ b/docs/template/api_wiki/ManagedReference.extension.js
@@ -1,23 +1,16 @@
-
exports.postTransform = function (model) {
- console.log("ManagedReference.extension.js EXECUTED");
- console.log("Root model: " + JSON.stringify(model));
-
setMemberFlags(model);
-
return model;
};
function setMemberFlags(item, inheritedType) {
if (!item || typeof item !== 'object') return;
- // Determine the current item's declaration type.
var t = item.type
? String(item.type).toLowerCase()
: inheritedType;
- // DocFX member-group containers identify their children
- // through properties such as inMethod, inProperty, etc.
+ // Member-group containers carry their kind in typePropertyName (inMethod, ...)
if (item.typePropertyName) {
var groupType = String(item.typePropertyName)
.replace(/^in/, '')
@@ -28,15 +21,25 @@ function setMemberFlags(item, inheritedType) {
}
}
- // Container / Type declarations
+ // ---- Declaration kinds -------------------------------------------------
+ // postTransform runs AFTER ManagedReference.common.js's transform, which
+ // already set isClass = true for class/struct/interface/delegate because
+ // ManagedReference.html.primary.tmpl dispatches on isClass. Setting
+ // isClass = (t === 'class') here would clobber that and blank every
+ // interface, struct and delegate page. Mirror common.js instead.
item.isNamespace = (t === 'namespace');
- item.isClass = (t === 'class');
+ item.isClass = (
+ t === 'class' ||
+ t === 'struct' ||
+ t === 'interface' ||
+ t === 'delegate'
+ );
item.isStruct = (t === 'struct');
item.isInterface = (t === 'interface');
item.isEnum = (t === 'enum');
item.isDelegate = (t === 'delegate');
- // Member declarations
+ // ---- Member kinds ------------------------------------------------------
item.isConstructor = (t === 'constructor');
item.isMethod = (t === 'method');
item.isProperty = (t === 'property');
@@ -44,13 +47,27 @@ function setMemberFlags(item, inheritedType) {
item.isEvent = (t === 'event');
item.isOperator = (t === 'operator');
- // Useful grouped helpers
+ // ---- in* flags, as consumed by the partials ({{#inClass}}, {{#inEnum}}) --
+ // common.js sets these only on the root and on group containers. Emit them
+ // here too so the partials never depend on transform order.
+ item.inNamespace = (t === 'namespace');
+ item.inClass = (t === 'class');
+ item.inStruct = (t === 'struct');
+ item.inInterface = (t === 'interface');
+ item.inEnum = (t === 'enum');
+ item.inDelegate = (t === 'delegate');
+
+ item.inConstructor = (t === 'constructor');
+ item.inMethod = (t === 'method');
+ item.inProperty = (t === 'property');
+ item.inField = (t === 'field');
+ item.inEvent = (t === 'event');
+ item.inOperator = (t === 'operator');
+
+ // ---- Aggregates --------------------------------------------------------
item.isType = (
item.isClass ||
- item.isStruct ||
- item.isInterface ||
- item.isEnum ||
- item.isDelegate
+ item.isEnum
);
item.isMember = (
@@ -62,8 +79,6 @@ function setMemberFlags(item, inheritedType) {
item.isOperator
);
- // Recursively process nested models.
- // Pass the current group type down to its children.
if (Array.isArray(item.children)) {
item.children.forEach(function (child) {
setMemberFlags(child, t);
@@ -75,4 +90,4 @@ function setMemberFlags(item, inheritedType) {
setMemberFlags(child, t);
});
}
-}
+}
\ No newline at end of file
diff --git a/docs/template/api_wiki/ManagedReference.html.primary.tmpl b/docs/template/api_wiki/ManagedReference.html.primary.tmpl
new file mode 100644
index 00000000..56288236
--- /dev/null
+++ b/docs/template/api_wiki/ManagedReference.html.primary.tmpl
@@ -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.}}
+{{!master(layout/_master.tmpl)}}
+
+{{#isNamespace}}
+ {{>partials/namespace}}
+{{/isNamespace}}
+
+{{#_splitReference}}
+{{#isClass}}
+ {{>partials/class.memberpage}}
+{{/isClass}}
+{{/_splitReference}}
+
+{{^_splitReference}}
+{{^isEnum}}
+{{#isType}}
+ {{>partials/class}}
+{{/isType}}
+{{/isEnum}}
+{{/_splitReference}}
+
+{{#isEnum}}
+ {{>partials/enum}}
+{{/isEnum}}
+
+{{>partials/customMREFContent}}
\ No newline at end of file
diff --git a/docs/template/api_wiki/partials/class.header.tmpl.partial b/docs/template/api_wiki/partials/class.header.tmpl.partial
index 1405c1ff..f5e62d06 100644
--- a/docs/template/api_wiki/partials/class.header.tmpl.partial
+++ b/docs/template/api_wiki/partials/class.header.tmpl.partial
@@ -207,18 +207,33 @@
Extension Methods (Click me to Expand)
The following are methods in which you can use that act as extensions to this type:
+The following are methods which can be used as extensions to this type:
{{{specName.0.value}}}
+