Excubo.Generators.BetterBlazor 0.9.0

Source Generator for Blazor

Suggested Alternatives

Excubo.Generators.Blazor

Additional Details

The project was renamed.

Install-Package Excubo.Generators.BetterBlazor -Version 0.9.0
dotnet add package Excubo.Generators.BetterBlazor --version 0.9.0
<PackageReference Include="Excubo.Generators.BetterBlazor" Version="0.9.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Excubo.Generators.BetterBlazor --version 0.9.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

This project aims at improving performance for blazor with source generators.

Blazor uses reflection to handle [Parameter]s of components. This is a source of inefficiency in the framework.
The SetParametersAsync generator overrides the default reflection-based implementation of Task SetParametersAsync(ParameterView parameters) by one
that is generated at compile time, similar to the recommendation by MS.

Simply add @attribute [Excubo.Generators.BetterBlazor.GenerateSetParametersAsync] to your _Imports.razor file. This enables the source generator on all components.
As sometimes you might want to override the method yourself, you can opt-out of the source generator by adding @attribute [Excubo.Generators.BetterBlazor.DoNotGenerateSetParametersAsync] to a component.

This project aims at improving performance for blazor with source generators.

Blazor uses reflection to handle [Parameter]s of components. This is a source of inefficiency in the framework.
The SetParametersAsync generator overrides the default reflection-based implementation of Task SetParametersAsync(ParameterView parameters) by one
that is generated at compile time, similar to the recommendation by MS.

Simply add @attribute [Excubo.Generators.BetterBlazor.GenerateSetParametersAsync] to your _Imports.razor file. This enables the source generator on all components.
As sometimes you might want to override the method yourself, you can opt-out of the source generator by adding @attribute [Excubo.Generators.BetterBlazor.DoNotGenerateSetParametersAsync] to a component.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.9.0 281 10/9/2020