Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Halter <halter73@gmail.com>2022-07-12 05:26:48 +0300
committerStephen Halter <halter73@gmail.com>2022-07-12 05:26:48 +0300
commit0fee7c67fa02acbbff6b37223ddc1f11a1a66286 (patch)
treef2cf5c991b34ba5186ab08f7a6fd69301f3d9381
parent939b8c742aeb4fc9f2d51d9e772ffa7cb5ac4233 (diff)
Rename GetEndpointGroup to GetGroupedEndpointshalter73/42589
-rw-r--r--src/Http/Routing/src/CompositeEndpointDataSource.cs4
-rw-r--r--src/Http/Routing/src/EndpointDataSource.cs2
-rw-r--r--src/Http/Routing/src/PublicAPI.Unshipped.txt4
-rw-r--r--src/Http/Routing/src/RouteEndpointDataSource.cs2
-rw-r--r--src/Http/Routing/src/RouteGroupBuilder.cs6
-rw-r--r--src/Http/Routing/src/RouteGroupContext.cs6
-rw-r--r--src/Http/Routing/test/UnitTests/CompositeEndpointDataSourceTest.cs8
7 files changed, 16 insertions, 16 deletions
diff --git a/src/Http/Routing/src/CompositeEndpointDataSource.cs b/src/Http/Routing/src/CompositeEndpointDataSource.cs
index f9553720fd..bb4250d26b 100644
--- a/src/Http/Routing/src/CompositeEndpointDataSource.cs
+++ b/src/Http/Routing/src/CompositeEndpointDataSource.cs
@@ -76,7 +76,7 @@ public sealed class CompositeEndpointDataSource : EndpointDataSource, IDisposabl
}
/// <inheritdoc/>
- public override IReadOnlyList<Endpoint> GetEndpointGroup(RouteGroupContext context)
+ public override IReadOnlyList<Endpoint> GetGroupedEndpoints(RouteGroupContext context)
{
if (_dataSources.Count is 0)
{
@@ -90,7 +90,7 @@ public sealed class CompositeEndpointDataSource : EndpointDataSource, IDisposabl
foreach (var dataSource in _dataSources)
{
- groupedEndpoints.AddRange(dataSource.GetEndpointGroup(context));
+ groupedEndpoints.AddRange(dataSource.GetGroupedEndpoints(context));
}
// There's no need to cache these the way we do with _endpoints. This is only ever used to get intermediate results.
diff --git a/src/Http/Routing/src/EndpointDataSource.cs b/src/Http/Routing/src/EndpointDataSource.cs
index 6cb05074ea..85c2da05d6 100644
--- a/src/Http/Routing/src/EndpointDataSource.cs
+++ b/src/Http/Routing/src/EndpointDataSource.cs
@@ -32,7 +32,7 @@ public abstract class EndpointDataSource
/// <returns>
/// Returns a read-only collection of <see cref="Endpoint"/> instances given the specified group <see cref="RouteGroupContext.Prefix"/> and <see cref="RouteGroupContext.Conventions"/>.
/// </returns>
- public virtual IReadOnlyList<Endpoint> GetEndpointGroup(RouteGroupContext context)
+ public virtual IReadOnlyList<Endpoint> GetGroupedEndpoints(RouteGroupContext context)
{
// Only evaluate Endpoints once per call.
var endpoints = Endpoints;
diff --git a/src/Http/Routing/src/PublicAPI.Unshipped.txt b/src/Http/Routing/src/PublicAPI.Unshipped.txt
index eaf86a377b..bdffef2a88 100644
--- a/src/Http/Routing/src/PublicAPI.Unshipped.txt
+++ b/src/Http/Routing/src/PublicAPI.Unshipped.txt
@@ -9,7 +9,7 @@ Microsoft.AspNetCore.Routing.RouteGroupContext.Prefix.get -> Microsoft.AspNetCor
Microsoft.AspNetCore.Routing.RouteGroupContext.RouteGroupContext(Microsoft.AspNetCore.Routing.Patterns.RoutePattern! prefix, System.Collections.Generic.IReadOnlyList<System.Action<Microsoft.AspNetCore.Builder.EndpointBuilder!>!>! conventions, System.IServiceProvider! applicationServices) -> void
Microsoft.AspNetCore.Routing.RouteOptions.SetParameterPolicy(string! token, System.Type! type) -> void
Microsoft.AspNetCore.Routing.RouteOptions.SetParameterPolicy<T>(string! token) -> void
-override Microsoft.AspNetCore.Routing.CompositeEndpointDataSource.GetEndpointGroup(Microsoft.AspNetCore.Routing.RouteGroupContext! context) -> System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Http.Endpoint!>!
+override Microsoft.AspNetCore.Routing.CompositeEndpointDataSource.GetGroupedEndpoints(Microsoft.AspNetCore.Routing.RouteGroupContext! context) -> System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Http.Endpoint!>!
static Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions.MapGroup(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, Microsoft.AspNetCore.Routing.Patterns.RoutePattern! prefix) -> Microsoft.AspNetCore.Routing.RouteGroupBuilder!
static Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions.MapGroup(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string! prefix) -> Microsoft.AspNetCore.Routing.RouteGroupBuilder!
static Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions.MapPatch(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string! pattern, System.Delegate! handler) -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder!
@@ -39,5 +39,5 @@ static Microsoft.AspNetCore.Routing.Patterns.RoutePatternFactory.Pattern(Microso
static Microsoft.AspNetCore.Routing.Patterns.RoutePatternFactory.Pattern(Microsoft.AspNetCore.Routing.RouteValueDictionary? defaults, Microsoft.AspNetCore.Routing.RouteValueDictionary? parameterPolicies, params Microsoft.AspNetCore.Routing.Patterns.RoutePatternPathSegment![]! segments) -> Microsoft.AspNetCore.Routing.Patterns.RoutePattern!
static Microsoft.AspNetCore.Routing.Patterns.RoutePatternFactory.Pattern(string? rawText, Microsoft.AspNetCore.Routing.RouteValueDictionary? defaults, Microsoft.AspNetCore.Routing.RouteValueDictionary? parameterPolicies, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Routing.Patterns.RoutePatternPathSegment!>! segments) -> Microsoft.AspNetCore.Routing.Patterns.RoutePattern!
static Microsoft.AspNetCore.Routing.Patterns.RoutePatternFactory.Pattern(string? rawText, Microsoft.AspNetCore.Routing.RouteValueDictionary? defaults, Microsoft.AspNetCore.Routing.RouteValueDictionary? parameterPolicies, params Microsoft.AspNetCore.Routing.Patterns.RoutePatternPathSegment![]! segments) -> Microsoft.AspNetCore.Routing.Patterns.RoutePattern!
-virtual Microsoft.AspNetCore.Routing.EndpointDataSource.GetEndpointGroup(Microsoft.AspNetCore.Routing.RouteGroupContext! context) -> System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Http.Endpoint!>!
+virtual Microsoft.AspNetCore.Routing.EndpointDataSource.GetGroupedEndpoints(Microsoft.AspNetCore.Routing.RouteGroupContext! context) -> System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Http.Endpoint!>!
virtual Microsoft.AspNetCore.Routing.Patterns.RoutePatternTransformer.SubstituteRequiredValues(Microsoft.AspNetCore.Routing.Patterns.RoutePattern! original, Microsoft.AspNetCore.Routing.RouteValueDictionary! requiredValues) -> Microsoft.AspNetCore.Routing.Patterns.RoutePattern?
diff --git a/src/Http/Routing/src/RouteEndpointDataSource.cs b/src/Http/Routing/src/RouteEndpointDataSource.cs
index 68283b8d9e..e15e2da259 100644
--- a/src/Http/Routing/src/RouteEndpointDataSource.cs
+++ b/src/Http/Routing/src/RouteEndpointDataSource.cs
@@ -58,7 +58,7 @@ internal sealed class RouteEndpointDataSource : EndpointDataSource
}
}
- public override IReadOnlyList<RouteEndpoint> GetEndpointGroup(RouteGroupContext context)
+ public override IReadOnlyList<RouteEndpoint> GetGroupedEndpoints(RouteGroupContext context)
{
var endpoints = new RouteEndpoint[_routeEntries.Count];
for (int i = 0; i < _routeEntries.Count; i++)
diff --git a/src/Http/Routing/src/RouteGroupBuilder.cs b/src/Http/Routing/src/RouteGroupBuilder.cs
index 1b135d3c78..5075a53c3b 100644
--- a/src/Http/Routing/src/RouteGroupBuilder.cs
+++ b/src/Http/Routing/src/RouteGroupBuilder.cs
@@ -48,7 +48,7 @@ public sealed class RouteGroupBuilder : IEndpointRouteBuilder, IEndpointConventi
public override IReadOnlyList<Endpoint> Endpoints =>
GetGroupedEndpointsWithNullablePrefix(null, Array.Empty<Action<EndpointBuilder>>(), _routeGroupBuilder._outerEndpointRouteBuilder.ServiceProvider);
- public override IReadOnlyList<Endpoint> GetEndpointGroup(RouteGroupContext context) =>
+ public override IReadOnlyList<Endpoint> GetGroupedEndpoints(RouteGroupContext context) =>
GetGroupedEndpointsWithNullablePrefix(context.Prefix, context.Conventions, context.ApplicationServices);
public IReadOnlyList<Endpoint> GetGroupedEndpointsWithNullablePrefix(RoutePattern? prefix, IReadOnlyList<Action<EndpointBuilder>> conventions, IServiceProvider applicationServices)
@@ -56,7 +56,7 @@ public sealed class RouteGroupBuilder : IEndpointRouteBuilder, IEndpointConventi
return _routeGroupBuilder._dataSources.Count switch
{
0 => Array.Empty<Endpoint>(),
- 1 => _routeGroupBuilder._dataSources[0].GetEndpointGroup(GetNextRouteGroupContext(prefix, conventions, applicationServices)),
+ 1 => _routeGroupBuilder._dataSources[0].GetGroupedEndpoints(GetNextRouteGroupContext(prefix, conventions, applicationServices)),
_ => SelectEndpointsFromAllDataSources(GetNextRouteGroupContext(prefix, conventions, applicationServices)),
};
}
@@ -92,7 +92,7 @@ public sealed class RouteGroupBuilder : IEndpointRouteBuilder, IEndpointConventi
foreach (var dataSource in _routeGroupBuilder._dataSources)
{
- groupedEndpoints.AddRange(dataSource.GetEndpointGroup(context));
+ groupedEndpoints.AddRange(dataSource.GetGroupedEndpoints(context));
}
return groupedEndpoints;
diff --git a/src/Http/Routing/src/RouteGroupContext.cs b/src/Http/Routing/src/RouteGroupContext.cs
index e27e3cf98e..b9b5fd1de0 100644
--- a/src/Http/Routing/src/RouteGroupContext.cs
+++ b/src/Http/Routing/src/RouteGroupContext.cs
@@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Routing.Patterns;
namespace Microsoft.AspNetCore.Routing;
/// <summary>
-/// Represents the information accessible to <see cref="EndpointDataSource.GetEndpointGroup(RouteGroupContext)"/>.
+/// Represents the information accessible to <see cref="EndpointDataSource.GetGroupedEndpoints(RouteGroupContext)"/>.
/// </summary>
public sealed class RouteGroupContext
{
@@ -30,7 +30,7 @@ public sealed class RouteGroupContext
/// <summary>
/// Gets the <see cref="RouteEndpoint.RoutePattern"/> which should prefix the <see cref="RouteEndpoint.RoutePattern"/> of all <see cref="RouteEndpoint"/> instances
- /// returned by the call to <see cref="EndpointDataSource.GetEndpointGroup(RouteGroupContext)"/>. This accounts for nested groups and gives the full group prefix
+ /// returned by the call to <see cref="EndpointDataSource.GetGroupedEndpoints(RouteGroupContext)"/>. This accounts for nested groups and gives the full group prefix
/// not just the prefix supplied to the innermost call to <see cref="EndpointRouteBuilderExtensions.MapGroup(IEndpointRouteBuilder, RoutePattern)"/>.
/// </summary>
public RoutePattern Prefix { get; }
@@ -38,7 +38,7 @@ public sealed class RouteGroupContext
/// <summary>
/// Gets all conventions added to ancestor <see cref="RouteGroupBuilder"/> instances returned from <see cref="EndpointRouteBuilderExtensions.MapGroup(IEndpointRouteBuilder, RoutePattern)"/>
/// via <see cref="IEndpointConventionBuilder.Add(Action{EndpointBuilder})"/>. These should be applied in order when building every <see cref="RouteEndpoint"/>
- /// returned from <see cref="EndpointDataSource.GetEndpointGroup(RouteGroupContext)"/>.
+ /// returned from <see cref="EndpointDataSource.GetGroupedEndpoints(RouteGroupContext)"/>.
/// </summary>
public IReadOnlyList<Action<EndpointBuilder>> Conventions { get; }
diff --git a/src/Http/Routing/test/UnitTests/CompositeEndpointDataSourceTest.cs b/src/Http/Routing/test/UnitTests/CompositeEndpointDataSourceTest.cs
index 9d5c6b73fa..c296a7d2e5 100644
--- a/src/Http/Routing/test/UnitTests/CompositeEndpointDataSourceTest.cs
+++ b/src/Http/Routing/test/UnitTests/CompositeEndpointDataSourceTest.cs
@@ -43,7 +43,7 @@ public class CompositeEndpointDataSourceTest
var conventions = Array.Empty<Action<EndpointBuilder>>();
var applicationServices = new ServiceCollection().BuildServiceProvider();
- var groupedEndpoints = compositeDataSource.GetEndpointGroup(new RouteGroupContext(prefix, conventions, applicationServices));
+ var groupedEndpoints = compositeDataSource.GetGroupedEndpoints(new RouteGroupContext(prefix, conventions, applicationServices));
var resolvedGroupEndpoints = Assert.Single(dataSource.ResolvedGroupedEndpoints);
Assert.NotSame(groupedEndpoints, resolvedGroupEndpoints);
@@ -264,7 +264,7 @@ public class CompositeEndpointDataSourceTest
};
var context = new RouteGroupContext(prefix, conventions, applicationServices);
- var groupedEndpoints = compositeDataSource.GetEndpointGroup(context);
+ var groupedEndpoints = compositeDataSource.GetGroupedEndpoints(context);
var receivedContext = Assert.Single(dataSource.ReceivedRouteGroupContexts);
Assert.Same(context, receivedContext);
@@ -299,10 +299,10 @@ public class CompositeEndpointDataSourceTest
public List<IReadOnlyList<Endpoint>> ResolvedGroupedEndpoints { get; } = new();
- public override IReadOnlyList<Endpoint> GetEndpointGroup(RouteGroupContext context)
+ public override IReadOnlyList<Endpoint> GetGroupedEndpoints(RouteGroupContext context)
{
ReceivedRouteGroupContexts.Add(context);
- var resolved = base.GetEndpointGroup(context);
+ var resolved = base.GetGroupedEndpoints(context);
ResolvedGroupedEndpoints.Add(resolved);
return resolved;
}