Skip to content

Commit 8ebe60e

Browse files
committed
reorder docs
1 parent 4a2d14c commit 8ebe60e

File tree

1 file changed

+28
-33
lines changed

1 file changed

+28
-33
lines changed

src/wwwroot/docs/methods.html

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,6 @@
1616
APIs and functionality and can do anything that built-in scripts can do.
1717
</p>
1818

19-
<h3>Delegate Arguments</h3>
20-
21-
<p>
22-
In addition to Script Methods, <em>#Script</em> also lets you call delegates registered as arguments:
23-
</p>
24-
25-
{{ 'gfm/script-net/01.md' |> githubMarkdown }}
26-
27-
<p>
28-
Which just like <a href="/docs/blocks#function">user-defined functions</a> and other Script Methods can be called positionally or as an
29-
<a href="/docs/syntax#extension-methods">extension method</a>:
30-
</p>
31-
32-
<pre><code>fn(1,2)
33-
1.fn(2)</code></pre>
34-
35-
<h4 id="shadowing">Shadowing Methods</h4>
36-
37-
<p>
38-
You can easily override default script methods with the same name and arguments by inserting them at the start of the <em>ScriptMethods</em> list:
39-
</p>
40-
41-
{{ 'gfm/methods/01.md' |> githubMarkdown }}
42-
43-
<h4 id="removing">Removing Default Scripts</h4>
44-
45-
<p>
46-
Or if you want to start from a clean slate, the default scripts can be removed by clearing the collection:
47-
</p>
48-
49-
{{ 'gfm/methods/02.md' |> githubMarkdown }}
50-
5119
<h4>What are Script Methods?</h4>
5220

5321
<p>
@@ -108,16 +76,43 @@ <h5>Autowired using ScriptContext IOC</h5>
10876
Where it will search each Type in the Assembly for Script Methods and automatically register them.
10977
</p>
11078

111-
<h5>Method Resolution</h5>
79+
<h3>Method Resolution</h3>
11280

11381
<p>
11482
#Script will use the first matching method with the same name and argument count it can find by searching through all
11583
registered methods in the <em>ScriptMethods</em> collection, so you could override default methods with the same name by
11684
inserting your ScriptMethods as the first item in the collection, e.g:
11785
</p>
11886

87+
<h5 id="shadowing">Shadowing Methods</h5>
88+
11989
{{ 'gfm/methods/09.md' |> githubMarkdown }}
12090

91+
<h3>Delegate Arguments</h3>
92+
93+
<p>
94+
In addition to Script Methods, <em>#Script</em> also lets you call delegates registered as arguments:
95+
</p>
96+
97+
{{ 'gfm/script-net/01.md' |> githubMarkdown }}
98+
99+
<p>
100+
Which just like <a href="/docs/blocks#function">user-defined functions</a> and other Script Methods can be called positionally or as an
101+
<a href="/docs/syntax#extension-methods">extension method</a>:
102+
</p>
103+
104+
<pre><code>fn(1,2)
105+
1.fn(2)</code></pre>
106+
107+
<h4 id="removing">Removing Default Scripts</h4>
108+
109+
<p>
110+
Or if you want to start from a clean slate, the default scripts can be removed by clearing the collection:
111+
</p>
112+
113+
{{ 'gfm/methods/02.md' |> githubMarkdown }}
114+
115+
121116
<h4>Auto coercion into Method argument Types</h4>
122117

123118
<p>

0 commit comments

Comments
 (0)