File tree Expand file tree Collapse file tree 4 files changed +82
-2
lines changed
en-US/docusaurus-plugin-content-docs/current
ja-JP/docusaurus-plugin-content-docs/current Expand file tree Collapse file tree 4 files changed +82
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : 10. 模板初始化操作
3
+ ---
4
+
5
+ Natasha 的所有模板均继承自 ComplierTemplate ,ComplierTemplate 本身会提供静态构造方法。因此上层 API 也会被支持。Therefore, the upper-level API is also supported.因此上层 API 也会被支持。
6
+
7
+ <br />
8
+
9
+ ## 使用
10
+
11
+ NDelegate / NAssembly / NClass.. / xxx_Oerator 等等以下称为 “Handler”.
12
+
13
+ <br />
14
+
15
+ #### 静态初始化代码:
16
+
17
+ ``` cs
18
+
19
+ // 使用 domain 域
20
+ Handler .UseDomain (domian , compiler => { 编译器配置 });
21
+
22
+
23
+ // 使用某编译器的域
24
+ Handler .UseCompiler (assemblyCSharpCompiler , compiler => { 编译器配置 }));
25
+
26
+
27
+ // 创建一个 "domainJim" 域
28
+ Handler .CreateDomain (" domianJim" , compiler => { 编译器配置 });
29
+
30
+
31
+ // 使用默认域
32
+ Handler .DefaultDomain (compiler => { 编译器配置 });
33
+
34
+
35
+ // 使用随机域
36
+ Handler .RandomDomain (compiler => { 编译器配置 });
37
+
38
+ ```
39
+
40
+ <br />
Original file line number Diff line number Diff line change 1
1
---
2
- label : ' Quick start '
2
+ label : ' 封装规范入门 '
3
3
position : 100000 # float position is supported
4
4
collapsed : true # keep the category open by default
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : 10. 模板初始化操作
3
+ ---
4
+
5
+ Natasha 的所有模板均继承自 ComplierTemplate ,ComplierTemplate 本身会提供静态构造方法。因此上层 API 也会被支持。
6
+
7
+ <br />
8
+
9
+ ## 使用
10
+
11
+ NDelegate / NAssembly / NClass.. / xxx_Oerator 等等以下称为 “Handler”.
12
+
13
+ <br />
14
+
15
+ #### 静态初始化代码:
16
+
17
+ ``` cs
18
+
19
+ // 使用 domain 域
20
+ Handler .UseDomain (domian , compiler => { 编译器配置 });
21
+
22
+
23
+ // 使用某编译器的域
24
+ Handler .UseCompiler (assemblyCSharpCompiler , compiler => { 编译器配置 }));
25
+
26
+
27
+ // 创建一个 "domainJim" 域
28
+ Handler .CreateDomain (" domianJim" , compiler => { 编译器配置 });
29
+
30
+
31
+ // 使用默认域
32
+ Handler .DefaultDomain (compiler => { 编译器配置 });
33
+
34
+
35
+ // 使用随机域
36
+ Handler .RandomDomain (compiler => { 编译器配置 });
37
+
38
+ ```
39
+
40
+ <br />
Original file line number Diff line number Diff line change 1
1
---
2
- label : ' クイックスタート '
2
+ label : ' 封装规范入门 '
3
3
position : 100000 # float position is supported
4
4
collapsed : true # keep the category open by default
You can’t perform that action at this time.
0 commit comments