Skip to content
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

[Tasks]: 有关【动态方法模板】相关功能的规划与任务细化 (意见搜集与讨论) #279

Closed
4 tasks done
NMSAzulX opened this issue Apr 30, 2024 · 3 comments
Labels
done tasks This is a tasklist.

Comments

@NMSAzulX
Copy link
Collaborator

NMSAzulX commented Apr 30, 2024

📃 计划清单 (Tasklist).

基于方法内容的动态方法模板扩展

@NMSAzulX NMSAzulX added the tasks This is a tasklist. label Apr 30, 2024
@NMSAzulX
Copy link
Collaborator Author

编号 相似度 ISSUE
1 53.30% [Next]: Natasha 的 【动态方法使用率】 相关功能建议搜集

该条自动推荐信息来自于 nms-bot.

@NMSAzulX
Copy link
Collaborator Author

NMSAzulX commented Apr 30, 2024

案例如下:

  1. 规范了参数顺序。
  2. 轻量级构建只需要传入对应的元数据类型即可 .
NatashaManagement.RegistDomainCreator<NatashaDomainCreator>();

var simpleFunc = "return Math.Floor(arg1/0.3);"
  .WithMetadata(typeof(Math))
  .ToFunc<double, double>();

Console.WriteLine(func(1,2));

@NMSAzulX
Copy link
Collaborator Author

NMSAzulX commented Jul 9, 2024

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant NatashaSlimMethodBuilder
    participant AssemblyCSharpBuilder
    participant NatashaLoadContext

    User->>+NatashaSlimMethodBuilder: Create Instance with "script"
    NatashaSlimMethodBuilder->>User: Return Builder Instance

    User->>+NatashaSlimMethodBuilder: Configure using AssemblyCSharpBuilder
    NatashaSlimMethodBuilder->>+AssemblyCSharpBuilder: Apply Configuration
    AssemblyCSharpBuilder-->>-NatashaSlimMethodBuilder: Config Applied

    User->>+NatashaSlimMethodBuilder: Configure using NatashaLoadContext
    NatashaSlimMethodBuilder->>+NatashaLoadContext: Apply Configuration
    NatashaLoadContext-->>-NatashaSlimMethodBuilder: Config Applied

    User->>+NatashaSlimMethodBuilder: Generate Delegate
    NatashaSlimMethodBuilder->>User: Delegate Returned
Loading

@NMSAzulX NMSAzulX added done and removed phase-done 任务或计划阶段性结束. labels Nov 14, 2024
@NMSAzulX NMSAzulX unpinned this issue Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done tasks This is a tasklist.
Projects
No open projects
Development

No branches or pull requests

1 participant