Skip to content

Commit 6ae3b98

Browse files
committed
修正更新日志
1 parent b2eae88 commit 6ae3b98

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CHANGE_LOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ Previously, this required `AlertBox` to be a `[Host]` itself and registered in t
7474

7575
### `[Inject]` Now Supports Node-Type Members (Warning)
7676

77-
`[Inject]` can now be applied to members whose type is a Node class (i.e. the type itself is not an interface). A **Warning** (`GDI_M045`) is emitted to encourage injecting an interface instead of the concrete Node type, but the injection will proceed normally.
77+
`[Inject]` can now be applied to members whose type is a Node class (i.e. the type itself is not an interface). A **Warning** (`GDI_M046`) is emitted to encourage injecting an interface instead of the concrete Node type, but the injection will proceed normally.
7878

7979
```csharp
8080
[User]
8181
public partial class MapLoader : Node
8282
{
83-
// Allowed (with GDI_M045 warning — prefer injecting IAlertBox instead)
83+
// Allowed (with GDI_M046 warning — prefer injecting IAlertBox instead)
8484
[Inject]
8585
private AlertBox _alertBox;
8686

CHANGE_LOG.zh-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ public sealed partial class GuiHost : Node
7474

7575
### `[Inject]` 现在支持 Node 类型成员(Warning)
7676

77-
`[Inject]` 现在允许用在类型为 Node 类的成员上(即类型本身不是接口)。会触发一个 **Warning**`GDI_M045`)以鼓励注入接口而非具体 Node 类型,但注入本身会正常执行。
77+
`[Inject]` 现在允许用在类型为 Node 类的成员上(即类型本身不是接口)。会触发一个 **Warning**`GDI_M046`)以鼓励注入接口而非具体 Node 类型,但注入本身会正常执行。
7878

7979
```csharp
8080
[User]
8181
public partial class MapLoader : Node
8282
{
83-
// 允许(触发 GDI_M045 警告 — 建议注入 IAlertBox 接口)
83+
// 允许(触发 GDI_M046 警告 — 建议注入 IAlertBox 接口)
8484
[Inject]
8585
private AlertBox _alertBox;
8686

0 commit comments

Comments
 (0)