Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions Aspire.sln
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Hosting.Docker.Tests
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Hosting.Kubernetes.Tests", "tests\Aspire.Hosting.Kubernetes.Tests\Aspire.Hosting.Kubernetes.Tests.csproj", "{582B06FD-CC56-4C58-8138-D92F8FE62BBD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Azure.Data.AppConfiguration", "src\Components\Aspire.Azure.Data.AppConfiguration\Aspire.Azure.Data.AppConfiguration.csproj", "{34E74A65-3891-49AC-9C3E-8D049E078D4D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AzureAppConfiguration", "AzureAppConfiguration", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppHost", "playground\AzureAppConfiguration\AppHost\AppHost.csproj", "{426E8FEA-7077-4433-959C-E5B1E5F26CC0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkerService", "playground\AzureAppConfiguration\WorkerService\WorkerService.csproj", "{5B26B478-95AF-9F3E-D5E7-D7535855470F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Azure.Data.AppConfiguration.Tests", "tests\Aspire.Azure.Data.AppConfiguration.Tests\Aspire.Azure.Data.AppConfiguration.Tests.csproj", "{4C902423-42B5-40E9-82FA-36D2439EE631}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Azure.Npgsql", "src\Components\Aspire.Azure.Npgsql\Aspire.Azure.Npgsql.csproj", "{417C3703-058A-210D-7E9A-28198EFDB25F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Azure.Npgsql.Tests", "tests\Aspire.Azure.Npgsql.Tests\Aspire.Azure.Npgsql.Tests.csproj", "{201765B1-37A1-9F5B-DD7F-730347046BE1}"
Expand Down Expand Up @@ -3901,6 +3910,54 @@ Global
{582B06FD-CC56-4C58-8138-D92F8FE62BBD}.Release|x64.Build.0 = Release|Any CPU
{582B06FD-CC56-4C58-8138-D92F8FE62BBD}.Release|x86.ActiveCfg = Release|Any CPU
{582B06FD-CC56-4C58-8138-D92F8FE62BBD}.Release|x86.Build.0 = Release|Any CPU
{34E74A65-3891-49AC-9C3E-8D049E078D4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{34E74A65-3891-49AC-9C3E-8D049E078D4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34E74A65-3891-49AC-9C3E-8D049E078D4D}.Debug|x64.ActiveCfg = Debug|Any CPU
{34E74A65-3891-49AC-9C3E-8D049E078D4D}.Debug|x64.Build.0 = Debug|Any CPU
{34E74A65-3891-49AC-9C3E-8D049E078D4D}.Debug|x86.ActiveCfg = Debug|Any CPU
{34E74A65-3891-49AC-9C3E-8D049E078D4D}.Debug|x86.Build.0 = Debug|Any CPU
{34E74A65-3891-49AC-9C3E-8D049E078D4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{34E74A65-3891-49AC-9C3E-8D049E078D4D}.Release|Any CPU.Build.0 = Release|Any CPU
{34E74A65-3891-49AC-9C3E-8D049E078D4D}.Release|x64.ActiveCfg = Release|Any CPU
{34E74A65-3891-49AC-9C3E-8D049E078D4D}.Release|x64.Build.0 = Release|Any CPU
{34E74A65-3891-49AC-9C3E-8D049E078D4D}.Release|x86.ActiveCfg = Release|Any CPU
{34E74A65-3891-49AC-9C3E-8D049E078D4D}.Release|x86.Build.0 = Release|Any CPU
{426E8FEA-7077-4433-959C-E5B1E5F26CC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{426E8FEA-7077-4433-959C-E5B1E5F26CC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{426E8FEA-7077-4433-959C-E5B1E5F26CC0}.Debug|x64.ActiveCfg = Debug|Any CPU
{426E8FEA-7077-4433-959C-E5B1E5F26CC0}.Debug|x64.Build.0 = Debug|Any CPU
{426E8FEA-7077-4433-959C-E5B1E5F26CC0}.Debug|x86.ActiveCfg = Debug|Any CPU
{426E8FEA-7077-4433-959C-E5B1E5F26CC0}.Debug|x86.Build.0 = Debug|Any CPU
{426E8FEA-7077-4433-959C-E5B1E5F26CC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{426E8FEA-7077-4433-959C-E5B1E5F26CC0}.Release|Any CPU.Build.0 = Release|Any CPU
{426E8FEA-7077-4433-959C-E5B1E5F26CC0}.Release|x64.ActiveCfg = Release|Any CPU
{426E8FEA-7077-4433-959C-E5B1E5F26CC0}.Release|x64.Build.0 = Release|Any CPU
{426E8FEA-7077-4433-959C-E5B1E5F26CC0}.Release|x86.ActiveCfg = Release|Any CPU
{426E8FEA-7077-4433-959C-E5B1E5F26CC0}.Release|x86.Build.0 = Release|Any CPU
{5B26B478-95AF-9F3E-D5E7-D7535855470F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B26B478-95AF-9F3E-D5E7-D7535855470F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B26B478-95AF-9F3E-D5E7-D7535855470F}.Debug|x64.ActiveCfg = Debug|Any CPU
{5B26B478-95AF-9F3E-D5E7-D7535855470F}.Debug|x64.Build.0 = Debug|Any CPU
{5B26B478-95AF-9F3E-D5E7-D7535855470F}.Debug|x86.ActiveCfg = Debug|Any CPU
{5B26B478-95AF-9F3E-D5E7-D7535855470F}.Debug|x86.Build.0 = Debug|Any CPU
{5B26B478-95AF-9F3E-D5E7-D7535855470F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B26B478-95AF-9F3E-D5E7-D7535855470F}.Release|Any CPU.Build.0 = Release|Any CPU
{5B26B478-95AF-9F3E-D5E7-D7535855470F}.Release|x64.ActiveCfg = Release|Any CPU
{5B26B478-95AF-9F3E-D5E7-D7535855470F}.Release|x64.Build.0 = Release|Any CPU
{5B26B478-95AF-9F3E-D5E7-D7535855470F}.Release|x86.ActiveCfg = Release|Any CPU
{5B26B478-95AF-9F3E-D5E7-D7535855470F}.Release|x86.Build.0 = Release|Any CPU
{4C902423-42B5-40E9-82FA-36D2439EE631}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C902423-42B5-40E9-82FA-36D2439EE631}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C902423-42B5-40E9-82FA-36D2439EE631}.Debug|x64.ActiveCfg = Debug|Any CPU
{4C902423-42B5-40E9-82FA-36D2439EE631}.Debug|x64.Build.0 = Debug|Any CPU
{4C902423-42B5-40E9-82FA-36D2439EE631}.Debug|x86.ActiveCfg = Debug|Any CPU
{4C902423-42B5-40E9-82FA-36D2439EE631}.Debug|x86.Build.0 = Debug|Any CPU
{4C902423-42B5-40E9-82FA-36D2439EE631}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C902423-42B5-40E9-82FA-36D2439EE631}.Release|Any CPU.Build.0 = Release|Any CPU
{4C902423-42B5-40E9-82FA-36D2439EE631}.Release|x64.ActiveCfg = Release|Any CPU
{4C902423-42B5-40E9-82FA-36D2439EE631}.Release|x64.Build.0 = Release|Any CPU
{4C902423-42B5-40E9-82FA-36D2439EE631}.Release|x86.ActiveCfg = Release|Any CPU
{4C902423-42B5-40E9-82FA-36D2439EE631}.Release|x86.Build.0 = Release|Any CPU
{417C3703-058A-210D-7E9A-28198EFDB25F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{417C3703-058A-210D-7E9A-28198EFDB25F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{417C3703-058A-210D-7E9A-28198EFDB25F}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -4280,6 +4337,11 @@ Global
{3AE2ED5B-4EC7-4E6D-A61D-C68B837E5FA7} = {B80354C7-BE58-43F6-8928-9F3A74AB7F47}
{43B560D6-F158-4A4C-8E43-981056EB9038} = {830A89EC-4029-4753-B25A-068BAE37DEC7}
{582B06FD-CC56-4C58-8138-D92F8FE62BBD} = {830A89EC-4029-4753-B25A-068BAE37DEC7}
{34E74A65-3891-49AC-9C3E-8D049E078D4D} = {27381127-6C45-4B4C-8F18-41FF48DFE4B2}
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {D173887B-AF42-4576-B9C1-96B9E9B3D9C0}
{426E8FEA-7077-4433-959C-E5B1E5F26CC0} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{5B26B478-95AF-9F3E-D5E7-D7535855470F} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{4C902423-42B5-40E9-82FA-36D2439EE631} = {C424395C-1235-41A4-BF55-07880A04368C}
{417C3703-058A-210D-7E9A-28198EFDB25F} = {27381127-6C45-4B4C-8F18-41FF48DFE4B2}
{201765B1-37A1-9F5B-DD7F-730347046BE1} = {C424395C-1235-41A4-BF55-07880A04368C}
{192747A2-9338-DECF-5C8C-28EB8E13829B} = {27381127-6C45-4B4C-8F18-41FF48DFE4B2}
Expand Down
3 changes: 3 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<ItemGroup>
<!-- Azure SDK for .NET dependencies -->
<PackageVersion Include="Azure.AI.OpenAI" Version="2.2.0-beta.4" />
<PackageVersion Include="Azure.Data.AppConfiguration" Version="1.6.0" />
<PackageVersion Include="Azure.Data.Tables" Version="12.10.0" />
<PackageVersion Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.4.0" />
<PackageVersion Include="Azure.Messaging.EventHubs" Version="5.11.6" />
Expand All @@ -29,6 +30,7 @@
<PackageVersion Include="Microsoft.Azure.SignalR" Version="1.30.2" />
<PackageVersion Include="Microsoft.Azure.SignalR.Management" Version="1.30.2" />
<PackageVersion Include="Microsoft.Extensions.Azure" Version="1.11.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="8.1.1" />
<!-- Azure Management SDK for .NET dependencies -->
<PackageVersion Include="Azure.Provisioning" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.Provisioning.AppConfiguration" Version="$(AzureProvisiongVersion)" />
Expand Down Expand Up @@ -85,6 +87,7 @@
<PackageVersion Include="KubernetesClient" Version="16.0.2" />
<PackageVersion Include="JsonPatch.Net" Version="3.3.0" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="6.0.1" />
<PackageVersion Include="Microsoft.FeatureManagement" Version="4.0.0" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.11.6" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.11.6" />
<PackageVersion Include="Milvus.Client" Version="2.3.0-preview.1" />
Expand Down
23 changes: 23 additions & 0 deletions playground/AzureAppConfiguration/AppHost/AppHost.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<Sdk Name="Aspire.AppHost.Sdk" Version="9.0.0" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireHost>true</IsAspireHost>
<UserSecretsId>6624a704-3e83-4d16-826d-964ae9acb07c</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<AspireProjectOrPackageReference Include="Aspire.Hosting.AppHost" />
<AspireProjectOrPackageReference Include="Aspire.Hosting.Azure.AppConfiguration" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\WorkerService\WorkerService.csproj" />
</ItemGroup>

</Project>
12 changes: 12 additions & 0 deletions playground/AzureAppConfiguration/AppHost/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

var builder = DistributedApplication.CreateBuilder(args);

var appConfig = builder
.AddAzureAppConfiguration("appconfig");

builder.AddProject<Projects.WorkerService>("workerservice")
.WithReference(appConfig);

builder.Build().Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:17091;http://localhost:15133",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21146",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22084"
}
},
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:15133",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19209",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20168"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
15 changes: 15 additions & 0 deletions playground/AzureAppConfiguration/AppHost/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.Dcp": "Warning"
}
},
"Azure": {
"SubscriptionId": "<SUBSCRIPTION-ID>",
"AllowResourceGroupCreation": true,
"ResourceGroup": "<RESOURCE-GROUP-NAME>",
"Location": "<REGION-NAME>"
}
}
22 changes: 22 additions & 0 deletions playground/AzureAppConfiguration/WorkerService/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Microsoft.FeatureManagement;
using WorkerService;

var builder = Host.CreateApplicationBuilder(args);

builder.AddServiceDefaults();
builder.AddAzureAppConfigurationClient("appConfig");
builder.Services.AddHostedService<Worker>();
builder.Configuration.AddAzureAppConfiguration(
"appconfig",
configureOptions: options => {
options.UseFeatureFlags();
options.ConfigureRefresh(refresh =>
{
refresh.RegisterAll();
});
builder.Services.AddSingleton(options.GetRefresher());
});
Comment on lines +9 to +18
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the minimal configuration. Why are there 3 layers of nested lambdas?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the minimal configuration. The minimal configuration is just:

builder.Configuration.AddAzureAppConfiguration("appconfig");

But to use advanced feature of App Config configuration provider (e.g. feature flag, dynamic refresh), you need to configure on AzureAppConfigurationOptions

BTW, I followed the existing pattern of AddAzureKeyVaultSecrets.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this sample is just trying to show both calls but we dont expect people to do this right?

Copy link
Contributor Author

@zhiyuanliang-ms zhiyuanliang-ms Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this sample is just trying to show both calls but we dont expect people to do this right?

If people want to use advanced features of Azure App Configuration. They should write code just like what I did in the example. We do expect people to do this if they want to use feature flag and dynamic refresh. But for simple configuration scenario, builder.Configuration.AddAzureAppConfiguration("appconfig"); is enough.

BTW, I am working on another PR: zhiyuanliang-ms#5

We decided to not implement anything for ConfigurationClient from .net azure sdk. This PR should be deprecated.

The new API will be an extension method on IHostApplicationBuilder.
builder.AddAzureAppConfiguration("appconfig");

builder.Services.AddFeatureManagement();

var host = builder.Build();
host.Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"WorkerService": {
"commandName": "Project",
"dotnetRunMessages": true,
"environmentVariables": {
"DOTNET_ENVIRONMENT": "Development"
}
}
}
}
35 changes: 35 additions & 0 deletions playground/AzureAppConfiguration/WorkerService/Worker.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Microsoft.Extensions.Configuration.AzureAppConfiguration;
using Microsoft.FeatureManagement;

namespace WorkerService;

public class Worker : BackgroundService
{
private readonly ILogger<Worker> _logger;
private readonly IConfiguration _configuration;
private readonly IConfigurationRefresher _refresher;
private readonly IVariantFeatureManager _featureManager;

public Worker(ILogger<Worker> logger, IConfiguration configuration, IConfigurationRefresher refresher, IVariantFeatureManager featureManager)
{
_logger = logger;
_configuration = configuration;
_refresher = refresher;
_featureManager = featureManager;
}

protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
await _refresher.TryRefreshAsync(stoppingToken);
if (_logger.IsEnabled(LogLevel.Information))
{
_logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now);
_logger.LogInformation("Message from App Config: {message}", _configuration["message"]);
_logger.LogInformation("Beta feature flag is enabled: {enabled}", await _featureManager.IsEnabledAsync("Beta", stoppingToken));
}
await Task.Delay(10000, stoppingToken);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>dotnet-WorkerService-a204435a-f29d-40a7-b698-e883da9db8da</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.FeatureManagement" />
</ItemGroup>

<ItemGroup>
<AspireProjectOrPackageReference Include="Aspire.Azure.Data.AppConfiguration" />
<ProjectReference Include="..\..\Playground.ServiceDefaults\Playground.ServiceDefaults.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Aspire.Azure.Common;
using Azure.Core;
using Azure.Core.Extensions;
using Azure.Data.AppConfiguration;
using Microsoft.Extensions.Azure;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Diagnostics.HealthChecks;

namespace Aspire.Azure.Data.AppConfiguration;
internal sealed class AppConfigurationComponent : AzureComponent<AzureDataAppConfigurationSettings, ConfigurationClient, ConfigurationClientOptions>
{
protected override IAzureClientBuilder<ConfigurationClient, ConfigurationClientOptions> AddClient(
AzureClientFactoryBuilder azureFactoryBuilder, AzureDataAppConfigurationSettings settings,
string connectionName, string configurationSectionName)
{
return azureFactoryBuilder.AddClient<ConfigurationClient, ConfigurationClientOptions>((options, cred, _) =>
{
if (settings.Endpoint is null)
{
throw new InvalidOperationException($"Endpoint is missing. It should be provided in 'ConnectionStrings:{connectionName}' or under the 'Endpoint' key in the '{configurationSectionName}' configuration section.");
}

return new ConfigurationClient(settings.Endpoint, cred, options);
});
}

protected override IHealthCheck CreateHealthCheck(ConfigurationClient client, AzureDataAppConfigurationSettings settings)
{
return new AzureAppConfigurationHealthCheck(client);
}

protected override void BindClientOptionsToConfiguration(IAzureClientBuilder<ConfigurationClient, ConfigurationClientOptions> clientBuilder, IConfiguration configuration)
{
#pragma warning disable IDE0200 // Remove unnecessary lambda expression - needed so the ConfigBinder Source Generator works
clientBuilder.ConfigureOptions(options => configuration.Bind(options));
#pragma warning restore IDE0200
}

protected override void BindSettingsToConfiguration(AzureDataAppConfigurationSettings settings, IConfiguration configuration)
{
configuration.Bind(settings);
}

protected override bool GetHealthCheckEnabled(AzureDataAppConfigurationSettings settings)
=> !settings.DisableHealthChecks;

protected override TokenCredential? GetTokenCredential(AzureDataAppConfigurationSettings settings)
=> settings.Credential;

protected override bool GetMetricsEnabled(AzureDataAppConfigurationSettings settings)
=> false;

protected override bool GetTracingEnabled(AzureDataAppConfigurationSettings settings)
=> !settings.DisableTracing;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<IsPackable>true</IsPackable>
<PackageTags>$(ComponentAzurePackageTags) configuration appconfiguration</PackageTags>
<Description>A client for Azure App Configuration that integrates with Aspire.</Description>
<PackageIconFullPath>$(SharedDir)AzureAppConfig_256x.png</PackageIconFullPath>
<NoWarn>$(NoWarn);SYSLIB1100;SYSLIB1101</NoWarn>
<!-- Disable package validation as this package hasn't shipped stable yet. -->
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\Common\AzureComponent.cs" Link="AzureComponent.cs" />
<Compile Include="..\Common\ConfigurationSchemaAttributes.cs" Link="ConfigurationSchemaAttributes.cs" />
<Compile Include="..\Common\HealthChecksExtensions.cs" Link="HealthChecksExtensions.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Data.AppConfiguration" />
<PackageReference Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" />
<PackageReference Include="Microsoft.Extensions.Azure" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" />
</ItemGroup>

</Project>
Loading