312
edits
(add case parameter) |
(Added Template:References to "see also" section) |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Template Parameter !! Required? !! Default Value | ! Template Parameter !! Required? !! Default Value !! Notes | ||
|- | |- | ||
| <code> | | <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> | | <code>namespace</code> || No || <code>XRL.World.Parts</code> || | ||
|- | |- | ||
| <code> | | <code>class</code> || Yes || ''(None)'' || This must be specified or else the template will error. | ||
|- | |- | ||
| <code>case</code> || No || None | | <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>property</code> || No || ''(None)'' || If provided, a property name will be included in the reference. This parameter cannot be used in combination with <code>method</code>. | |||
|- | |||
| <code>comment</code> || No || ''(None)'' || A freeform natural-language addendum that further clarifies or explains the reference. | |||
|- | |||
| <code>name</code> || No || ''(None)'' || If this is present, the citation will be named so that it can be referred to again later by the same name with <code><nowiki><ref name="the-name-you-chose" /></nowiki></code> | |||
|} | |} | ||
Line 72: | Line 80: | ||
}} | }} | ||
[[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> | In other cases, it may be useful to specify a property (instead of a method). In that case, use the following form: | ||
<pre><nowiki>{{Code Reference | |||
| namespace = Fake.Namespace | |||
| class = FakeClass | |||
| property = FakeProperty | |||
}}</nowiki></pre>{{Code Reference | |||
| namespace = Fake.Namespace | |||
| class = FakeClass | |||
| property = FakeProperty | |||
}} | |||
== See Also == | |||
* [[Template:References]] | |||
* [[Template:XML Reference]] | |||
* [[Template:File Reference]] | |||
== References == | |||
<references /> | |||
[[Category:Reference Templates]]</noinclude><includeonly>{{#if: {{{class |}}} | |||
| {{#if: {{{name |}}} | |||
| {{#tag: ref | <code>{{{namespace | XRL.World.Parts}}}.{{{class}}}</code>{{#if: {{{method |}}} |, method <code>{{{method}}}</code>{{#if: {{{case |}}} | , in the <code>{{{case}}}</code> case}}|{{#if: {{{property |}}} |, property <code>{{{property}}}</code>}}}}{{#if: {{{comment |}}} | {{Space}}– {{{comment}}}}} | name={{{name}}}}} | |||
| {{#tag: ref | <code>{{{namespace | XRL.World.Parts}}}.{{{class}}}</code>{{#if: {{{method |}}} |, method <code>{{{method}}}</code>{{#if: {{{case |}}} | , in the <code>{{{case}}}</code> case}}|{{#if: {{{property |}}} |, property <code>{{{property}}}</code>}}}}{{#if: {{{comment |}}} | {{Space}}– {{{comment}}}}}}} | |||
}} | |||
| {{Template Error}} | |||
}}</includeonly> |
edits