Template:Code Reference: Difference between revisions

m
add whitespace to increase code readability
(document unused assembly parameter; reformat table)
m (add whitespace to increase code readability)
Line 3: Line 3:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Template Parameter !! Required? !! Default Value !! Notes
! Template Parameter     !! Required? !! Default Value                   !! Notes
|-
|-
| <code>assembly</code> || No || <code>Assembly-CSharp.dll</code> || This is ''currently'' unused, but ought to be specified anyway if the relevant code is not in the default assembly.
| <code>assembly</code> || No       || <code>Assembly-CSharp.dll</code> || This is ''currently'' unused, but ought to be specified anyway if the relevant code is not in the default assembly.
|-
|-
| <code>namespace</code> || No || <code>XRL.World.Parts</code> ||
| <code>namespace</code> || No       || <code>XRL.World.Parts</code>     ||
|-
|-
| <code>class</code> || Yes || ''(None)'' || This must be specified or else the template will error.
| <code>class</code>     || Yes       || ''(None)''                       || This must be specified or else the template will error.
|-
|-
| <code>method</code> || No || ''(None)'' || If provided, a method name will be included in the reference.
| <code>method</code>   || No       || ''(None)''                       || If provided, a method name will be included in the reference.
|-
|-
| <code>case</code> || No || ''(None)'' || If both this and <code>method</code> are provided, the context will be further narrowed down to a specific conditional case in the given method.
| <code>case</code>     || No       || ''(None)''                       || If both this and <code>method</code> are provided, the context will be further narrowed down to a specific conditional case in the given method.
|}
|}


Line 74: Line 74:
}}
}}


[[Category:Templates]]</noinclude><includeonly>{{#if:{{{class|}}}|{{#tag:ref|<code>{{{namespace|XRL.World.Parts}}}.{{{class}}}</code>{{#if:{{{method|}}}|, method <code>{{{method}}}</code>{{#if:{{{case|}}}|, in the <code>{{{case}}}</code> case}}}}}}|{{Template Error}}}}</includeonly>
[[Category:Templates]]</noinclude><includeonly>{{
    #if: {{{class |}}}
    | {{#tag: ref
        | <code>{{{namespace | XRL.World.Parts}}}.{{{class}}}</code>{{#if: {{{method |}}} |, method <code>{{{method}}}</code>{{#if : {{{case |}}} |, in the <code>{{{case}}}</code> case}}}}}}
    | {{Template Error}}
}}</includeonly>