Skip to content

basic-v8.1.0

Choose a tag to compare

@github-actions github-actions released this 13 Dec 11:29
· 20 commits to master since this release

8.1

  1. 修改了PinnedScope.ScopedServices在PinnedScopeOwningComponentBase子类页面事件回调方法及其后续调用方法中的默认表现。在 8.0 版本中,PinnedScope.ScopedServices获取到的是与 inject 注入的IServiceProvider相同,这一行为与预期不符。在 8.1 及后续版本中,PinnedScope.ScopedServices获取到的是OwningComponentBase.ScopedServies,这一行为更符合预期。
  2. .NET 7.0 新增HostApplicationBuilder,但由于无法从HostApplicationBuilder对象获取IHostBuilder对象,所以对为HostApplicationBuilder新增扩展方法UsePinnedScopeServiceProvider和UseEditableServiceProvider。
  3. 使用UnsafeAccessorAttribute替代反射访问ComponentBase.HandleEventAsync,提升访问性能。
  4. 为了实现第一项描述的功能,修改了PinnedScopeComponentBase, PinnedScopeOwningComponentBase和PinnedScopeLayoutComponentBase的实现,如果之前按照 已有自定义ComponentBase基类的解决方案 修改了ComponentBase系列基类,现在你需要重新参照最新的 已有自定义ComponentBase基类的解决方案 进行修改。