mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-12 13:14:30 +08:00
feat(cqrs): 添加CQRS处理器注册器源代码生成器
- 实现CqrsHandlerRegistryGenerator源代码生成器 - 减少运行时程序集反射扫描开销 - 支持IRequestHandler、INotificationHandler和IStreamRequestHandler接口 - 生成静态注册代码替代运行时动态发现 - 提供精确的运行时类型引用描述功能 - 实现泛型类型和数组类型的反射处理 - 添加日志记录和错误处理机制 - 支持跨程序集类型引用和内部类型反射查找 - 生成符合IServiceCollection的服务注册代码
This commit is contained in:
parent
eca2d67529
commit
73b63777ce
@ -409,6 +409,8 @@ public sealed class CqrsHandlerRegistryGenerator : IIncrementalGenerator
|
|||||||
case ITypeParameterSymbol:
|
case ITypeParameterSymbol:
|
||||||
return false;
|
return false;
|
||||||
default:
|
default:
|
||||||
|
// Treat other Roslyn type kinds, such as dynamic or unresolved error types, as referenceable for now.
|
||||||
|
// If a real-world case proves unsafe, tighten this branch instead of broadening the named-type path above.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user