Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
添加更多类型支持
  • Loading branch information
Controllerdestiny committed May 16, 2025
commit 70d84695dde44e7deaa735a0643ebc3f0e9523fd
4 changes: 2 additions & 2 deletions src/TransferPatch/ILTranslate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private void RemoveExistingAttributes(Collection<CustomAttribute> attributes)
}

if (type.HasGenericParameters &&
type.FullName.Split('`')[0] == targetClassName)
type.FullName == targetClassName)
{
return type;
}
Expand All @@ -96,7 +96,7 @@ private void RemoveExistingAttributes(Collection<CustomAttribute> attributes)
{
if (nestedType.FullName == targetClassName ||
(nestedType.HasGenericParameters &&
nestedType.FullName.Split('`')[0] == targetClassName))
nestedType.FullName == targetClassName))
{
return nestedType;
}
Expand Down
3 changes: 2 additions & 1 deletion src/TransferPatch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"目标类": [ "TShockAPI.Configuration.TShockSettings", "TShockAPI.Configuration.ConfigFile`1" ],
"翻译列表": {
"TShockAPI.Configuration.TShockSettings.ServerPassword": "服务器密码",
"TShockAPI.Configuration.ConfigFile`1.Settings": "设置" //泛型类命名
"TShockAPI.Configuration.ConfigFile`1.Settings": "设置" //泛型类(`1`代表泛型参数)
"Config/Option": "配置" //嵌套类
}
}
```
Expand Down
Loading