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

优化/简化监听函数构建DSL #383

Merged
merged 1 commit into from
Jul 11, 2022
Merged

Conversation

ForliyScarlet
Copy link
Member

参考 EventListenersGeneratorSimpleListenerBuilder

例:

// in application builder
listeners {
   FooEvent.process {
       // 不需要返回值
   }

   FooEvent.handle {
      // do...
      EventResult.of(...) // 需要返回值
    }

   FooEvent {
       // invoke 现在行为与 process 一致
   }

}
buildSimpleListener(FooEvent) {
    // 新增 process { ... }
    process { event -> 
      // do...
       
   }

}

Signed-off-by: ForteScarlet <ForteScarlet@163.com>
@ForliyScarlet ForliyScarlet added v3 模块:核心 核心与api模块相关的 特性 一个新特性,或者一个新的功能/能力 labels Jul 11, 2022
@ForliyScarlet ForliyScarlet merged commit 54a04d6 into v3.0.0-beta-M Jul 11, 2022
@ForteScarlet ForteScarlet deleted the handle_and_process branch July 11, 2022 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
模块:核心 核心与api模块相关的 特性 一个新特性,或者一个新的功能/能力
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants