Skip to content

语言 / Languages

本页另有 English日本語 版本。

源生成器

MvvmAIO.Prism.SourceGenerators 在编译期扩展 partial 类型。特性定义在 MvvmAIO.Prism.Core 中(命名空间 Prism.SourceGenerators)。

partial 类型

凡生成成员要合并进你的声明处,类型须为 partialPSG0001–PSG0005 覆盖常见错误;五项均提供 IDE MakePartial 代码修复。

主题

主题摘要
ObservableProperty字段与 C# 13+ partial 属性目标、PropertyAccessOnChanging / OnChanged
通知与转发[NotifyPropertyChangedFor][NotifyCanExecuteChangedFor][property: …] 转发。
DelegateCommand同步命令、CanExecuteTask 执行方法、ValueTask
AsyncDelegateCommand并行执行、CatchCancelAfterObservesCanExecute、Prism 8 与 9 包差异。
ObservesProperty属性变化时重新求值 CanExecute
BindableBase未继承 Prism BindableBase 时生成 INPC
BindableValidator通过 [BindableValidator][NotifyDataErrorInfo] 生成 INotifyDataErrorInfo 验证支持。
容器注册Register*RegisterForNavigationRegisterDialog,生成 IContainerRegistry 调用。

诊断

全部编译器 ID 见 诊断参考

下一步

基于 MIT 许可证发布。

基于 MIT 许可证发布。