Add a way to access the returned value of the original method
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reading the existing Nasal.InstanceMethod<T> and related return-wrapping APIs to see how method interception is currently exposed. The issue’s example describes the desired ReturnWrapped behavior; done means the wrapper can inspect the original return value and return it, mutate it, or replace it. No test files or tests are named in the issue.
由索引模型根据 Issue 内容生成。
描述
I need a way to receive the original return value of the underlying method, and then either keep that return value, mutate it, or replace it entirely with a different value.
Something to the effect of this:.
MethodInfo myMethod;
var plug = Nasal.InstanceMethod<MyReturn>(myMethod)
.ReturnWrapped((object instance, MyReturn originalReturn, MyParam p1, MyParam p2) =>
{
// Do stuff, and either return `originalReturn` or some other value
return ...
});
- 主要语言
- C#
- 星标
- 11
- 派生
- 4
- 平均合并
- 3 分钟
- 30 天内合并 PR
- 6
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Keboo/NosePlug 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 55/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 35/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 35/100
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
Realm667/WolfenDoom#1758 ·
-
难度 1/5 1 小时以内 新手友好度 82/100
-
AI documentation good first issue help wanted
难度 1/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 62/100
Keboo/SimplyBudget#334 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复