Skip to content

Commit 088bd7c

Browse files
authored
Updating ASP.NET Core extension to use metadata manager (#3172)
1 parent a566c54 commit 088bd7c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

extensions/Worker.Extensions.Http.AspNetCore/release_notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
### Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore <version>
88

9-
- <entry>
9+
- Updating ASP.NET Core integration to support the metadata transformation feature (#3172)
1010

1111
### Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore.Analyzers <version>
1212

extensions/Worker.Extensions.Http.AspNetCore/src/AspNetMiddleware/FunctionsEndpointDataSource.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.IO;
44
using System.Text.Json;
@@ -17,7 +17,7 @@ internal class FunctionsEndpointDataSource : EndpointDataSource
1717
private const string HostJsonFileName = "host.json";
1818
private const string DefaultRoutePrefix = "api";
1919

20-
private readonly IFunctionMetadataProvider _functionMetadataProvider;
20+
private readonly IFunctionMetadataManager _functionMetadataManager;
2121
private readonly object _lock = new();
2222

2323
private static readonly JsonSerializerOptions _jsonSerializerOptions = new()
@@ -30,9 +30,9 @@ internal class FunctionsEndpointDataSource : EndpointDataSource
3030

3131
private List<Endpoint>? _endpoints;
3232

33-
public FunctionsEndpointDataSource(IFunctionMetadataProvider functionMetadataProvider)
33+
public FunctionsEndpointDataSource(IFunctionMetadataManager functionMetadataManager)
3434
{
35-
_functionMetadataProvider = functionMetadataProvider ?? throw new ArgumentNullException(nameof(functionMetadataProvider));
35+
_functionMetadataManager = functionMetadataManager ?? throw new ArgumentNullException(nameof(functionMetadataManager));
3636
}
3737

3838
public override IReadOnlyList<Endpoint> Endpoints
@@ -58,7 +58,7 @@ private List<Endpoint> BuildEndpoints()
5858
string scriptRoot = Environment.GetEnvironmentVariable(FunctionsApplicationDirectoryKey) ??
5959
throw new InvalidOperationException("Cannot determine script root directory.");
6060

61-
var metadata = _functionMetadataProvider.GetFunctionMetadataAsync(scriptRoot).GetAwaiter().GetResult();
61+
var metadata = _functionMetadataManager.GetFunctionMetadataAsync(scriptRoot).GetAwaiter().GetResult();
6262

6363
string routePrefix = GetRoutePrefixFromHostJson(scriptRoot) ?? DefaultRoutePrefix;
6464

extensions/Worker.Extensions.Http.AspNetCore/src/Worker.Extensions.Http.AspNetCore.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Description>ASP.NET Core extensions for .NET isolated functions</Description>
77

88
<!--Version information-->
9-
<VersionPrefix>2.0.2</VersionPrefix>
9+
<VersionPrefix>2.1.0</VersionPrefix>
1010
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
1111
</PropertyGroup>
1212

@@ -23,7 +23,7 @@
2323
</ItemGroup>
2424

2525
<ItemGroup>
26-
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" />
26+
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.1.0" />
2727
</ItemGroup>
2828

2929
</Project>

0 commit comments

Comments
 (0)