Unity提供了PolicyInjectionBehavior用来为一个类型创建时定义拦截的策略,符合特定条件的类型才会被附加特定的功能,当然之前你必须先定义使用的Interceptor。默认规则有:Assembly、CustomAttribute、Member Name、Method Signature、Namespace、Parameter Type、Property、Return Type、Tag Attribute、Type。当符合特定的MatchingRule后,可以将特定功能的CallHandler拦截附加。

相关文章:

  • 2022-12-23
  • 2022-03-06
  • 2021-08-24
  • 2021-10-04
  • 2022-12-23
  • 2021-08-05
  • 2022-03-03
  • 2021-07-09
猜你喜欢
  • 2021-06-18
  • 2022-02-01
  • 2021-07-18
  • 2021-10-22
  • 2021-12-25
  • 2022-01-31
相关资源
相似解决方案