Compiler Warning ASPIRERADIUS004
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
ConfigureRadiusInfrastructure types and members are for evaluation purposes only and are subject to change or removal in future updates. Suppress this diagnostic to proceed.
This diagnostic warning is reported when using the experimental ConfigureRadiusInfrastructure escape hatch from the Aspire.Hosting.Radius integration, including:
ConfigureRadiusInfrastructureRadiusInfrastructureOptionsand the Radius construct types it exposes
This callback lets you customize the generated Radius infrastructure (its constructs) before Bicep is emitted.
Example
Section titled “Example”The following code generates ASPIRERADIUS004:
var builder = DistributedApplication.CreateBuilder(args);
builder.AddRadiusEnvironment("radius") .ConfigureRadiusInfrastructure(infrastructure => { // Customize the generated Radius constructs before Bicep is emitted. });
builder.Build().Run();To correct this warning
Section titled “To correct this warning”Suppress the warning with one of the following methods:
-
Set the severity of the rule in the .editorconfig file.
.editorconfig [*.{cs,vb}]dotnet_diagnostic.ASPIRERADIUS004.severity = noneFor more information about editor config files, see Configuration files for code analysis rules.
-
Add the following
PropertyGroupto your project file:C# project file <PropertyGroup><NoWarn>$(NoWarn);ASPIRERADIUS004</NoWarn></PropertyGroup> -
Suppress in code with the
#pragma warning disable ASPIRERADIUS004directive:Suppressing the warning #pragma warning disable ASPIRERADIUS004builder.AddRadiusEnvironment("radius").ConfigureRadiusInfrastructure(infrastructure => { });#pragma warning restore ASPIRERADIUS004
See also
Section titled “See also”- ASPIRERADIUS003 - Radius cloud provider APIs
- ASPIRERADIUS006 - Radius secret store APIs
- ASPIRERADIUS057 - Radius container image API