Skip to content

Commit 5c6697c

Browse files
refactoring and styling
nuget updates
1 parent 1076898 commit 5c6697c

80 files changed

Lines changed: 2810 additions & 2771 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
using Projects;
2+
13
var builder = DistributedApplication.CreateBuilder(args);
24

3-
builder.AddProject<Projects.ProxyMov_DownloadServer>("proxymov-downloadserver");
5+
builder.AddProject<ProxyMov_DownloadServer>("proxymov-downloadserver");
46

5-
builder.Build().Run();
7+
builder.Build().Run();
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<Sdk Name="Aspire.AppHost.Sdk" Version="9.0.0" />
3+
<Sdk Name="Aspire.AppHost.Sdk" Version="9.0.0"/>
44

5-
<PropertyGroup>
6-
<OutputType>Exe</OutputType>
7-
<TargetFramework>net10.0</TargetFramework>
8-
<ImplicitUsings>enable</ImplicitUsings>
9-
<Nullable>enable</Nullable>
10-
<IsAspireHost>true</IsAspireHost>
11-
<UserSecretsId>e08a07ec-6cf8-4004-bf67-0b25b9265aaf</UserSecretsId>
12-
</PropertyGroup>
5+
<PropertyGroup>
6+
<OutputType>Exe</OutputType>
7+
<TargetFramework>net10.0</TargetFramework>
8+
<ImplicitUsings>enable</ImplicitUsings>
9+
<Nullable>enable</Nullable>
10+
<IsAspireHost>true</IsAspireHost>
11+
<UserSecretsId>e08a07ec-6cf8-4004-bf67-0b25b9265aaf</UserSecretsId>
12+
</PropertyGroup>
1313

14-
<ItemGroup>
15-
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.0.2" />
16-
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
17-
</ItemGroup>
14+
<ItemGroup>
15+
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.1.0"/>
16+
<PackageReference Include="Newtonsoft.Json" Version="13.0.4"/>
17+
</ItemGroup>
1818

19-
<ItemGroup>
20-
<ProjectReference Include="..\ProxyMov_DownloadServer\ProxyMov_DownloadServer.csproj" />
21-
</ItemGroup>
19+
<ItemGroup>
20+
<ProjectReference Include="..\ProxyMov_DownloadServer\ProxyMov_DownloadServer.csproj"/>
21+
</ItemGroup>
2222

2323
</Project>

ProxyMov_DownloadServer.ServiceDefaults/Extensions.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
33
using Microsoft.Extensions.DependencyInjection;
44
using Microsoft.Extensions.Diagnostics.HealthChecks;
5+
using Microsoft.Extensions.Hosting;
56
using Microsoft.Extensions.Logging;
6-
using Microsoft.Extensions.ServiceDiscovery;
77
using OpenTelemetry;
88
using OpenTelemetry.Metrics;
99
using OpenTelemetry.Trace;
1010

11-
namespace Microsoft.Extensions.Hosting;
11+
namespace ProxyMov_DownloadServer.ServiceDefaults;
1212

1313
// Adds common .NET Aspire services: service discovery, resilience, health checks, and OpenTelemetry.
1414
// This project should be referenced by each service project in your solution.
@@ -41,7 +41,8 @@ public static TBuilder AddServiceDefaults<TBuilder>(this TBuilder builder) where
4141
return builder;
4242
}
4343

44-
public static TBuilder ConfigureOpenTelemetry<TBuilder>(this TBuilder builder) where TBuilder : IHostApplicationBuilder
44+
public static TBuilder ConfigureOpenTelemetry<TBuilder>(this TBuilder builder)
45+
where TBuilder : IHostApplicationBuilder
4546
{
4647
builder.Logging.AddOpenTelemetry(logging =>
4748
{
@@ -53,24 +54,21 @@ public static TBuilder ConfigureOpenTelemetry<TBuilder>(this TBuilder builder) w
5354
.WithMetrics(metrics =>
5455
{
5556
metrics.AddAspNetCoreInstrumentation()
56-
.AddHttpClientInstrumentation()
5757
.AddRuntimeInstrumentation();
5858
})
5959
.WithTracing(tracing =>
6060
{
6161
tracing.AddSource(builder.Environment.ApplicationName)
62-
.AddAspNetCoreInstrumentation()
63-
// Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package)
64-
//.AddGrpcClientInstrumentation()
65-
.AddHttpClientInstrumentation();
62+
.AddAspNetCoreInstrumentation();
6663
});
6764

6865
builder.AddOpenTelemetryExporters();
6966

7067
return builder;
7168
}
7269

73-
private static TBuilder AddOpenTelemetryExporters<TBuilder>(this TBuilder builder) where TBuilder : IHostApplicationBuilder
70+
private static TBuilder AddOpenTelemetryExporters<TBuilder>(this TBuilder builder)
71+
where TBuilder : IHostApplicationBuilder
7472
{
7573
var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]);
7674

@@ -89,7 +87,8 @@ private static TBuilder AddOpenTelemetryExporters<TBuilder>(this TBuilder builde
8987
return builder;
9088
}
9189

92-
public static TBuilder AddDefaultHealthChecks<TBuilder>(this TBuilder builder) where TBuilder : IHostApplicationBuilder
90+
public static TBuilder AddDefaultHealthChecks<TBuilder>(this TBuilder builder)
91+
where TBuilder : IHostApplicationBuilder
9392
{
9493
builder.Services.AddHealthChecks()
9594
// Add a default liveness check to ensure app is responsive
@@ -116,4 +115,4 @@ public static WebApplication MapDefaultEndpoints(this WebApplication app)
116115

117116
return app;
118117
}
119-
}
118+
}
Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net10.0</TargetFramework>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
7-
<IsAspireSharedProject>true</IsAspireSharedProject>
8-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net10.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
<IsAspireSharedProject>true</IsAspireSharedProject>
8+
</PropertyGroup>
99

10-
<ItemGroup>
11-
<FrameworkReference Include="Microsoft.AspNetCore.App" />
10+
<ItemGroup>
11+
<FrameworkReference Include="Microsoft.AspNetCore.App"/>
1212

13-
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="10.0.0" />
14-
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="10.0.0" />
15-
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
16-
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.14.0" />
17-
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.14.0" />
18-
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.14.0" />
19-
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.14.0" />
20-
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.14.0" />
21-
</ItemGroup>
13+
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="10.2.0"/>
14+
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="10.2.0"/>
15+
<PackageReference Include="Newtonsoft.Json" Version="13.0.4"/>
16+
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.15.0"/>
17+
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.15.0"/>
18+
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.15.0"/>
19+
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.15.0"/>
20+
</ItemGroup>
2221

2322
</Project>

0 commit comments

Comments
 (0)