Remove usage of TaskCache
This commit is contained in:
Родитель
a754e91f37
Коммит
4e044a1e30
|
@ -6,7 +6,6 @@ using System.Diagnostics;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Internal;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.Net.Http.Headers;
|
||||
|
@ -102,7 +101,7 @@ namespace Microsoft.AspNetCore.Diagnostics
|
|||
response.Headers[HeaderNames.Pragma] = "no-cache";
|
||||
response.Headers[HeaderNames.Expires] = "-1";
|
||||
response.Headers.Remove(HeaderNames.ETag);
|
||||
return TaskCache.CompletedTask;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -27,7 +27,6 @@
|
|||
<PackageReference Include="Microsoft.Extensions.Options" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.RazorViews.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All"/>
|
||||
<PackageReference Include="Microsoft.Extensions.StackTrace.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All"/>
|
||||
<PackageReference Include="Microsoft.Extensions.TaskCache.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All"/>
|
||||
<PackageReference Include="Microsoft.Extensions.TypeNameHelper.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All"/>
|
||||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(CoreFxVersion)" />
|
||||
<DotNetCliToolReference Include="RazorPageGenerator" Version="$(AspNetCoreVersion)" />
|
||||
|
|
|
@ -6,7 +6,6 @@ using System.Globalization;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Diagnostics;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Internal;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace Microsoft.AspNetCore.Builder
|
||||
|
@ -119,7 +118,7 @@ namespace Microsoft.AspNetCore.Builder
|
|||
{
|
||||
var location = string.Format(CultureInfo.InvariantCulture, locationFormat, context.HttpContext.Response.StatusCode);
|
||||
context.HttpContext.Response.Redirect(context.HttpContext.Request.PathBase + location);
|
||||
return TaskCache.CompletedTask;
|
||||
return Task.CompletedTask;
|
||||
});
|
||||
}
|
||||
else
|
||||
|
@ -128,7 +127,7 @@ namespace Microsoft.AspNetCore.Builder
|
|||
{
|
||||
var location = string.Format(CultureInfo.InvariantCulture, locationFormat, context.HttpContext.Response.StatusCode);
|
||||
context.HttpContext.Response.Redirect(location);
|
||||
return TaskCache.CompletedTask;
|
||||
return Task.CompletedTask;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче