Remove usage of TaskCache
This commit is contained in:
parent
1ffa0c8aec
commit
a23f1601fd
|
|
@ -27,6 +27,5 @@ Microsoft.AspNetCore.Routing.RouteCollection</Description>
|
|||
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.PropertyHelper.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.Extensions.TaskCache.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Routing.Internal;
|
|||
using Microsoft.AspNetCore.Routing.Logging;
|
||||
using Microsoft.AspNetCore.Routing.Template;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Internal;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.ObjectPool;
|
||||
|
||||
|
|
@ -88,7 +87,7 @@ namespace Microsoft.AspNetCore.Routing
|
|||
if (!_matcher.TryMatch(requestPath, context.RouteData.Values))
|
||||
{
|
||||
// If we got back a null value set, that means the URI did not match
|
||||
return TaskCache.CompletedTask;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// Perf: Avoid accessing dictionaries if you don't need to write to them, these dictionaries are all
|
||||
|
|
@ -106,7 +105,7 @@ namespace Microsoft.AspNetCore.Routing
|
|||
RouteDirection.IncomingRequest,
|
||||
_constraintLogger))
|
||||
{
|
||||
return TaskCache.CompletedTask;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
_logger.MatchedRoute(Name, ParsedTemplate.TemplateText);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Internal;
|
||||
|
||||
namespace Microsoft.AspNetCore.Routing
|
||||
{
|
||||
|
|
@ -30,7 +29,7 @@ namespace Microsoft.AspNetCore.Routing
|
|||
public Task RouteAsync(RouteContext context)
|
||||
{
|
||||
context.Handler = _requestDelegate;
|
||||
return TaskCache.CompletedTask;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue