-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
优化和简化动态方法模板 #344
优化和简化动态方法模板 #344
Conversation
WalkthroughThe latest update in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
@coderabbitai review |
Actions performedReview triggered.
|
未检测到合适的 ISSUE 推荐给您。感谢您的反馈!
|
UT Test - Ubuntu1 tests 1 ✅ 0s ⏱️ Results for commit 86eeec5. |
UT Test - Windows1 tests 1 ✅ 0s ⏱️ Results for commit 86eeec5. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.MethodCreator/StringExtension.cs (2 hunks)
- src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.MethodCreator/SystemDelegateExtension.cs (1 hunks)
Additional comments not posted (20)
src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.MethodCreator/StringExtension.cs (6)
24-31
: LGTM!The method
WithSimpleBuilder
correctly configures theAssemblyCSharpBuilder
with a simple mode and a random load context.
33-36
: LGTM!The method
WithMetadata<T>
correctly configures the builder's load context with metadata from the generic typeT
.
37-40
: LGTM!The method
WithMetadata
correctly configures the builder's load context with metadata from the specified type.
Line range hint
45-80
:
LGTM!The method
ToDelegate
correctly generates a delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
82-84
: LGTM!The method
ToAsyncDelegate
correctly generates an async delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
86-92
: LGTM!The methods
ToUnsafeDelegate
andToUnsafeAsyncDelegate
correctly generate unsafe and unsafe async delegates from the provided script and builder. The change to a non-nullable return type improves reliability.src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.MethodCreator/SystemDelegateExtension.cs (14)
7-10
: LGTM!The method
ToAction<T1>
correctly generates an action delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
11-14
: LGTM!The method
ToAction<T1, T2>
correctly generates an action delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
15-18
: LGTM!The method
ToAction<T1, T2, T3>
correctly generates an action delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
19-22
: LGTM!The method
ToAction<T1, T2, T3, T4>
correctly generates an action delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
23-26
: LGTM!The method
ToAction<T1, T2, T3, T4, T5>
correctly generates an action delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
27-30
: LGTM!The method
ToAction<T1, T2, T3, T4, T5, T6>
correctly generates an action delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
31-34
: LGTM!The method
ToAction<T1, T2, T3, T4, T5, T6, T7>
correctly generates an action delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
35-38
: LGTM!The method
ToAction<T1, T2, T3, T4, T5, T6, T7, T8>
correctly generates an action delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
39-42
: LGTM!The method
ToAction<T1, T2, T3, T4, T5, T6, T7, T8, T9>
correctly generates an action delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
43-46
: LGTM!The method
ToAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
correctly generates an action delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
47-50
: LGTM!The method
ToAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
correctly generates an action delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
51-54
: LGTM!The method
ToAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
correctly generates an action delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
59-62
: LGTM!The method
ToFunc<T1>
correctly generates a function delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
63-66
: LGTM!The method
ToFunc<T1, T2>
correctly generates a function delegate from the provided script and builder. The change to a non-nullable return type improves reliability.
[approved
Summary by CodeRabbit
New Features
WithSimpleBuilder
andWithMetadata
.Improvements
ToDelegate
,ToAsyncDelegate
,ToUnsafeDelegate
, andToUnsafeAsyncDelegate
to return non-nullable delegates.ToAction
andToFunc
methods to return non-nullable delegates for various generic parameters.