Display signature of methods that aren't overloaded
Hello everyone,
When I open the documentation generated by Sandcastle, if I click on MyClass Methods node, only overloaled methods are displayed with their complete signature, i.e. with all their parameters.
Is it possible to see the complete signature of the methods that aren't overloaded?
Best regards,
Nicolas
You'll need to modify the utilities_reference.xsl presentation style transformation. Find the t_topicTitlePlain template and remove the if condition that checks to see if the member is an overload or operator in the final parameter element. That should do it.
Hello Eric,
Thank you very much for helping me.
It doesn't seem to do it.
I openened the files here:
C:\Program Files (x86)\EWSoftware\Sandcastle Help File Builder\PresentationStyles\VS2010\Transforms\utilities_reference.xsl
C:\Program Files (x86)\EWSoftware\Sandcastle Help File Builder\PresentationStyles\VS2013\Transforms\utilities_reference.xsl
Then I commented the following lines:
<!-- show parameters only for overloaded members -->
<!--
<xsl:if test="document/reference/memberdata/@overload or ($g_apiSubSubGroup = 'operator' and (document/reference/apidata/@name='Explicit' or document/reference/apidata/@name='Implicit'))">
<xsl:choose>
<xsl:when test="$g_apiSubSubGroup = 'operator' and (document/reference/apidata/@name='Explicit' or document/reference/apidata/@name='Implicit')">
<xsl:for-each select="/document/reference">
<xsl:call-template name="t_operatorTypesPlain"/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="/document/reference">
<xsl:call-template name="t_parameterTypesPlain"/>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
-->
I closed SHFB and Tools, reopened it and clicked on "Build the help file".
Do you think I missed something?
Best regards,
Nicolas
Don't comment out the whole section, just remove the if and related endif so that it runs the content of the if block unconditionally.
Hello Eric,
I already tried to remove then <xsl:if test="">(...)</xsl:if> to no avail:
<xsl:if test="document/reference/memberdata/@overload or ($g_apiSubSubGroup = 'operator' and (document/reference/apidata/@name='Explicit' or document/reference/apidata/@name='Implicit'))">
<xsl:choose>
<xsl:when test="$g_apiSubSubGroup = 'operator' and (document/reference/apidata/@name='Explicit' or document/reference/apidata/@name='Implicit')">
<xsl:for-each select="/document/reference">
<xsl:call-template name="t_operatorTypesPlain"/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="/document/reference">
<xsl:call-template name="t_parameterTypesPlain"/>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
I also tried to remove the last <parameter>(...)</parameter>. SFHB raises an error during the build operation if I remove it:
<parameter>
<!-- show parameters only for overloaded members -->
<xsl:if test="document/reference/memberdata/@overload or ($g_apiSubSubGroup = 'operator' and (document/reference/apidata/@name='Explicit' or document/reference/apidata/@name='Implicit'))">
<xsl:choose>
<xsl:when test="$g_apiSubSubGroup = 'operator' and (document/reference/apidata/@name='Explicit' or document/reference/apidata/@name='Implicit')">
<xsl:for-each select="/document/reference">
<xsl:call-template name="t_operatorTypesPlain"/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="/document/reference">
<xsl:call-template name="t_parameterTypesPlain"/>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</parameter>
Here is a not overloaded method with one parameter:

Here its signature if I click on the [ClassName] Methods node. As you can see there is no parameter:

Do you have another idea?
Best regards,
Nicolas
If you want the parameters shown in the TOC, make the above noted change but just remove the single line containing the if element and the single line containing its matching endif element. Leave the choose element in place as it needs to execute.
If you don't want parameters shown in the TOC, back out the above change and leave it as it was.
To show parameters in the member list pages, search utilities_reference.xsl for show-parameter and for instances where it is set to a variable such as {$p_showparameters}, replace it with a hard-coded value of true. If it's set to a hard-coded value of false, leave those alone as they do need to be false.
Hello Eric,
Perfect, thank you very much it seems to do it!
I replaced show-parameters="{$p_showParameters}" twice and show-parameters="{$v_showParameters} one time.
There was no show-parameters="false" in utilities_reference.xsl.
I think that this issue can be closed.
Thanks once again!
Best regards,
Nicolas